Close the game's own console and bring its window to the front (#208, #521)

A game started from a frontend (Playnite, RetroBat, ES-DE) or a shortcut got a console beside it, and its window
opened behind other windows, out of reach without a mouse. Once the log file is open, the console is freed when no
other process shares it; a terminal launch keeps its output, and show_console = 1 keeps the console. The window is
raised at start, with AttachThreadInput when Windows refuses the foreground. rt_fatal writes only to the log, and a
console owned by the game closed with it anyway, so no error text is lost.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-03 20:09:23 +03:00
1 parent 3422952e85
commit d2fbe0a2b1
7 files changed
+52 -7

No files matched your search

+4
View File
@@ -325,6 +325,10 @@
# cheat_0123abcd = 1
[diagnostics]
# Keep the console window of a game started from a frontend (Playnite, RetroBat, ES-DE) or a shortcut. Default 0: the
# console that Windows opened for the game alone is closed once the log is open. A game started from a terminal keeps
# printing there either way; the log is logs\totk.log.
# show_console = 0
# Extra lines in the log, comma separated: svc, host, ipc, fs, gfx, perf, sched, audio, present or all. The menu's
# Performance log sets perf (frame timings). Default: none.
# trace = perf