From 42afceb2878469d6cf15bd9f898e2475a0620a2c Mon Sep 17 00:00:00 2001 From: OV2 Date: Fri, 4 Mar 2011 00:46:18 +0100 Subject: [PATCH] Win32: fix hi-res filter box (again) --- win32/wsnes9x.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/win32/wsnes9x.cpp b/win32/wsnes9x.cpp index 70a380d4..80a7003f 100644 --- a/win32/wsnes9x.cpp +++ b/win32/wsnes9x.cpp @@ -7085,12 +7085,15 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) strcpy(temp,GetFilterName((RenderFilter)filter)); SendDlgItemMessageA(hDlg,IDC_FILTERBOX,CB_ADDSTRING,0,(LPARAM) (LPCTSTR)temp); } - for(int filter = 0 ; filter < (int)NUM_FILTERS ; filter++) + for(int filter = 0, hiResPos = 0 ; filter < (int)NUM_FILTERS ; filter++) { if(GetFilterHiResSupport((RenderFilter)filter)) { strcpy(temp,GetFilterName((RenderFilter)filter)); SendDlgItemMessageA(hDlg,IDC_FILTERBOX2,CB_ADDSTRING,0,(LPARAM) (LPCTSTR)temp); + if(GUI.ScaleHiRes==filter) + SendDlgItemMessage(hDlg,IDC_FILTERBOX2,CB_SETCURSEL,(WPARAM)hiResPos,0); + hiResPos++; } } @@ -7101,8 +7104,6 @@ INT_PTR CALLBACK DlgFunky(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam) // have to start focus on something like this or Escape won't exit the dialog SetFocus(hDlg); - SendDlgItemMessage(hDlg,IDC_FILTERBOX2,CB_SETCURSEL,(WPARAM)GUI.ScaleHiRes,0); - break; case WM_CLOSE: case WM_DESTROY: