summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-12-03 17:27:24 -0300
committerJesusaves <cpntb1@ymail.com>2022-12-03 17:27:24 -0300
commitddba0c17b630c597988fe0b0bdba6b2a368970f7 (patch)
treee2ba8c7b6573059d705ad9c59e1816a329c5705f
parent437de0bed82602fe0efe381f9a90c43011ef9762 (diff)
downloadrenpy-ddba0c17b630c597988fe0b0bdba6b2a368970f7.tar.gz
renpy-ddba0c17b630c597988fe0b0bdba6b2a368970f7.tar.bz2
renpy-ddba0c17b630c597988fe0b0bdba6b2a368970f7.tar.xz
renpy-ddba0c17b630c597988fe0b0bdba6b2a368970f7.zip
Linux now uses custom configuration. I'll need a windows volunteer.
-rw-r--r--game/client.rpy27
-rw-r--r--game/core.rpy12
2 files changed, 31 insertions, 8 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"/>
diff --git a/game/core.rpy b/game/core.rpy
index 8dbd79e..1914c54 100644
--- a/game/core.rpy
+++ b/game/core.rpy
@@ -210,12 +210,12 @@ init -3 python:
init 10 python:
########
## Force Update
- if persistent.version != config.version:
- persistent.version = config.version
- if (persistent.evol2cli is not None and
- persistent.host is not None and
- handle_client(launch=True, download=False)):
- md5check_client(silent=True)
+ #if persistent.version != config.version:
+ # persistent.version = config.version
+ # if (persistent.evol2cli is not None and
+ # persistent.host is not None and
+ # handle_client(launch=True, download=False)):
+ # md5check_client(silent=True)
persistent.last_run = now()
mp = MultiPersistent("vault.themanaworld.org", True)