From 2bb52106039af8438b957b119521094d7c63e998 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sun, 2 Dec 2007 01:52:09 +0000 Subject: [PATCH] moved the call to preInitialize to a central location git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@142 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/win32/Direct3D.cpp | 2 -- src/win32/DirectDraw.cpp | 2 -- src/win32/OpenGL.cpp | 2 -- src/win32/VBA.cpp | 46 +++++++++++++++++++++------------------- 4 files changed, 24 insertions(+), 28 deletions(-) diff --git a/src/win32/Direct3D.cpp b/src/win32/Direct3D.cpp index d6b7b0b7..b250e540 100644 --- a/src/win32/Direct3D.cpp +++ b/src/win32/Direct3D.cpp @@ -192,8 +192,6 @@ bool Direct3DDisplay::initialize() TRACE( _T("Initializing Direct3D renderer {\n") ); #endif - if( !theApp.preInitialize() ) return false; - initializing = true; // load Direct3D v9 diff --git a/src/win32/DirectDraw.cpp b/src/win32/DirectDraw.cpp index 3e45157f..50705e47 100644 --- a/src/win32/DirectDraw.cpp +++ b/src/win32/DirectDraw.cpp @@ -180,8 +180,6 @@ void DirectDrawDisplay::cleanup() bool DirectDrawDisplay::initialize() { - if( !theApp.preInitialize() ) return false; - GUID *guid = NULL; if(theApp.ddrawEmulationOnly) guid = (GUID *)DDCREATE_EMULATIONONLY; diff --git a/src/win32/OpenGL.cpp b/src/win32/OpenGL.cpp index f28038b2..3c673908 100644 --- a/src/win32/OpenGL.cpp +++ b/src/win32/OpenGL.cpp @@ -199,8 +199,6 @@ void OpenGLDisplay::cleanup() bool OpenGLDisplay::initialize() { - if( !theApp.preInitialize() ) return false; - theApp.mode320Available = FALSE; theApp.mode640Available = FALSE; theApp.mode800Available = FALSE; diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp index 74f185f2..b7a8166b 100644 --- a/src/win32/VBA.cpp +++ b/src/win32/VBA.cpp @@ -2112,30 +2112,32 @@ bool VBA::updateRenderMethod0(bool force) #endif } - if(display->initialize()) { - winUpdateSkin(); - if(initInput) { - if(!this->initInput()) { - changingVideoSize = false; - AfxPostQuitMessage(0); - return false; - } - input->checkKeys(); - updateMenuBar(); - changingVideoSize = false; - updateWindowSize(videoOption); + if( preInitialize() ) { + if( display->initialize() ) { + winUpdateSkin(); + if( initInput ) { + if( !this->initInput() ) { + changingVideoSize = false; + AfxPostQuitMessage(0); + return false; + } + input->checkKeys(); + updateMenuBar(); + changingVideoSize = false; + updateWindowSize(videoOption); - m_pMainWnd->ShowWindow(SW_SHOW); - m_pMainWnd->UpdateWindow(); - m_pMainWnd->SetFocus(); + m_pMainWnd->ShowWindow(SW_SHOW); + m_pMainWnd->UpdateWindow(); + m_pMainWnd->SetFocus(); - return true; - } else { - changingVideoSize = false; - return true; - } - } - changingVideoSize = false; + return true; + } else { + changingVideoSize = false; + return true; + } + } + } + changingVideoSize = false; } return true; }