diff --git a/stepmania/src/arch/ArchHooks/ArchHooks.h b/stepmania/src/arch/ArchHooks/ArchHooks.h index 1c72f9cee9..2e5cc9adef 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks.h +++ b/stepmania/src/arch/ArchHooks/ArchHooks.h @@ -40,6 +40,9 @@ public: virtual ~ArchHooks() { } /* This is called once each time through the game loop */ virtual void Update(float delta) { } + + /* Re-exec the game. If this is implemented, it doesn't return. */ + virtual void RestartProgram() { } }; #endif diff --git a/stepmania/src/arch/ArchHooks/ArchHooks_Win32.cpp b/stepmania/src/arch/ArchHooks/ArchHooks_Win32.cpp index 6f463af96f..c291780a75 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks_Win32.cpp +++ b/stepmania/src/arch/ArchHooks/ArchHooks_Win32.cpp @@ -149,9 +149,6 @@ static BOOL CALLBACK ErrorWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP void ArchHooks_Win32::MessageBoxError( CString error ) { - if( g_bAutoRestart ) - Win32RestartProgram(); - g_sErrorString = error; // throw up a pretty error dialog AppInstance handle; @@ -170,6 +167,11 @@ ArchHooks::MessageBoxResult ArchHooks_Win32::MessageBoxAbortRetryIgnore( CString } } +void ArchHooks_Win32::RestartProgram() +{ + Win32RestartProgram(); +} + /* * Copyright (c) 2002-2003 by the person(s) listed below. All rights reserved. diff --git a/stepmania/src/arch/ArchHooks/ArchHooks_Win32.h b/stepmania/src/arch/ArchHooks/ArchHooks_Win32.h index 460aa751f7..76085792ea 100644 --- a/stepmania/src/arch/ArchHooks/ArchHooks_Win32.h +++ b/stepmania/src/arch/ArchHooks/ArchHooks_Win32.h @@ -10,6 +10,7 @@ public: void MessageBoxOK( CString sMessage, CString ID ); void MessageBoxError( CString error ); MessageBoxResult MessageBoxAbortRetryIgnore( CString sMessage, CString ID ); + void RestartProgram(); }; #undef ARCH_HOOKS