From c0166c1b5d78e37ea77ea65fdd87a8ca3dd947d7 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Tue, 20 May 2008 17:14:55 +0000 Subject: [PATCH] DISABLE possibility to select multi-threaded filters and filter plugins at once --- src/win32/MainWnd.cpp | 1 + src/win32/MainWnd.h | 1 + src/win32/MainWndOptions.cpp | 7 +++++++ src/win32/VBA.rc | 14 +++++++------- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index 218e7cf3..162bf26d 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -439,6 +439,7 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd) ON_UPDATE_COMMAND_UI(ID_OUTPUTAPI_XAUDIO2, &MainWnd::OnUpdateOutputapiXaudio2) ON_COMMAND(ID_PIXELFILTER_MULTI, &MainWnd::OnPixelfilterMultiThreading) ON_UPDATE_COMMAND_UI(ID_PIXELFILTER_MULTI, &MainWnd::OnUpdatePixelfilterMultiThreading) + ON_UPDATE_COMMAND_UI(ID_OPTIONS_SELECT_PLUGIN, &MainWnd::OnUpdateOptionsSelectPlugin) END_MESSAGE_MAP() diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h index 1524a133..c6e41b98 100644 --- a/src/win32/MainWnd.h +++ b/src/win32/MainWnd.h @@ -427,6 +427,7 @@ public: afx_msg void OnUpdateOutputapiXaudio2(CCmdUI *pCmdUI); afx_msg void OnPixelfilterMultiThreading(); afx_msg void OnUpdatePixelfilterMultiThreading(CCmdUI *pCmdUI); + afx_msg void OnUpdateOptionsSelectPlugin(CCmdUI *pCmdUI); }; ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win32/MainWndOptions.cpp b/src/win32/MainWndOptions.cpp index 9fdef6ea..ba70358b 100644 --- a/src/win32/MainWndOptions.cpp +++ b/src/win32/MainWndOptions.cpp @@ -1363,6 +1363,7 @@ void MainWnd::OnUpdateOptionsFilter(CCmdUI *pCmdUI) pCmdUI->SetCheck(theApp.filterType == FILTER_SUPER2XSAI); break; case ID_OPTIONS_FILTER_PLUGIN: + pCmdUI->Enable( !theApp.filterMT ); pCmdUI->SetCheck(theApp.filterType == FILTER_PLUGIN); break; case ID_OPTIONS_FILTER_SUPEREAGLE: @@ -1407,6 +1408,11 @@ void MainWnd::OnUpdateOptionsFilter(CCmdUI *pCmdUI) } } +void MainWnd::OnUpdateOptionsSelectPlugin(CCmdUI *pCmdUI) +{ + pCmdUI->Enable( !theApp.filterMT ); +} + BOOL MainWnd::OnOptionsFilterIFB(UINT nID) { switch(nID) { @@ -1869,5 +1875,6 @@ void MainWnd::OnPixelfilterMultiThreading() void MainWnd::OnUpdatePixelfilterMultiThreading(CCmdUI *pCmdUI) { + pCmdUI->Enable( theApp.filterType != FILTER_PLUGIN ); pCmdUI->SetCheck( theApp.filterMT ? 1 : 0 ); } diff --git a/src/win32/VBA.rc b/src/win32/VBA.rc index a1b0d6cf..df2b17a7 100644 --- a/src/win32/VBA.rc +++ b/src/win32/VBA.rc @@ -89,15 +89,15 @@ BEGIN CTEXT "bufferInfo",IDC_BUFFERINFO,12,72,144,12,0,WS_EX_DLGMODALFRAME END -IDD_SELECT_PLUGIN DIALOG 0, 0, 201, 120 +IDD_SELECT_PLUGIN DIALOGEX 0, 0, 172, 54 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Select Filter Plugin" -FONT 8, "MS Sans Serif" +CAPTION "Filter Plugin" +FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN - DEFPUSHBUTTON "OK",IDOK,39,89,50,14 - PUSHBUTTON "Cancel",IDCANCEL,103,89,50,14 - COMBOBOX IDC_COMBO_PLUGIN,20,28,163,58,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - LTEXT "Filter Plugin:",IDC_STATIC,18,15,66,8 + DEFPUSHBUTTON "OK",IDOK,66,36,48,12 + PUSHBUTTON "Cancel",IDCANCEL,120,36,48,12 + COMBOBOX IDC_COMBO_PLUGIN,6,18,162,48,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP + LTEXT "Please select filter plugin:",IDC_STATIC,6,6,162,8 END 7533 DIALOGEX 0, 0, 254, 203