From 86320ab911e13763fbc82d70790081d2968a8509 Mon Sep 17 00:00:00 2001 From: OV2 Date: Fri, 31 Aug 2012 21:55:06 +0200 Subject: [PATCH] win32: prevent crash when using cheat watch (Wraithverge) --- win32/rsrc/snes9x.rc | 2 +- win32/wsnes9x.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/win32/rsrc/snes9x.rc b/win32/rsrc/snes9x.rc index 33c6e989..5687f9f0 100644 --- a/win32/rsrc/snes9x.rc +++ b/win32/rsrc/snes9x.rc @@ -347,7 +347,7 @@ BEGIN CONTROL "Hexadecimal",IDC_HEX,"Button",BS_AUTORADIOBUTTON,129,236,67,10 EDITTEXT IDC_VALUE_ENTER,72,253,83,12,ES_UPPERCASE | ES_AUTOHSCROLL | WS_DISABLED RTEXT "Enter a Value:",IDC_ENTER_LABEL,7,253,54,12,SS_CENTERIMAGE | WS_DISABLED - PUSHBUTTON "&Watch",IDC_C_WATCH,215,91,52,16 + PUSHBUTTON "&Watch",IDC_C_WATCH,215,91,52,16,WS_DISABLED PUSHBUTTON "&Clear Watches",IDC_C_CLEARWATCH,215,108,52,16 PUSHBUTTON "&Load Watches",IDC_C_LOADWATCH,215,125,52,16 PUSHBUTTON "Sa&ve Watches",IDC_C_SAVEWATCH,215,142,52,16 diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 91847aab..2bc11826 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -9451,6 +9451,7 @@ INT_PTR CALLBACK DlgCheatSearch(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lPara enable=false; } EnableWindow(GetDlgItem(hDlg, IDC_C_ADD), enable); + EnableWindow(GetDlgItem(hDlg, IDC_C_WATCH), enable); } // allow typing in an address to jump to it else if(nmh->hwndFrom == GetDlgItem(hDlg, IDC_ADDYS) && nmh->code == (UINT)LVN_ODFINDITEM)