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

tag2015 noreply at scummvm.org
Thu Jan 19 19:40:29 UTC 2023


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:
c683fef66e AGS: Add workaround for Dustbowl character creation


Commit: c683fef66e051656d129022d72945505c3f9ae18
    https://github.com/scummvm/scummvm/commit/c683fef66e051656d129022d72945505c3f9ae18
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-01-19T20:39:37+01:00

Commit Message:
AGS: Add workaround for Dustbowl character creation

Avoid using the stubbed Steam GetUserName method to
initialize the character name

Changed paths:
    engines/ags/engine/script/script_api.cpp


diff --git a/engines/ags/engine/script/script_api.cpp b/engines/ags/engine/script/script_api.cpp
index b5ba77d715d..98369f6e12b 100644
--- a/engines/ags/engine/script/script_api.cpp
+++ b/engines/ags/engine/script/script_api.cpp
@@ -19,6 +19,7 @@
  *
  */
 
+#include "common/config-manager.h"
 #include "ags/shared/ac/game_version.h"
 #include "ags/shared/script/cc_common.h"
 #include "ags/engine/script/runtime_script_value.h"
@@ -204,6 +205,10 @@ const char *ScriptSprintf(char *buffer, size_t buf_length, const char *format,
 						if (_G(loaded_game_file_version) < kGameVersion_320) {
 							// explicitly put "(null)" into the placeholder
 							p = "(null)";
+						} else if (ConfMan.get("gameid") == "dustbowl") {
+							// WORKAROUND: Prevent crash in DustBowl character creation screen
+							// uses stubbed GetUserName in Steam AGS plugin
+							p = "Player";
 						} else {
 							cc_error("!ScriptSprintf: formatting argument %d is expected to be a string, but it is a null pointer", arg_idx + 1);
 							return "";




More information about the Scummvm-git-logs mailing list