Fixed error dialog behind program window when throw in fullscreen.

This commit is contained in:
Chris Danford
2002-10-02 01:58:03 +00:00
parent 638337c539
commit e3d962cde2
+4 -1
View File
@@ -319,7 +319,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR CmdLine, int nCmdShow
Update(); Update();
Render(); Render();
if( !g_bIsActive && DISPLAY && DISPLAY->IsWindowed() ) if( !g_bIsActive && DISPLAY && DISPLAY->IsWindowed() )
::Sleep( 0 ); // give some time to other processes ::Sleep( 0 ); // give some time to other processes because this process has such a high priority
#ifdef _DEBUG #ifdef _DEBUG
::Sleep( 1 ); ::Sleep( 1 );
#endif #endif
@@ -338,6 +338,9 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE, LPSTR CmdLine, int nCmdShow
catch( RageException e ) catch( RageException e )
{ {
g_sErrorString = e.what(); g_sErrorString = e.what();
DestroyObjects(); // destroy game objects so we can see the error dialog
ShowWindow( g_hWndMain, SW_HIDE );
} }
if( g_sErrorString != "" ) if( g_sErrorString != "" )