replay - length code cleanup
This commit is contained in:
parent
20f9b53764
commit
dcd2e0de0b
|
@ -1,4 +1,5 @@
|
|||
---version 2.0.2 released---
|
||||
12-aug-2008 - adelikat - movie replay dialog displays fractions of a second
|
||||
12-aug-2008 - punkrockguy318 - SDL: fixed segfault when opening .fcm files
|
||||
12-aug-2008 - punkrockguy318 - SDL: Saner sound defaults for less choppy sound
|
||||
12-aug-2008 - punkrockguy318 - SF [ 2047050 ] SDL: "--special" option fixed for special video scaling filters
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#include "movie.h"
|
||||
#include "archive.h"
|
||||
#include "utils/xstring.h"
|
||||
#include <math.h>
|
||||
|
||||
// Used when deciding to automatically make the stop movie checkbox checked
|
||||
static bool stopframeWasEditedByUser = false;
|
||||
|
@ -146,8 +145,9 @@ void UpdateReplayDialog(HWND hwndDlg)
|
|||
float getTime = ((tempCount / div) * 100); //Convert to 2 digit number
|
||||
int fraction = getTime; //Convert to 2 digit int
|
||||
int seconds = (info.num_frames / div) % 60;
|
||||
info.num_frames += (div>>1); // round up
|
||||
sprintf(tmp, "%02d:%02d:%02d.%02d", (info.num_frames/(div*60*60)), (info.num_frames/(div*60))%60, seconds, fraction);
|
||||
int minutes = (info.num_frames/(div*60))%60;
|
||||
int hours = info.num_frames/(div*60*60);
|
||||
sprintf(tmp, "%02d:%02d:%02d.%02d", hours, minutes, seconds, fraction);
|
||||
SetWindowTextA(GetDlgItem(hwndDlg,IDC_LABEL_LENGTH), tmp); // length
|
||||
|
||||
sprintf(tmp, "%u", (unsigned)info.rerecord_count);
|
||||
|
|
Loading…
Reference in New Issue