Fix debug print on non-Windows platforms and Quick-save message (#400)

This commit is contained in:
Jan Šimek 2025-01-13 00:33:14 +01:00 committed by GitHub
parent f443e365cc
commit 5956227dcb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 11 deletions

View File

@ -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;

View File

@ -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) {
@ -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!