From 9149cf532617ed281f3a5e76722cdcc36bd60f7f Mon Sep 17 00:00:00 2001 From: adelikat <adelikat@users.sf.net> Date: Tue, 2 Mar 2010 04:06:36 +0000 Subject: [PATCH] Win32 - fix bug - cheats dialog - toggling a cheat in the cheats list box now updates active cheats count --- changelog.txt | 1 + src/drivers/win/cheat.cpp | 21 +++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/changelog.txt b/changelog.txt index dd8973d3..3d0f38c2 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,4 @@ +01-march-2010 - adelikat - win32 - cheats dialog - toggling a cheat in the cheats list now updates the active cheats count 01-march-2010 - adelikat - win32 - a disable movie messages menu item 25-feb-2010 - prockguy - unix netplay is now functional; gtk network gui created 24-feb-2010 - prockguy - GTK - added basic movie controls diff --git a/src/drivers/win/cheat.cpp b/src/drivers/win/cheat.cpp index 5c7fe21e..9ab631cb 100644 --- a/src/drivers/win/cheat.cpp +++ b/src/drivers/win/cheat.cpp @@ -464,16 +464,16 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l 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, - SendDlgItemMessage(hwndDlg, - IDC_CHEAT_LIST_POSSIBILITIES, - LB_GETCURSEL,0,0), - (LPARAM)(LPCTSTR)str); - strcpy(str2,str+1); - str2[4] = 0; - AddMemWatch(str2); + SendDlgItemMessage(hwndDlg, + IDC_CHEAT_LIST_POSSIBILITIES, + LB_GETTEXT, + SendDlgItemMessage(hwndDlg, + IDC_CHEAT_LIST_POSSIBILITIES, + LB_GETCURSEL,0,0), + (LPARAM)(LPCTSTR)str); + strcpy(str2,str+1); + str2[4] = 0; + AddMemWatch(str2); } break; case IDC_LIST_CHEATS: @@ -488,6 +488,7 @@ BOOL CALLBACK CheatConsoleCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM l SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_DELETESTRING,selcheat,0); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_INSERTSTRING,selcheat,(LPARAM)(LPSTR)str); SendDlgItemMessage(hwndDlg,IDC_LIST_CHEATS,LB_SETCURSEL,selcheat,0); + UpdateCheatsAdded(); UpdateColorTable(); break; }