Fixed error dialog behind program window when throw in fullscreen.
This commit is contained in:
@@ -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 != "" )
|
||||||
|
|||||||
Reference in New Issue
Block a user