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

+2
View File
@@ -1262,6 +1262,8 @@ int plat_os_version(char *out, size_t cap) {
int plat_is_wine(void) { return 0; }
int plat_console_release_if_owned(void) { return 0; }
int plat_stderr_path(char *out, size_t cap) {
struct stat st;
if (fstat(2, &st) || !S_ISREG(st.st_mode)) return 0;