mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 06:09:58 -04:00
Show Navi as the game's icon, and start the game from the launcher without an empty console window.
runtime/nx2navi.ico (the game window's title bar, taskbar button and Alt+Tab icon) is now the launcher's Navi, written from launcher/ui/art.py navi_ico at the same ten sizes, in place of the Triforce. ocarina.exe is a console program and the launcher has none, so Windows opened a console window titled with the exe's path beside the game; winsys.start_game now passes CREATE_NO_WINDOW. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -150,9 +150,12 @@ def open_path(path):
|
||||
|
||||
|
||||
def start_game(exe):
|
||||
"""Start the game from its own folder; returns the process to watch."""
|
||||
"""Start the game from its own folder; returns the process to watch. ocarina.exe is a console program and the
|
||||
launcher has no console, so without CREATE_NO_WINDOW Windows opened an empty console window beside the game,
|
||||
titled with the exe's path. With it the game still has a console (hidden), which its restarts inherit."""
|
||||
exe = Path(exe)
|
||||
flags = {'creationflags': CREATE_NEW_PROCESS_GROUP} if os.name == 'nt' else {'start_new_session': True}
|
||||
flags = {'creationflags': CREATE_NO_WINDOW | CREATE_NEW_PROCESS_GROUP} if os.name == 'nt' \
|
||||
else {'start_new_session': True}
|
||||
return subprocess.Popen([str(exe)], cwd=str(exe.parent), stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL, close_fds=True, **flags)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user