Win32 - Cheats - Pause while Active checkbox installed.
This commit is contained in:
parent
7d34e1a885
commit
ecbf9a2dd4
|
@ -1,3 +1,4 @@
|
||||||
|
17-nov-2009 - adelikat - Win32 - Cheats - Pause while active checkbox installed
|
||||||
17-nov-2009 - adelikat - Win32 - Fix debug window so it doesn't crash if unminimized with no game loaded.
|
17-nov-2009 - adelikat - Win32 - Fix debug window so it doesn't crash if unminimized with no game loaded.
|
||||||
13-nov-2009 - mart0258 - Win32 - TASEdit - Added interface functionality (save/load, running TASEdit mid-movie, etc.)
|
13-nov-2009 - mart0258 - Win32 - TASEdit - Added interface functionality (save/load, running TASEdit mid-movie, etc.)
|
||||||
13-nov-2009 - adelikat - made savestate compression togglable
|
13-nov-2009 - adelikat - made savestate compression togglable
|
||||||
|
|
|
@ -31,6 +31,8 @@ HWND hCheat; //mbg merge 7/19/06 had to add
|
||||||
|
|
||||||
void InitializeCheatsAdded(HWND hwndDlg);
|
void InitializeCheatsAdded(HWND hwndDlg);
|
||||||
|
|
||||||
|
bool pauseWhileActive = false; //For checkbox "Pause while active"
|
||||||
|
|
||||||
int CheatWindow;
|
int CheatWindow;
|
||||||
int CheatStyle=1;
|
int CheatStyle=1;
|
||||||
|
|
||||||
|
@ -159,6 +161,8 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
if (ChtPosY==-32000) ChtPosY=0;
|
if (ChtPosY==-32000) ChtPosY=0;
|
||||||
SetWindowPos(hwndDlg,0,ChtPosX,ChtPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
|
SetWindowPos(hwndDlg,0,ChtPosX,ChtPosY,0,0,SWP_NOSIZE|SWP_NOZORDER|SWP_NOOWNERZORDER);
|
||||||
|
|
||||||
|
CheckDlgButton(hwndDlg, IDC_CHEAT_PAUSEWHENACTIVE, pauseWhileActive ? MF_CHECKED : MF_UNCHECKED);
|
||||||
|
|
||||||
//setup font
|
//setup font
|
||||||
hFont = (HFONT)SendMessage(hwndDlg, WM_GETFONT, 0, 0);
|
hFont = (HFONT)SendMessage(hwndDlg, WM_GETFONT, 0, 0);
|
||||||
GetObject(hFont, sizeof(LOGFONT), &lf);
|
GetObject(hFont, sizeof(LOGFONT), &lf);
|
||||||
|
@ -201,7 +205,16 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
InitializeCheatsAdded(hwndDlg);
|
InitializeCheatsAdded(hwndDlg);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WM_KILLFOCUS:
|
||||||
|
break;
|
||||||
|
|
||||||
case WM_NCACTIVATE:
|
case WM_NCACTIVATE:
|
||||||
|
if (pauseWhileActive)
|
||||||
|
{
|
||||||
|
if (EmulationPaused == 0)
|
||||||
|
EmulationPaused = 1;
|
||||||
|
|
||||||
|
}
|
||||||
if ((CheatStyle) && (scrollnum)) {
|
if ((CheatStyle) && (scrollnum)) {
|
||||||
if ((!wParam) && (searchdone)) {
|
if ((!wParam) && (searchdone)) {
|
||||||
searchdone=0;
|
searchdone=0;
|
||||||
|
@ -325,6 +338,9 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
switch (HIWORD(wParam)) {
|
switch (HIWORD(wParam)) {
|
||||||
case BN_CLICKED:
|
case BN_CLICKED:
|
||||||
switch (LOWORD(wParam)) {
|
switch (LOWORD(wParam)) {
|
||||||
|
case IDC_CHEAT_PAUSEWHENACTIVE:
|
||||||
|
pauseWhileActive ^= 1;
|
||||||
|
break;
|
||||||
case IDC_BTN_CHEAT_ADD:
|
case IDC_BTN_CHEAT_ADD:
|
||||||
GetDlgItemText(hwndDlg,IDC_CHEAT_ADDR,str,5);
|
GetDlgItemText(hwndDlg,IDC_CHEAT_ADDR,str,5);
|
||||||
a=StrToU16(str);
|
a=StrToU16(str);
|
||||||
|
|
|
@ -60,6 +60,7 @@ extern int NTViewRefresh;
|
||||||
extern uint8 gNoBGFillColor;
|
extern uint8 gNoBGFillColor;
|
||||||
extern bool rightClickEnabled;
|
extern bool rightClickEnabled;
|
||||||
extern int CurrentState;
|
extern int CurrentState;
|
||||||
|
extern bool pauseWhileActive; //adelikat: Cheats dialog
|
||||||
|
|
||||||
//window positions and sizes:
|
//window positions and sizes:
|
||||||
extern int ChtPosX,ChtPosY;
|
extern int ChtPosX,ChtPosY;
|
||||||
|
@ -300,6 +301,7 @@ static CFGSTRUCT fceuconfig[] = {
|
||||||
|
|
||||||
AC(backupSavestates),
|
AC(backupSavestates),
|
||||||
AC(compressSavestates),
|
AC(compressSavestates),
|
||||||
|
AC(pauseWhileActive),
|
||||||
|
|
||||||
ENDCFGSTRUCT
|
ENDCFGSTRUCT
|
||||||
};
|
};
|
||||||
|
|
|
@ -1420,7 +1420,7 @@ BEGIN
|
||||||
LTEXT "New Selection Name:",-1,5,240,68,8
|
LTEXT "New Selection Name:",-1,5,240,68,8
|
||||||
END
|
END
|
||||||
|
|
||||||
CHEATCONSOLE DIALOGEX 0, 0, 384, 178
|
CHEATCONSOLE DIALOGEX 0, 0, 384, 186
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Cheat Search"
|
CAPTION "Cheat Search"
|
||||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||||
|
@ -1455,6 +1455,7 @@ BEGIN
|
||||||
EDITTEXT IDC_CHEAT_VAL_GT_BY,228,120,20,12,ES_UPPERCASE | ES_WANTRETURN
|
EDITTEXT IDC_CHEAT_VAL_GT_BY,228,120,20,12,ES_UPPERCASE | ES_WANTRETURN
|
||||||
EDITTEXT IDC_CHEAT_VAL_LT_BY,228,147,20,12,ES_UPPERCASE | ES_WANTRETURN
|
EDITTEXT IDC_CHEAT_VAL_LT_BY,228,147,20,12,ES_UPPERCASE | ES_WANTRETURN
|
||||||
LTEXT "(Hex)",IDC_STATIC,226,34,19,8
|
LTEXT "(Hex)",IDC_STATIC,226,34,19,8
|
||||||
|
CONTROL "Pause when active",IDC_CHEAT_PAUSEWHENACTIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,173,76,10
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_LUA DIALOGEX 0, 0, 270, 150
|
IDD_LUA DIALOGEX 0, 0, 270, 150
|
||||||
|
@ -1800,7 +1801,7 @@ BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 377
|
RIGHTMARGIN, 377
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 171
|
BOTTOMMARGIN, 183
|
||||||
END
|
END
|
||||||
|
|
||||||
"VIDEOCONFIG", DIALOG
|
"VIDEOCONFIG", DIALOG
|
||||||
|
|
|
@ -414,6 +414,7 @@
|
||||||
#define IDC_CHECK1 1203
|
#define IDC_CHECK1 1203
|
||||||
#define CB_ENABLECONTEXTMENU 1203
|
#define CB_ENABLECONTEXTMENU 1203
|
||||||
#define DEBUGAUTOLOAD 1203
|
#define DEBUGAUTOLOAD 1203
|
||||||
|
#define IDC_CHEAT_PAUSEWHENACTIVE 1203
|
||||||
#define IDC_VOLUMEGROUP 1204
|
#define IDC_VOLUMEGROUP 1204
|
||||||
#define IDC_RAMLIST 1205
|
#define IDC_RAMLIST 1205
|
||||||
#define IDC_C_SEARCH 1206
|
#define IDC_C_SEARCH 1206
|
||||||
|
|
|
@ -1145,6 +1145,8 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
||||||
mouseb=wParam;
|
mouseb=wParam;
|
||||||
goto proco;
|
goto proco;
|
||||||
|
|
||||||
|
case WM_SETFOCUS:
|
||||||
|
break;
|
||||||
case WM_RBUTTONUP:
|
case WM_RBUTTONUP:
|
||||||
{
|
{
|
||||||
if (rightClickEnabled)
|
if (rightClickEnabled)
|
||||||
|
|
Loading…
Reference in New Issue