1
0
Fork 0
mirror of synced 2024-06-26 18:20:50 +12:00

Add a workaround for Fall Guys

This commit is contained in:
lennard 2023-01-08 21:02:58 +01:00
parent e46ae0f91e
commit 7d0ac98a7c
No known key found for this signature in database
GPG key ID: AB6010FE63C7C2B1
2 changed files with 17 additions and 1 deletions

View file

@ -1,5 +1,7 @@
import json
import logging
import platform
import subprocess
import sys
import time
import traceback
@ -20,6 +22,10 @@ from .message_models import ErrorModel, Actions, FinishedModel, BaseModel, State
logger = logging.getLogger("RareLauncher")
DETACHED_APP_NAMES = [
"0a2d9f6403244d12969e11da6713137b"
]
class PreLaunchThread(QRunnable):
class Signals(QObject):
@ -174,6 +180,14 @@ class GameProcessApp(RareApp):
new_state=StateChangedModel.States.started
)
))
if self.app_name in DETACHED_APP_NAMES and platform.system() == "Windows":
self.game_process.deleteLater()
subprocess.Popen([args.executable] + args.args, cwd=args.cwd,
env={i: args.env.value(i) for i in args.env.keys()})
if self.console:
self.console.log("Launching game detached")
self.stop()
return
self.game_process.start(args.executable, args.args)
def error_occurred(self, error_str: str):
@ -213,6 +227,8 @@ class GameProcessApp(RareApp):
self.processEvents()
if not self.console:
self.exit()
else:
self.console.on_process_exit(self.app_name, 0)
def start_game(args: Namespace):

View file

@ -162,7 +162,7 @@ class ConsoleEdit(QPlainTextEdit):
self._cursor_output = self.textCursor()
def log(self, text):
html = f"<p style=\"color:#999;white-space:pre\">{text}</p>"
html = f"<p style=\"color:#BBB;white-space:pre\">{text}</p>"
self._cursor_output.insertHtml(html)
self.scroll_to_last_line()