summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/yuzu.cpp
diff options
context:
space:
mode:
authorChris Oboe <github@oboe.email>2022-12-24 03:39:59 +0100
committerGitHub <noreply@github.com>2022-12-23 21:39:59 -0500
commit201733d1b52a98f58ff4bd81a932c69d5b833a29 (patch)
treefd9de3713e5d091b995e1ba499a605e1041aec97 /src/yuzu_cmd/yuzu.cpp
parentdb15142ac98f3fbb23fd7b9e952392915e0ed97a (diff)
Disable automatically opening the console on windows yuzu-cmd builds (#9485)
* don't automatically open the console on windows build of yuzu-cmd * fix formatting
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r--src/yuzu_cmd/yuzu.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index a80649703..91133569d 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -174,6 +174,13 @@ static void OnStatusMessageReceived(const Network::StatusMessageEntry& msg) {
/// Application entry point
int main(int argc, char** argv) {
+#ifdef _WIN32
+ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
+ freopen("CONOUT$", "wb", stdout);
+ freopen("CONOUT$", "wb", stderr);
+ }
+#endif
+
Common::Log::Initialize();
Common::Log::SetColorConsoleBackendEnabled(true);
Common::Log::Start();