moved the call to preInitialize to a central location
This commit is contained in:
parent
87d2982bf6
commit
6473e22616
|
@ -192,8 +192,6 @@ bool Direct3DDisplay::initialize()
|
|||
TRACE( _T("Initializing Direct3D renderer {\n") );
|
||||
#endif
|
||||
|
||||
if( !theApp.preInitialize() ) return false;
|
||||
|
||||
initializing = true;
|
||||
|
||||
// load Direct3D v9
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -199,8 +199,6 @@ void OpenGLDisplay::cleanup()
|
|||
|
||||
bool OpenGLDisplay::initialize()
|
||||
{
|
||||
if( !theApp.preInitialize() ) return false;
|
||||
|
||||
theApp.mode320Available = FALSE;
|
||||
theApp.mode640Available = FALSE;
|
||||
theApp.mode800Available = FALSE;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue