Cheat search fix - pausing emu stops possibilities updating and double clicking is done only while emulation is paused.

This commit is contained in:
adelikat 2008-07-19 17:34:49 +00:00
parent 6cffaa98ee
commit e1ed71bbd9
3 changed files with 10 additions and 4 deletions

View File

@ -427,6 +427,9 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
case LBN_DBLCLK:
switch (LOWORD(wParam)) { //disable/enable cheat
case IDC_CHEAT_LIST_POSSIBILITIES:
extern int EmulationPaused;
if (EmulationPaused == 1) //We only want to send info to memwatch if paused
{ //otherwise we will be sending info while it is updating causing unpredictable behavior
lbfocus=1;
SendDlgItemMessage(hwndDlg,
IDC_CHEAT_LIST_POSSIBILITIES,
@ -438,6 +441,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l
strcpy(str2,str+1);
str2[4] = 0;
AddMemWatch(str2);
}
break;
case IDC_LIST_CHEATS:
// FCEUI_GetCheat(selcheat,&name,&a,&v,&s); //bbit edited: replaced this with the line below

View File

@ -765,7 +765,7 @@ void _updateWindow()
UpdateLogWindow();
UpdateMemWatch();
NTViewDoBlit(0);
UpdateCheatList();
//UpdateCheatList(); Moved to FCEUI_Emulate
UpdateTasEdit();
}

View File

@ -52,6 +52,7 @@
//TODO - we really need some kind of global platform-specific options api
#ifdef WIN32
#include "drivers/win/main.h"
#include "drivers/win/cheat.h"
#else
#include "drivers/sdl/sdl.h"
@ -557,9 +558,10 @@ void FCEUI_Emulate(uint8 **pXBuf, int32 **SoundBuf, int32 *SoundBufSize, int ski
ssize=FlushEmulateSound();
//#ifdef WIN32
#ifdef WIN32
UpdateCheatList();
// FCEUI_AviVideoUpdate(XBuf);
//#endif
#endif
timestampbase += timestamp;
timestamp = 0;