[Scummvm-git-logs] scummvm master -> ea39342113609c88dbd2d7dd852d4a385e5e7c49

athrxx noreply at scummvm.org
Thu May 12 17:01:40 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ea39342113 GUI: (SaveLoad) - remove unnecessary dialog


Commit: ea39342113609c88dbd2d7dd852d4a385e5e7c49
    https://github.com/scummvm/scummvm/commit/ea39342113609c88dbd2d7dd852d4a385e5e7c49
Author: athrxx (athrxx at scummvm.org)
Date: 2022-05-12T19:01:36+02:00

Commit Message:
GUI: (SaveLoad) - remove unnecessary dialog

The dialog

"WARNING: Existing save has longer gameplay duration than the current state. Are you sure you want to overwrite it?"

is not really helpful and seems to have more negative than positive impact on the user experience, so I have removed it.

Changed paths:
    gui/saveload-dialog.cpp


diff --git a/gui/saveload-dialog.cpp b/gui/saveload-dialog.cpp
index 4df295f9944..f62baa0da92 100644
--- a/gui/saveload-dialog.cpp
+++ b/gui/saveload-dialog.cpp
@@ -333,20 +333,8 @@ void SaveLoadChooserDialog::listSaves() {
 void SaveLoadChooserDialog::activate(int slot, const Common::U32String &description) {
 	if (!_saveList.empty() && slot < int(_saveList.size())) {
 		const SaveStateDescriptor &desc = _saveList[slot];
-		if (_saveMode) {
-			if (g_engine) {
-				const int currentPlayTime = g_engine->getTotalPlayTime();
-				const int savedPlayTime = desc.getPlayTimeMSecs();
-				if (currentPlayTime > 0 && savedPlayTime > 0 && currentPlayTime < savedPlayTime) {
-					GUI::MessageDialog warn(
-								_("WARNING: Existing save has longer gameplay duration than the "
-								  "current state. Are you sure you want to overwrite it?"), _("Yes"), _("No"));
-					if (warn.runModal() != GUI::kMessageOK)
-						return;
-				}
-			}
+		if (_saveMode)
 			_resultString = description.empty() ? desc.getDescription() : description;
-		}
 		setResult(desc.getSaveSlot());
 	}
 	close();




More information about the Scummvm-git-logs mailing list