From 6d63c73c54f795670a82141e877681e4445b70c0 Mon Sep 17 00:00:00 2001 From: Arkadiusz Hiler Date: Wed, 26 Apr 2023 18:15:55 +0300 Subject: [PATCH] steam_helper: Update the format of the generated libraryfolders.vdf. The old 1-indexed format: "1" "Z:\\home\\ivyl\\.local\\share\\Steam" Changes to new 0-indexed one: "0" { "path" "Z:\\home\\ivyl\\.local\\share\\Steam" } that is used by Steam on Windows. --- steam_helper/steam.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index e4558fe4..d5c02f05 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -1314,7 +1314,7 @@ static void setup_steam_files(void) const char *steam_install_path = getenv("STEAM_COMPAT_CLIENT_INSTALL_PATH"); const char *steam_library_paths = getenv("STEAM_COMPAT_LIBRARY_PATHS"); const char *start, *end, *next; - unsigned int i, index = 1; + unsigned int i, index = 0; std::string contents; char idx_str[10]; @@ -1352,7 +1352,7 @@ static void setup_steam_files(void) } } - contents += std::string("\t\"") + idx_str + "\" \t\"" + s + "\"\n"; + contents += std::string("\t\"") + idx_str + "\"\n\t{\n\t\t\"path\"\t\t\"" + s + "\"\n\t}\n"; } else { @@ -1394,7 +1394,7 @@ static void setup_steam_files(void) } } - contents += std::string("\t\"") + idx_str + "\" \t\"" + s + "\"\n"; + contents += std::string("\t\"") + idx_str + "\"\n\t{\n\t\t\"path\"\t\t\"" + s + "\"\n\t}\n"; } else {