diff --git a/src/drivers/win/cheat.cpp b/src/drivers/win/cheat.cpp index 4e50b3eb..dcd19b49 100644 --- a/src/drivers/win/cheat.cpp +++ b/src/drivers/win/cheat.cpp @@ -427,7 +427,10 @@ 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: - lbfocus=1; + 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, LB_GETTEXT, @@ -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 diff --git a/src/drivers/win/main.cpp b/src/drivers/win/main.cpp index ae4e7884..e64c0543 100644 --- a/src/drivers/win/main.cpp +++ b/src/drivers/win/main.cpp @@ -765,7 +765,7 @@ void _updateWindow() UpdateLogWindow(); UpdateMemWatch(); NTViewDoBlit(0); - UpdateCheatList(); + //UpdateCheatList(); Moved to FCEUI_Emulate UpdateTasEdit(); } diff --git a/src/fceu.cpp b/src/fceu.cpp index 9a73d151..bda09134 100644 --- a/src/fceu.cpp +++ b/src/fceu.cpp @@ -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;