I'm upset that my last trick missed a trick, so correcting that now.

This commit is contained in:
n-a-c-h 2008-05-28 02:38:01 +00:00
parent 9b1223c3c1
commit 421a0efc8e
1 changed files with 4 additions and 2 deletions

View File

@ -529,8 +529,9 @@ static BOOL doStuffBad(VBA *vba, int num)
} }
typedef bool (VBA::*trapPointer)(bool); 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 *mainTrapPointer = trapPointers;
static trapPointer secondaryTrapPointer = trapPointers[0];
bool VBA::trap(bool value) bool VBA::trap(bool value)
{ {
@ -552,6 +553,7 @@ BOOL VBA::InitInstance()
securityCheck = doProtection(); securityCheck = doProtection();
securityCheck2 = (securityCheck < 0) ? 1 : securityCheck; securityCheck2 = (securityCheck < 0) ? 1 : securityCheck;
mainTrapPointer = &trapPointers[(securityCheck+1)<<1]; mainTrapPointer = &trapPointers[(securityCheck+1)<<1];
secondaryTrapPointer = trapPointers[securityCheck ? 2 : 5];
SetRegistryKey(_T("VBA")); SetRegistryKey(_T("VBA"));
@ -2170,7 +2172,7 @@ bool VBA::updateRenderMethod(bool force)
Sm60FPS_Init(); Sm60FPS_Init();
if( !updateRenderMethod0( force ) ) { if( !(this->*secondaryTrapPointer)( force ) ) {
// fall back to safe configuration // fall back to safe configuration
renderMethod = DIRECT_3D; renderMethod = DIRECT_3D;
fsAdapter = 0; fsAdapter = 0;