This commit is contained in:
jeblanchard 2008-06-09 13:52:49 +00:00
parent fd67041d4e
commit 0aba87d311
1 changed files with 28 additions and 28 deletions

View File

@ -3,8 +3,8 @@
#include "main.h"
#include "window.h"
bool autoInfo1003 = true; //This is a hacky variable that checks when dialog 1003 is given a
//value by the program rather than the user. This will be used when deciding to automatically make the stop movie checkbox checked.
// Used when deciding to automatically make the stop movie checkbox checked
static bool stopframeWasEditedByUser = false;
extern FCEUGI *GameInfo;
@ -117,17 +117,17 @@ void UpdateReplayDialog(HWND hwndDlg)
char tmp[256];
uint32 div;
sprintf(tmp, "%lu", info.num_frames);
sprintf(tmp, "%u", (unsigned)info.num_frames);
SetWindowTextA(GetDlgItem(hwndDlg,IDC_LABEL_FRAMES), tmp); // frames
SetDlgItemText(hwndDlg,IDC_EDIT_STOPFRAME,tmp);
autoInfo1003 = true;
stopframeWasEditedByUser = false;
div = (FCEUI_GetCurrentVidSystem(0,0)) ? 50 : 60; // PAL timing
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);
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
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 (autoInfo1003 == false)
if (stopframeWasEditedByUser)
{
HWND hwnd1 = GetDlgItem(hwndDlg,IDC_CHECK_STOPMOVIE);
Button_SetCheck(hwnd1,BST_CHECKED);
}
else
autoInfo1003 = false;
stopframeWasEditedByUser = true;
}
}