Win32 - if Cheats dialog pauses the emulator, the emulator will unpaused if it regains focus.
This commit is contained in:
parent
ecbf9a2dd4
commit
fdd7af8997
|
@ -32,6 +32,7 @@ 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"
|
bool pauseWhileActive = false; //For checkbox "Pause while active"
|
||||||
|
extern bool wasPausedByCheats;
|
||||||
|
|
||||||
int CheatWindow;
|
int CheatWindow;
|
||||||
int CheatStyle=1;
|
int CheatStyle=1;
|
||||||
|
@ -212,7 +213,11 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
if (pauseWhileActive)
|
if (pauseWhileActive)
|
||||||
{
|
{
|
||||||
if (EmulationPaused == 0)
|
if (EmulationPaused == 0)
|
||||||
|
{
|
||||||
EmulationPaused = 1;
|
EmulationPaused = 1;
|
||||||
|
wasPausedByCheats = true;
|
||||||
|
FCEU_printf("Emulation paused: %d\n", EmulationPaused);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if ((CheatStyle) && (scrollnum)) {
|
if ((CheatStyle) && (scrollnum)) {
|
||||||
|
|
|
@ -126,6 +126,7 @@ int MainWindow_wndx, MainWindow_wndy;
|
||||||
static uint32 mousex,mousey,mouseb;
|
static uint32 mousex,mousey,mouseb;
|
||||||
static int vchanged = 0;
|
static int vchanged = 0;
|
||||||
int menuYoffset = 0;
|
int menuYoffset = 0;
|
||||||
|
bool wasPausedByCheats = false; //For unpausing the emulator if paused by the cheats dialog
|
||||||
|
|
||||||
bool rightClickEnabled = true; //If set to false, the right click context menu will be disabled.
|
bool rightClickEnabled = true; //If set to false, the right click context menu will be disabled.
|
||||||
|
|
||||||
|
@ -1145,8 +1146,6 @@ 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)
|
||||||
|
@ -2045,6 +2044,14 @@ adelikat: Outsourced this to a remappable hotkey
|
||||||
case WM_QUIT:
|
case WM_QUIT:
|
||||||
DoFCEUExit();
|
DoFCEUExit();
|
||||||
break;
|
break;
|
||||||
|
case WM_SETFOCUS:
|
||||||
|
FCEUI_printf("wasPausedbyCheats = %d\n",wasPausedByCheats);
|
||||||
|
if (wasPausedByCheats)
|
||||||
|
{
|
||||||
|
EmulationPaused = 0;
|
||||||
|
wasPausedByCheats = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case WM_ACTIVATEAPP:
|
case WM_ACTIVATEAPP:
|
||||||
if((BOOL)wParam)
|
if((BOOL)wParam)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue