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

tag2015 noreply at scummvm.org
Sat Jun 17 08:29:50 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:
d2336f3b70 AGS: Removed Dustbowl steam username workaround


Commit: d2336f3b707d8155cd735465554574b84741680b
    https://github.com/scummvm/scummvm/commit/d2336f3b707d8155cd735465554574b84741680b
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2023-06-17T10:14:46+02:00

Commit Message:
AGS: Removed Dustbowl steam username workaround

Return a proper string in ags_steam plugin stub, avoiding script
workaround

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


diff --git a/engines/ags/engine/script/script_api.cpp b/engines/ags/engine/script/script_api.cpp
index 98369f6e12b..b5ba77d715d 100644
--- a/engines/ags/engine/script/script_api.cpp
+++ b/engines/ags/engine/script/script_api.cpp
@@ -19,7 +19,6 @@
  *
  */
 
-#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"
@@ -205,10 +204,6 @@ 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 "";
diff --git a/engines/ags/plugins/ags_galaxy_steam/ags_galaxy_steam.cpp b/engines/ags/plugins/ags_galaxy_steam/ags_galaxy_steam.cpp
index 7fa9a7cd521..e53a1d5302e 100644
--- a/engines/ags/plugins/ags_galaxy_steam/ags_galaxy_steam.cpp
+++ b/engines/ags/plugins/ags_galaxy_steam/ags_galaxy_steam.cpp
@@ -161,8 +161,8 @@ void AGS2Client::get_LeaderboardCount(ScriptMethodParams &params) {
 }
 
 void AGS2Client::GetUserName(ScriptMethodParams &params) {
-	warning("AGS2Client::GetUserName() is not implemented");
-	params._result = 0;
+	warning("AGS2Client::GetUserName() is not implemented - Returning \'Player\'");
+	params._result = _engine->CreateScriptString("Player");
 }
 
 void AGS2Client::GetCurrentGameLanguage(ScriptMethodParams &params) {




More information about the Scummvm-git-logs mailing list