Skip to content

Commit

Permalink
current_running_processes was adding stale processes to self.running_…
Browse files Browse the repository at this point in the history
…processes, which caused unity 4 games to show running even after ended
  • Loading branch information
fastrizwaan committed Sep 9, 2024
1 parent 5ccb39e commit 2232879
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions winecharm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1307,20 +1307,15 @@ def update_ui_for_running_process(self, script_key, row, current_running_process
self.launch_button.set_tooltip_text("Stop")

def cleanup_ended_processes(self, current_running_processes):

for script_key in list(self.running_processes.keys()):
if script_key not in current_running_processes:
self.process_ended(script_key)


for exe_name in list(self.running_processes.keys()):
if exe_name not in current_running_processes:
self.process_ended(exe_name)

# If no more processes are running, reset all UI elements
if not current_running_processes:
self.reset_all_ui_elements()

self.running_processes = current_running_processes
#self.running_processes = current_running_processes

def find_row_by_script_key(self, script_key):
return self.script_buttons.get(script_key)
Expand Down Expand Up @@ -2050,6 +2045,7 @@ def get_product_name(self, exe_file):
return productname_match.group(1).strip() if productname_match else None

def process_ended(self, script_key):

process_info = self.running_processes.get(script_key)

if process_info:
Expand Down

0 comments on commit 2232879

Please sign in to comment.