Skip to content

Commit

Permalink
Switch flag for ImGui MacOS behaviors
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez committed Jan 16, 2025
1 parent 9a974e0 commit f812c9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/window/gui/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f812c9d

Please sign in to comment.