This commit is contained in:
kramo
2023-03-25 00:50:17 +01:00
parent 41c97e1af7
commit 030c220d7e
2 changed files with 3 additions and 5 deletions

View File

@@ -80,9 +80,7 @@ class game(Gtk.Box): # pylint: disable=invalid-name
subprocess.Popen( subprocess.Popen(
["flatpak-spawn", "--host", *self.executable] # Flatpak ["flatpak-spawn", "--host", *self.executable] # Flatpak
if os.getenv("FLATPAK_ID") == "hu.kramo.Cartridges" if os.getenv("FLATPAK_ID") == "hu.kramo.Cartridges"
else self.executable # Windows else self.executable, # Others
if os.name == "nt"
else self.executable, # Linux/Others
start_new_session=True, start_new_session=True,
creationflags=subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0, creationflags=subprocess.CREATE_NEW_PROCESS_GROUP if os.name == "nt" else 0,
) )

View File

@@ -206,13 +206,13 @@ def create_details_window(parent_widget, game_id=None):
final_executable_split = shlex.split( final_executable_split = shlex.split(
final_executable, comments=False, posix=True final_executable, comments=False, posix=True
) )
except Exception as e: except ValueError as exception:
create_dialog( create_dialog(
window, window,
_("Couldn't Add Game") _("Couldn't Add Game")
if game_id is None if game_id is None
else _("Couldn't Apply Preferences"), else _("Couldn't Apply Preferences"),
f'{_("Executable")}: {e}.', # e = Shell parsing error message. Not translatable. f'{_("Executable")}: {exception}.',
) )
return return