From 048ccc9b7904377e1cf4d6af9d152841e8c1437f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 29 Apr 2023 11:21:34 +0200 Subject: [PATCH] Mac: Restart the app when changing rendering backend. --- SDL/CocoaBarItems.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SDL/CocoaBarItems.mm b/SDL/CocoaBarItems.mm index 564cf72b04..0d523a3c19 100644 --- a/SDL/CocoaBarItems.mm +++ b/SDL/CocoaBarItems.mm @@ -18,6 +18,7 @@ #include "GPU/GPUInterface.h" #include "Common/File/Path.h" #include "Common/System/System.h" +#include "Common/System/Request.h" #include "Common/System/NativeApp.h" #include "Core/Config.h" #include "Common/Data/Text/I18n.h" @@ -551,6 +552,10 @@ TOGGLE_METHOD(ShowDebugStats, g_Config.bShowDebugStats, NativeMessageReceived("c break; } } + + // TODO: Use same command line params as the previous startup? + // Note that this does a clean shutdown, so the config will be saved automatically. + System_RestartApp(""); } -(NSControlStateValue) controlStateForBool: (BOOL)boolValue {