Skip to content

Commit

Permalink
Fix debug print on non-Windows platforms and Quick-save message (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
JanSimek authored Jan 12, 2025
1 parent f443e36 commit 5956227
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ int debugPrint(const char* format, ...)

rc = gDebugPrintProc(string);
} else {
#ifdef _DEBUG
#ifndef NDEBUG
SDL_LogMessageV(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, format, args);
#endif
rc = -1;
Expand Down
20 changes: 10 additions & 10 deletions src/loadsave.cc
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,16 @@ int lsgSaveGame(int mode)
fileClose(_flptr);
}

if (!messageListInit(&gLoadSaveMessageList)) {
return -1;
}

char path[COMPAT_MAX_PATH];
snprintf(path, sizeof(path), "%s%s", asc_5186C8, "LSGAME.MSG");
if (!messageListLoad(&gLoadSaveMessageList, path)) {
return -1;
}

_snapshotBuf = nullptr;
int v6 = _QuickSnapShot();
if (v6 == 1) {
Expand All @@ -409,16 +419,6 @@ int lsgSaveGame(int mode)
return 1;
}

if (!messageListInit(&gLoadSaveMessageList)) {
return -1;
}

char path[COMPAT_MAX_PATH];
snprintf(path, sizeof(path), "%s%s", asc_5186C8, "LSGAME.MSG");
if (!messageListLoad(&gLoadSaveMessageList, path)) {
return -1;
}

soundPlayFile("iisxxxx1");

// Error saving game!
Expand Down

0 comments on commit 5956227

Please sign in to comment.