cleanup
This commit is contained in:
parent
fd67041d4e
commit
0aba87d311
|
@ -3,8 +3,8 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
|
|
||||||
bool autoInfo1003 = true; //This is a hacky variable that checks when dialog 1003 is given a
|
// Used when deciding to automatically make the stop movie checkbox checked
|
||||||
//value by the program rather than the user. This will be used when deciding to automatically make the stop movie checkbox checked.
|
static bool stopframeWasEditedByUser = false;
|
||||||
|
|
||||||
extern FCEUGI *GameInfo;
|
extern FCEUGI *GameInfo;
|
||||||
|
|
||||||
|
@ -117,17 +117,17 @@ void UpdateReplayDialog(HWND hwndDlg)
|
||||||
char tmp[256];
|
char tmp[256];
|
||||||
uint32 div;
|
uint32 div;
|
||||||
|
|
||||||
sprintf(tmp, "%lu", info.num_frames);
|
sprintf(tmp, "%u", (unsigned)info.num_frames);
|
||||||
SetWindowTextA(GetDlgItem(hwndDlg,IDC_LABEL_FRAMES), tmp); // frames
|
SetWindowTextA(GetDlgItem(hwndDlg,IDC_LABEL_FRAMES), tmp); // frames
|
||||||
SetDlgItemText(hwndDlg,IDC_EDIT_STOPFRAME,tmp);
|
SetDlgItemText(hwndDlg,IDC_EDIT_STOPFRAME,tmp);
|
||||||
autoInfo1003 = true;
|
stopframeWasEditedByUser = false;
|
||||||
|
|
||||||
div = (FCEUI_GetCurrentVidSystem(0,0)) ? 50 : 60; // PAL timing
|
div = (FCEUI_GetCurrentVidSystem(0,0)) ? 50 : 60; // PAL timing
|
||||||
info.num_frames += (div>>1); // round up
|
info.num_frames += (div>>1); // round up
|
||||||
sprintf(tmp, "%02d:%02d:%02d", (info.num_frames/(div*60*60)), (info.num_frames/(div*60))%60, (info.num_frames/div) % 60);
|
sprintf(tmp, "%02d:%02d:%02d", (info.num_frames/(div*60*60)), (info.num_frames/(div*60))%60, (info.num_frames/div) % 60);
|
||||||
SetWindowTextA(GetDlgItem(hwndDlg,IDC_LABEL_LENGTH), tmp); // length
|
SetWindowTextA(GetDlgItem(hwndDlg,IDC_LABEL_LENGTH), tmp); // length
|
||||||
|
|
||||||
sprintf(tmp, "%lu", info.rerecord_count);
|
sprintf(tmp, "%u", (unsigned)info.rerecord_count);
|
||||||
SetWindowTextA(GetDlgItem(hwndDlg,IDC_LABEL_UNDOCOUNT), tmp); // rerecord
|
SetWindowTextA(GetDlgItem(hwndDlg,IDC_LABEL_UNDOCOUNT), tmp); // rerecord
|
||||||
|
|
||||||
EnableWindow(GetDlgItem(hwndDlg,IDC_CHECK_READONLY),(info.read_only)? FALSE : TRUE); // disable read-only checkbox if the file access is read-only
|
EnableWindow(GetDlgItem(hwndDlg,IDC_CHECK_READONLY),(info.read_only)? FALSE : TRUE); // disable read-only checkbox if the file access is read-only
|
||||||
|
@ -392,13 +392,13 @@ BOOL CALLBACK ReplayDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
|
||||||
{
|
{
|
||||||
if (LOWORD(wParam) == IDC_EDIT_STOPFRAME) // Check if Stop movie at value has changed
|
if (LOWORD(wParam) == IDC_EDIT_STOPFRAME) // Check if Stop movie at value has changed
|
||||||
{
|
{
|
||||||
if (autoInfo1003 == false)
|
if (stopframeWasEditedByUser)
|
||||||
{
|
{
|
||||||
HWND hwnd1 = GetDlgItem(hwndDlg,IDC_CHECK_STOPMOVIE);
|
HWND hwnd1 = GetDlgItem(hwndDlg,IDC_CHECK_STOPMOVIE);
|
||||||
Button_SetCheck(hwnd1,BST_CHECKED);
|
Button_SetCheck(hwnd1,BST_CHECKED);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
autoInfo1003 = false;
|
stopframeWasEditedByUser = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue