summaryrefslogtreecommitdiff
path: root/game/client.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'game/client.rpy')
-rw-r--r--game/client.rpy27
1 files changed, 25 insertions, 2 deletions
diff --git a/game/client.rpy b/game/client.rpy
index df31fcd..85eff39 100644
--- a/game/client.rpy
+++ b/game/client.rpy
@@ -33,12 +33,35 @@ init 2 python:
TYPE=persistent.serverlist[idx]["Type"]
CMD=handle_client(launch=True)
OPT="-s %s -y %s -p %s -S" % (HOST, TYPE, PORT)
- #if renpy.variant("steam_deck"):
+
+ ## Config and Local overrides
+ if renpy.linux:
+ paten="/".join(CMD.split("/")[:-1])
+ paten='%s' % paten.replace("\\ ", " ")
+ OPT+=' -C "%s/Config" -L "%s/Local"' % (paten, paten)
+ elif renpy.windows and False:
+ paten="\\".join(CMD.replace('/', '\\').split("\\")[:-1])
+ OPT+=' -C "%s/Config" -L "%s/Local"' % (paten, paten)
+
+ ## Steam Deck must be fullscreen
+ if renpy.variant("steam_deck"):
+ bf=[]
+ with open("%s/Config/config.xml", "r") as f:
+ for l in f:
+ l=l.replace('"screen" value="0"', '"screen" value="0"')
+ l=l.replace('"screenwidth" value="1280"', '"screenwidth" value="800"')
+ l=l.replace('"screenheight" value="720"', '"screenheight" value="600"')
+ bf.append(l)
+ with open("%s/Config/config.xml", "w") as f:
+ for l in bf:
+ f.write(l)
+ del bf
+
# OPT+=" --fullscreen"
#if True: #(CLIENT_NAME in ["manaplus", "manaverse"]):
# #OPT+=" -C \"%s\" -ud \"%s/%s\"" % (get_path("config"), get_path("data"), HOST)
# #OPT+=" -C \"%s\"" % (get_path("config"))
- # # TODO: --screenshot-dir
+ # # TODO: --screenshot-dir. Where, exactly?
# # <option name="screenheight" value="629"/>
# # <option name="screenwidth" value="839"/>