Skip to content

Commit 3ad130d

Browse files
authored
Merge pull request #168 from fa0311/develop-v6
update 6.2.1
2 parents 7ea27c1 + c3ea90f commit 3ad130d

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

DMMGamePlayerFastLauncher/launch.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def thread(self, id: str, kill: bool = False, force_non_uac: bool = False):
4848
self.quit()
4949
except Exception as e:
5050
if Env.DEVELOP:
51+
self.iconify()
5152
raise
5253
else:
5354
self.iconify()
@@ -109,22 +110,22 @@ def launch(self, id: str, kill: bool = False, force_non_uac: bool = False):
109110
if response["data"]["is_administrator"] and (not is_admin) and (not force_non_uac):
110111
process = ProcessManager.admin_run([game_path] + dmm_args, cwd=str(game_file))
111112
game_pid = pid_manager.new_process().search(game_full_path)
112-
if data.rich_presence.get():
113-
start_rich_presence(game_pid, data.product_id.get(), response["data"]["title"])
114113
if data.external_tool_path.get() != "":
115114
external_tool_pid_manager = ProcessIdManager()
116115
ProcessManager.admin_run([data.external_tool_path.get()], cwd=str(game_file))
117116
external_tool_pid = external_tool_pid_manager.new_process().search_or_none(data.external_tool_path.get())
117+
if data.rich_presence.get():
118+
start_rich_presence(game_pid, data.product_id.get(), response["data"]["title"])
118119
while psutil.pid_exists(game_pid):
119120
time.sleep(1)
120121
else:
121122
process = ProcessManager.run([game_path] + dmm_args, cwd=str(game_file))
122-
if data.rich_presence.get():
123-
start_rich_presence(process.pid, data.product_id.get(), response["data"]["title"])
124123
if data.external_tool_path.get() != "":
125124
external_tool_pid_manager = ProcessIdManager()
126125
ProcessManager.run([data.external_tool_path.get()], cwd=str(game_file))
127126
external_tool_pid = external_tool_pid_manager.new_process().search_or_none(data.external_tool_path.get())
127+
if data.rich_presence.get():
128+
start_rich_presence(process.pid, data.product_id.get(), response["data"]["title"])
128129
assert process.stdout is not None
129130
for line in process.stdout:
130131
logging.debug(decode(line))
@@ -138,7 +139,7 @@ def launch(self, id: str, kill: bool = False, force_non_uac: bool = False):
138139
start_rich_presence(game_pid, data.product_id.get(), response["data"]["title"])
139140
while psutil.pid_exists(game_pid):
140141
time.sleep(1)
141-
if data.external_tool_path.get() != "":
142+
if data.external_tool_path.get() != "" and external_tool_pid is not None:
142143
for child in psutil.Process(external_tool_pid).children(recursive=True):
143144
child.kill()
144145

DMMGamePlayerFastLauncher/lib/process_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def new_process(self) -> "ProcessIdManager":
7777

7878
def search(self, name: str) -> int:
7979
process = [x[0] for x in self.process if x[1] == name]
80-
if len(process) != 1:
80+
if len(process) == 0:
8181
raise Exception(f"Process not found: {name}")
8282
return process[0]
8383

DMMGamePlayerFastLauncher/static/env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99

1010
class Env(Dump):
11-
VERSION = "v6.2.0"
11+
VERSION = "v6.2.1"
1212
RELEASE_VERSION = requests.get(UrlConfig.RELEASE_API).json().get("tag_name", VERSION)
1313

1414
DEVELOP: bool = os.environ.get("ENV") == "DEVELOP"

setup.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "DMMGamePlayerFastLauncher"
5-
#define MyAppVersion "6.2.0"
5+
#define MyAppVersion "6.2.1"
66
#define MyAppPublisher "yuki"
77
#define MyAppURL "https://github.com/fa0311/DMMGamePlayerFastLauncher"
88
#define MyAppExeName "DMMGamePlayerFastLauncher.exe"

0 commit comments

Comments
 (0)