This commit is contained in:
parent
f1497e8914
commit
83cb9bd378
|
@ -3,6 +3,9 @@
|
||||||
#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
|
||||||
|
//value by the program rather than the user. This will be used when deciding to automatically make the stop movie checkbox checked.
|
||||||
|
|
||||||
extern int movieConvertOffset1, movieConvertOffset2, movieConvertOK;
|
extern int movieConvertOffset1, movieConvertOffset2, movieConvertOK;
|
||||||
extern FCEUGI *GameInfo;
|
extern FCEUGI *GameInfo;
|
||||||
|
|
||||||
|
@ -195,7 +198,8 @@ void UpdateReplayDialog(HWND hwndDlg)
|
||||||
sprintf(tmp, "%lu", info.num_frames);
|
sprintf(tmp, "%lu", info.num_frames);
|
||||||
SetWindowTextA(GetDlgItem(hwndDlg,301), tmp); // frames
|
SetWindowTextA(GetDlgItem(hwndDlg,301), tmp); // frames
|
||||||
SetDlgItemText(hwndDlg,1003,tmp);
|
SetDlgItemText(hwndDlg,1003,tmp);
|
||||||
|
autoInfo1003 = true;
|
||||||
|
|
||||||
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);
|
||||||
|
@ -474,6 +478,20 @@ BOOL CALLBACK ReplayDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lP
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
case WM_COMMAND:
|
case WM_COMMAND:
|
||||||
|
if(HIWORD(wParam) == EN_CHANGE)
|
||||||
|
{
|
||||||
|
if (LOWORD(wParam) == 1003) // Check if Stop movie at value has changed
|
||||||
|
{
|
||||||
|
if (autoInfo1003 == false)
|
||||||
|
{
|
||||||
|
HWND hwnd1 = GetDlgItem(hwndDlg,1002);
|
||||||
|
Button_SetCheck(hwnd1,BST_CHECKED);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
autoInfo1003 = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(HIWORD(wParam) == CBN_SELCHANGE)
|
if(HIWORD(wParam) == CBN_SELCHANGE)
|
||||||
{
|
{
|
||||||
UpdateReplayDialog(hwndDlg);
|
UpdateReplayDialog(hwndDlg);
|
||||||
|
|
Loading…
Reference in New Issue