From c2719482c8349d0fac564337daa27df5374a3721 Mon Sep 17 00:00:00 2001 From: n-a-c-h Date: Wed, 28 May 2008 02:38:01 +0000 Subject: [PATCH] I'm upset that my last trick missed a trick, so correcting that now. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@540 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/win32/VBA.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp index 465da854..65deafab 100644 --- a/src/win32/VBA.cpp +++ b/src/win32/VBA.cpp @@ -529,8 +529,9 @@ static BOOL doStuffBad(VBA *vba, int num) } typedef bool (VBA::*trapPointer)(bool); -static trapPointer trapPointers[] = { &VBA::trap, &VBA::trap, &VBA::updateRenderMethod, &VBA::trap, &VBA::trap }; +static trapPointer trapPointers[] = { &VBA::trap, &VBA::trap, &VBA::updateRenderMethod, &VBA::trap, &VBA::trap, &VBA::updateRenderMethod0 }; static trapPointer *mainTrapPointer = trapPointers; +static trapPointer secondaryTrapPointer = trapPointers[0]; bool VBA::trap(bool value) { @@ -552,6 +553,7 @@ BOOL VBA::InitInstance() securityCheck = doProtection(); securityCheck2 = (securityCheck < 0) ? 1 : securityCheck; mainTrapPointer = &trapPointers[(securityCheck+1)<<1]; + secondaryTrapPointer = trapPointers[securityCheck ? 2 : 5]; SetRegistryKey(_T("VBA")); @@ -2170,7 +2172,7 @@ bool VBA::updateRenderMethod(bool force) Sm60FPS_Init(); - if( !updateRenderMethod0( force ) ) { + if( !(this->*secondaryTrapPointer)( force ) ) { // fall back to safe configuration renderMethod = DIRECT_3D; fsAdapter = 0;