From f812c9d6c5d3d9ce6d7d568673ca27fa3c44b91f Mon Sep 17 00:00:00 2001 From: Adam Bird Date: Wed, 15 Jan 2025 21:58:59 -0500 Subject: [PATCH] Switch flag for ImGui MacOS behaviors --- src/window/gui/Gui.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/window/gui/Gui.cpp b/src/window/gui/Gui.cpp index fad42a985..eeb6b579f 100644 --- a/src/window/gui/Gui.cpp +++ b/src/window/gui/Gui.cpp @@ -121,6 +121,12 @@ void Gui::Init(GuiWindowInitData windowImpl) { mImGuiIo->Fonts->AddFontFromMemoryCompressedBase85TTF(fontawesome_compressed_data_base85, iconFontSize, &iconsConfig, sIconsRanges); +#ifdef __APPLE__ + // Starting in ImGui 1.91, the behavior of Super and Ctrl keys on Mac was swapped by default + // Set the behavior off to restore hotkey support i.e. Cmd+R game reset and Ctrl+LeftClick on input fields + mImGuiIo->ConfigMacOSXBehaviors = false; +#endif + #if defined(__ANDROID__) // Scale everything by 2 for Android ImGui::GetStyle().ScaleAllSizes(2.0f);