mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 21:31:53 +00:00
AGS: Check msg is initialized and add mirrored getAutosaveSlot
This is required for the overwrite warning to work properly
This commit is contained in:
parent
1978f4c9c8
commit
77cb444f6b
@ -297,24 +297,30 @@ Common::FSNode AGSEngine::getGameFolder() {
|
||||
}
|
||||
|
||||
bool AGSEngine::canLoadGameStateCurrently(Common::U32String *msg) {
|
||||
if (ConfMan.get("gameid") == "strangeland") {
|
||||
*msg = _("This game does not support loading from the menu. Use in-game interface");
|
||||
return false;
|
||||
if (msg) {
|
||||
if (ConfMan.get("gameid") == "strangeland") {
|
||||
*msg = _("This game does not support loading from the menu. Use in-game interface");
|
||||
return false;
|
||||
}
|
||||
if (_G(noScummSaveLoad))
|
||||
*msg = _("To preserve the original experience, this game should be loaded using the in-game interface.\nYou can, however, override this setting in Game Options.");
|
||||
}
|
||||
if (_G(noScummSaveLoad))
|
||||
*msg = _("To preserve the original experience, this game should be loaded using the in-game interface.\nYou can, however, override this setting in Game Options.");
|
||||
|
||||
return !_GP(thisroom).Options.SaveLoadDisabled &&
|
||||
!_G(inside_script) && !_GP(play).fast_forward && !_G(no_blocking_functions) &&
|
||||
!_G(noScummSaveLoad);
|
||||
}
|
||||
|
||||
bool AGSEngine::canSaveGameStateCurrently(Common::U32String *msg) {
|
||||
if (ConfMan.get("gameid") == "strangeland") {
|
||||
*msg = _("This game does not support saving from the menu. Use in-game interface");
|
||||
return false;
|
||||
if (msg) {
|
||||
if (ConfMan.get("gameid") == "strangeland") {
|
||||
*msg = _("This game does not support saving from the menu. Use in-game interface");
|
||||
return false;
|
||||
}
|
||||
if (_G(noScummSaveLoad))
|
||||
*msg = _("To preserve the original experience, this game should be saved using the in-game interface.\nYou can, however, override this setting in Game Options.");
|
||||
}
|
||||
if (_G(noScummSaveLoad))
|
||||
*msg = _("To preserve the original experience, this game should be saved using the in-game interface.\nYou can, however, override this setting in Game Options.");
|
||||
|
||||
return !_GP(thisroom).Options.SaveLoadDisabled &&
|
||||
!_G(inside_script) && !_GP(play).fast_forward && !_G(no_blocking_functions) &&
|
||||
!_G(noScummSaveLoad);
|
||||
@ -330,6 +336,13 @@ Common::Error AGSEngine::saveGameState(int slot, const Common::String &desc, boo
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
int AGSEngine::getAutosaveSlot() const {
|
||||
if (!g_engine || !_G(noScummAutosave))
|
||||
return 0;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
void AGSEngine::GUIError(const Common::String &msg) {
|
||||
GUIErrorMessage(msg);
|
||||
}
|
||||
|
@ -162,6 +162,11 @@ public:
|
||||
*/
|
||||
Common::Error saveGameState(int slot, const Common::String &desc, bool isAutosave = false) override;
|
||||
|
||||
/**
|
||||
* Returns autosave slot (-1 if unavailable)
|
||||
*/
|
||||
int getAutosaveSlot() const override;
|
||||
|
||||
/**
|
||||
* Synchronize user volume settings
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user