From 834f8bf1d6b67d0ae5f52338727855d4a3dbc706 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 7 Jul 2022 18:15:35 +0200 Subject: [PATCH] Log output is now flushed before game launch. --- es-app/src/FileData.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index 8dc6b2638..1572ebd29 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -1530,6 +1530,12 @@ void FileData::launchGame() command = "flatpak-spawn --host " + command; #endif + // Flush the log buffer to es_log.txt, otherwise game launch logging will only be written + // once we have returned from the game. + if (!runInBackground) { + Log::flush(); + } + // Possibly keep ES-DE running in the background while the game is launched. #if defined(_WIN64)