diff --git a/engines/saga2/loadsave.cpp b/engines/saga2/loadsave.cpp index 3eee9b5f5e9..dbb6a823b13 100644 --- a/engines/saga2/loadsave.cpp +++ b/engines/saga2/loadsave.cpp @@ -492,25 +492,16 @@ void cleanupGameState(void) { #include #endif -void checkRestartGame(char *exeName) { -#ifdef DEBUG_FILETIME - int32 d1, d2; - char datebuf[64]; -#endif +void checkRestartGame(const char *exeName) { +#if 0 char saveRestart[260]; getSaveFileName(999, saveRestart); -#ifdef DEBUG_FILETIME - d1 = getFileDate(exeName); - d2 = getFileDate(saveRestart); - strftime(datebuf, 64, "%c", localtime(&d1)); - WriteStatusF(12, "Date:%s File %s", datebuf, exeName); - strftime(datebuf, 64, "%c", localtime(&d2)); - WriteStatusF(13, "Date:%s File %s", datebuf, saveRestart); -#endif if (!fileExists(saveRestart) || (getFileDate(exeName) > getFileDate(saveRestart))) saveGameState(999, saveRestart); +#endif + warning("STUB: checkRestartGame()"); } diff --git a/engines/saga2/loadsave.h b/engines/saga2/loadsave.h index e8a1e4b2227..4e52fd22977 100644 --- a/engines/saga2/loadsave.h +++ b/engines/saga2/loadsave.h @@ -41,7 +41,7 @@ void loadSavedGameState(int16 saveNo); // Cleanup the game state void cleanupGameState(void); -void checkRestartGame(char *exeName); +void checkRestartGame(const char *exeName); void loadRestartGame(void); void getSaveFileName(int16 saveNo, char *fileName); diff --git a/engines/saga2/main.cpp b/engines/saga2/main.cpp index aad26514bc0..022afd3e825 100644 --- a/engines/saga2/main.cpp +++ b/engines/saga2/main.cpp @@ -185,7 +185,7 @@ void lightsOut(void); void cleanupGame(void); // auto-cleanup function void RShowMem(void); void parseCommandLine(int argc, char *argv[]); -char *getExeFromCommandLine(int argc, char *argv[]); +const char *getExeFromCommandLine(int argc, char *argv[]); void WriteStatusF2(int16 line, const char *msg, ...); bool initUserDialog(void); void cleanupUserDialog(void); @@ -241,7 +241,7 @@ void main_saga2() { void updateActiveRegions(void); static void mainLoop(bool &cleanExit, int argc, char *argv[]) { - char *exeFile = getExeFromCommandLine(argc, argv); + const char *exeFile = getExeFromCommandLine(argc, argv); if (displayEnabled()) displayUpdate(); checkRestartGame(exeFile); @@ -441,7 +441,9 @@ void SystemEventLoop(void) { // ------------------------------------------------------------------------ // Determines the EXE file executed from command line info -char *getExeFromCommandLine(int argc, char *argv[]) { +const char *getExeFromCommandLine(int argc, char *argv[]) { + if (argv == nullptr) + return "scummvm"; return argv[0]; }