From cab9a4fcd76118fb476a4f851d9928b67ca97f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 30 Jul 2026 18:27:38 +0200 Subject: [PATCH] Remove obsolete code --- UI/NativeApp.cpp | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 964d6ef215..3ccdba5b7f 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -191,7 +191,6 @@ static Draw::DrawContext *g_draw; static Draw::Pipeline *colorPipeline; static Draw::Pipeline *texColorPipeline; static UIContext *uiContext; -static int g_restartGraphics; static bool g_windowHidden = false; static std::string g_achievementsHostOverride; static std::string g_savedAchievementsHost; @@ -1024,18 +1023,6 @@ void NativeFrame(GraphicsContext *graphicsContext) { } } - // This can only be accessed from Windows currently, and causes linking errors with headless etc. - if (g_restartGraphics == 1) { - // Used for debugging only. - NativeShutdownGraphics(graphicsContext); - g_restartGraphics++; - return; - } - else if (g_restartGraphics == 2) { - NativeInitGraphics(graphicsContext); - g_restartGraphics = 0; - } - double startTime = time_now_d(); ProcessWheelRelease(NKCODE_EXT_MOUSEWHEEL_UP, startTime, false); @@ -1210,7 +1197,6 @@ void NativeFrame(GraphicsContext *graphicsContext) { bool HandleGlobalMessage(UIMessage message, const std::string &value) { if (message == UIMessage::RESTART_GRAPHICS) { - g_restartGraphics = 1; return true; } else if (message == UIMessage::SAVESTATE_DISPLAY_SLOT) { auto sy = GetI18NCategory(I18NCat::SYSTEM);