diff --git a/src/win32/Direct3D.cpp b/src/win32/Direct3D.cpp index 9c2be508..d47c812c 100644 --- a/src/win32/Direct3D.cpp +++ b/src/win32/Direct3D.cpp @@ -62,7 +62,7 @@ extern int winVideoModeSelect(CWnd *, GUID **); class Direct3DDisplay : public IDisplay { private: - bool initializing; + bool initialized; LPDIRECT3D9 pD3D; LPDIRECT3DDEVICE9 pDevice; D3DDISPLAYMODE mode; @@ -111,7 +111,7 @@ public: Direct3DDisplay::Direct3DDisplay() { - initializing = false; + initialized = false; pD3D = NULL; pDevice = NULL; screenFormat = D3DFMT_X8R8G8B8; @@ -201,8 +201,6 @@ bool Direct3DDisplay::initialize() TRACE( _T("Initializing Direct3D renderer {\n") ); #endif - initializing = true; - // load Direct3D v9 pD3D = Direct3DCreate9( D3D_SDK_VERSION ); @@ -311,10 +309,10 @@ bool Direct3DDisplay::initialize() setOption( _T("d3dFilter"), theApp.d3dFilter ); calculateDestRect(); - initializing = false; - if(failed) return false; + initialized = true; + #ifdef _DEBUG TRACE( _T("} Finished Direct3D renderer initialization\n\n") ); #endif @@ -457,7 +455,7 @@ bool Direct3DDisplay::changeRenderSize( int w, int h ) void Direct3DDisplay::resize( int w, int h ) { - if( initializing ) { + if( !initialized ) { return; } @@ -640,7 +638,7 @@ bool Direct3DDisplay::resetDevice() HRESULT hr; if( pFont ) { - // prepares font for rest + // prepares font for reset pFont->OnLostDevice(); } destroyTexture();