Skip to content

Commit bf56c29

Browse files
committed
tweak: Improve duration format for extra replay info
1 parent df6ebbd commit bf56c29

File tree

2 files changed

+20
-16
lines changed
  • GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus
  • Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus

2 files changed

+20
-16
lines changed

Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,11 @@ void PopulateReplayFileListbox(GameWindow *listbox)
240240
// {
241241
// // MP game
242242
// time_t totalSeconds = header.endTime - header.startTime;
243-
// Int mins = totalSeconds/60;
244-
// Int secs = totalSeconds%60;
245-
// Real fps = header.frameCount/totalSeconds;
246-
// extraStr.format(L"%d:%d (%g fps) %hs", mins, secs, fps, header.desyncGame?"OOS ":"");
243+
// Int hours = totalSeconds / 3600;
244+
// Int mins = (totalSeconds % 3600) / 60;
245+
// Int secs = totalSeconds % 60;
246+
// Real fps = header.frameCount / totalSeconds;
247+
// extraStr.format(L"%02d:%02d:%02d (%g fps) %hs", hours, mins, secs, fps, header.desyncGame ? "OOS " : "");
247248
//
248249
// for (Int i=0; i<MAX_SLOTS; ++i)
249250
// {
@@ -262,10 +263,11 @@ void PopulateReplayFileListbox(GameWindow *listbox)
262263
// {
263264
// // solo game
264265
// time_t totalSeconds = header.endTime - header.startTime;
265-
// Int mins = totalSeconds/60;
266-
// Int secs = totalSeconds%60;
267-
// Real fps = header.frameCount/totalSeconds;
268-
// extraStr.format(L"%d:%d (%g fps)", mins, secs, fps);
266+
// Int hours = totalSeconds / 3600;
267+
// Int mins = (totalSeconds % 3600) / 60;
268+
// Int secs = totalSeconds % 60;
269+
// Real fps = header.frameCount / totalSeconds;
270+
// extraStr.format(L"%02d:%02d:%02d (%g fps)", hours, mins, secs, fps);
269271
// }
270272

271273
// pick a color

GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,11 @@ void PopulateReplayFileListbox(GameWindow *listbox)
240240
// {
241241
// // MP game
242242
// time_t totalSeconds = header.endTime - header.startTime;
243-
// Int mins = totalSeconds/60;
244-
// Int secs = totalSeconds%60;
245-
// Real fps = header.frameCount/totalSeconds;
246-
// extraStr.format(L"%d:%d (%g fps) %hs", mins, secs, fps, header.desyncGame?"OOS ":"");
243+
// Int hours = totalSeconds / 3600;
244+
// Int mins = (totalSeconds % 3600) / 60;
245+
// Int secs = totalSeconds % 60;
246+
// Real fps = header.frameCount / totalSeconds;
247+
// extraStr.format(L"%02d:%02d:%02d (%g fps) %hs", hours, mins, secs, fps, header.desyncGame ? "OOS " : "");
247248
//
248249
// for (Int i=0; i<MAX_SLOTS; ++i)
249250
// {
@@ -262,10 +263,11 @@ void PopulateReplayFileListbox(GameWindow *listbox)
262263
// {
263264
// // solo game
264265
// time_t totalSeconds = header.endTime - header.startTime;
265-
// Int mins = totalSeconds/60;
266-
// Int secs = totalSeconds%60;
267-
// Real fps = header.frameCount/totalSeconds;
268-
// extraStr.format(L"%d:%d (%g fps)", mins, secs, fps);
266+
// Int hours = totalSeconds / 3600;
267+
// Int mins = (totalSeconds % 3600) / 60;
268+
// Int secs = totalSeconds % 60;
269+
// Real fps = header.frameCount / totalSeconds;
270+
// extraStr.format(L"%02d:%02d:%02d (%g fps)", hours, mins, secs, fps);
269271
// }
270272

271273
// pick a color

0 commit comments

Comments
 (0)