summaryrefslogtreecommitdiff
path: root/src/yuzu/debugger/console.cpp
diff options
context:
space:
mode:
authorZephyron <zephyron@citron-emu.org>2024-12-31 16:19:25 +1000
committerZephyron <zephyron@citron-emu.org>2024-12-31 16:19:25 +1000
commit9427e27e24a7135880ee2881c3c44988e174b41a (patch)
tree83f0062a35be144f6b162eaa823c5b3c7620146e /src/yuzu/debugger/console.cpp
parentb35ae725d20960411e8588b11c12a2d55f86c9d0 (diff)
chore: update project branding to citron
Diffstat (limited to 'src/yuzu/debugger/console.cpp')
-rw-r--r--src/yuzu/debugger/console.cpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/yuzu/debugger/console.cpp b/src/yuzu/debugger/console.cpp
deleted file mode 100644
index 1c1342ff1..000000000
--- a/src/yuzu/debugger/console.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project
-// SPDX-License-Identifier: GPL-2.0-or-later
-
-#ifdef _WIN32
-#include <windows.h>
-
-#include <wincon.h>
-#endif
-
-#include "common/logging/backend.h"
-#include "yuzu/debugger/console.h"
-#include "yuzu/uisettings.h"
-
-namespace Debugger {
-void ToggleConsole() {
- static bool console_shown = false;
- if (console_shown == UISettings::values.show_console.GetValue()) {
- return;
- } else {
- console_shown = UISettings::values.show_console.GetValue();
- }
-
- using namespace Common::Log;
-#if defined(_WIN32) && !defined(_DEBUG)
- FILE* temp;
- if (UISettings::values.show_console) {
- if (AllocConsole()) {
- // The first parameter for freopen_s is a out parameter, so we can just ignore it
- freopen_s(&temp, "CONIN$", "r", stdin);
- freopen_s(&temp, "CONOUT$", "w", stdout);
- freopen_s(&temp, "CONOUT$", "w", stderr);
- SetConsoleOutputCP(65001);
- SetColorConsoleBackendEnabled(true);
- }
- } else {
- if (FreeConsole()) {
- // In order to close the console, we have to also detach the streams on it.
- // Just redirect them to NUL if there is no console window
- SetColorConsoleBackendEnabled(false);
- freopen_s(&temp, "NUL", "r", stdin);
- freopen_s(&temp, "NUL", "w", stdout);
- freopen_s(&temp, "NUL", "w", stderr);
- }
- }
-#else
- SetColorConsoleBackendEnabled(UISettings::values.show_console.GetValue());
-#endif
-}
-} // namespace Debugger