ADDED convenience behavior of filter plugin menu entry

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@527 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
spacy51 2008-05-20 17:04:25 +00:00
parent d4ff4a255e
commit e26d47587b
3 changed files with 14 additions and 9 deletions

View File

@ -389,8 +389,8 @@ BEGIN_MESSAGE_MAP(MainWnd, CWnd)
ON_COMMAND_EX_RANGE(ID_OPTIONS_FILTER_BILINEAR, ID_OPTIONS_FILTER_BILINEARPLUS, OnOptionsFilter)
ON_COMMAND_EX_RANGE(ID_OPTIONS_FILTER_SCANLINES, ID_OPTIONS_FILTER_SCANLINES, OnOptionsFilter)
ON_COMMAND_EX_RANGE(ID_OPTIONS_FILTER_HQ2X, ID_OPTIONS_FILTER_LQ2X, OnOptionsFilter)
ON_COMMAND_EX_RANGE(ID_OPTIONS_FILTER_PLUGIN, ID_OPTIONS_FILTER_PLUGIN, OnOptionsFilter)
ON_UPDATE_COMMAND_UI_RANGE(ID_OPTIONS_FILTER_PLUGIN, ID_OPTIONS_FILTER_PLUGIN, OnUpdateOptionsFilter)
ON_COMMAND_EX(ID_OPTIONS_FILTER_PLUGIN, OnOptionsFilter)
ON_UPDATE_COMMAND_UI(ID_OPTIONS_FILTER_PLUGIN, OnUpdateOptionsFilter)
ON_COMMAND_EX(ID_OPTIONS_FILTER_HQ3X, OnOptionsFilter)
ON_COMMAND_EX(ID_OPTIONS_FILTER_HQ4X, OnOptionsFilter)
ON_COMMAND_EX(ID_OPTIONS_FILTER_SIMPLE3X, OnOptionsFilter)

View File

@ -1288,6 +1288,10 @@ BOOL MainWnd::OnOptionsFilter(UINT nID)
break;
case ID_OPTIONS_FILTER_PLUGIN:
theApp.filterType = FILTER_PLUGIN;
if( strcmp( theApp.pluginName, "" ) == 0 ) {
// open select plugin dialog when none selected
OnOptionsSelectPlugin();
}
break;
case ID_OPTIONS_FILTER_2XSAI:
theApp.filterType = FILTER_2XSAI;
@ -1720,8 +1724,9 @@ void MainWnd::OnOptionsSelectPlugin()
{
SelectPlugin dlg;
if (dlg.DoModal() == IDOK && theApp.filterType == FILTER_PLUGIN)
if (dlg.DoModal() == IDOK)
{
theApp.filterType = FILTER_PLUGIN;
theApp.updateFilter();
}
}

View File

@ -1446,7 +1446,7 @@ void VBA::loadSettings()
videoOption = regQueryDwordValue("video", VIDEO_3X);
strcpy(pluginName, regQueryStringValue("pluginName", "Scale2x.rpi"));
strcpy(pluginName, regQueryStringValue("pluginName", ""));
if(videoOption < VIDEO_1X || videoOption > VIDEO_OTHER)
videoOption = VIDEO_3X;