From f3547062b58c830299e8d12ca1e3e491497edee5 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sat, 1 Dec 2007 12:56:18 +0000 Subject: [PATCH] filter plugin will not be used when init failed (plugin not found or none selected) git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@126 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/win32/VBA.cpp | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp index 1f49acf8..07ecd48a 100644 --- a/src/win32/VBA.cpp +++ b/src/win32/VBA.cpp @@ -711,9 +711,14 @@ void VBA::updateFilter() filterMagnification = 1; break; case FILTER_PLUGIN: - if (rpiInit(pluginName)) - filterFunction = rpiFilter; - filterMagnification = rpiScaleFactor(); + if( rpiInit( pluginName ) ) { + filterFunction = rpiFilter; + filterMagnification = rpiScaleFactor(); + } else { + filterType = FILTER_NONE; + updateFilter(); + return; + } break; case FILTER_TVMODE: filterFunction = ScanlinesTV; @@ -792,11 +797,16 @@ void VBA::updateFilter() filterMagnification = 1; break; case FILTER_PLUGIN: - if (rpiInit(pluginName)) - filterFunction = rpiFilter; - filterMagnification = rpiScaleFactor(); - b16to32Video=true; - break; + if( rpiInit( pluginName ) ) { + filterFunction = rpiFilter; + filterMagnification = rpiScaleFactor(); + b16to32Video=true; + } else { + filterType = FILTER_NONE; + updateFilter(); + return; + } + break; case FILTER_TVMODE: filterFunction = ScanlinesTV32; filterMagnification = 2;