move exception dialog behavior to HandleException
This commit is contained in:
@@ -178,6 +178,14 @@ void ApplyGraphicOptions()
|
|||||||
INPUTMAN->WindowReset();
|
INPUTMAN->WindowReset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HandleException( CString error )
|
||||||
|
{
|
||||||
|
if( g_bAutoRestart )
|
||||||
|
HOOKS->RestartProgram();
|
||||||
|
|
||||||
|
HOOKS->MessageBoxError( error ); // throw up a pretty error dialog
|
||||||
|
}
|
||||||
|
|
||||||
void ExitGame()
|
void ExitGame()
|
||||||
{
|
{
|
||||||
g_bQuitting = true;
|
g_bQuitting = true;
|
||||||
@@ -1170,11 +1178,7 @@ int main(int argc, char* argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( g_sErrorString != "" )
|
if( g_sErrorString != "" )
|
||||||
{
|
HandleException( g_sErrorString );
|
||||||
if( g_bAutoRestart )
|
|
||||||
HOOKS->RestartProgram();
|
|
||||||
HOOKS->MessageBoxError( g_sErrorString ); // throw up a pretty error dialog
|
|
||||||
}
|
|
||||||
|
|
||||||
SAFE_DELETE( HOOKS );
|
SAFE_DELETE( HOOKS );
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
int SMmain(int argc, char* argv[]);
|
int SMmain(int argc, char* argv[]);
|
||||||
void ApplyGraphicOptions();
|
void ApplyGraphicOptions();
|
||||||
|
void HandleException( CString error );
|
||||||
void ExitGame();
|
void ExitGame();
|
||||||
void ResetGame( bool ReturnToFirstScreen=true );
|
void ResetGame( bool ReturnToFirstScreen=true );
|
||||||
void ReadGamePrefsFromDisk( bool bSwitchToLastPlayedGame=true );
|
void ReadGamePrefsFromDisk( bool bSwitchToLastPlayedGame=true );
|
||||||
|
|||||||
Reference in New Issue
Block a user