Skip to content

Commit 2e7d1fe

Browse files
authored
Switch flag for ImGui MacOS behaviors (Kenix3#791)
1 parent 82a3406 commit 2e7d1fe

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/window/gui/Gui.cpp

+1-9
Original file line numberDiff line numberDiff line change
@@ -499,21 +499,13 @@ void Gui::DrawMenu() {
499499
}
500500
}
501501

502-
#if __APPLE__
503-
if ((ImGui::IsKeyDown(ImGuiKey_LeftSuper) || ImGui::IsKeyDown(ImGuiKey_RightSuper)) &&
504-
ImGui::IsKeyPressed(ImGuiKey_R, false)) {
505-
std::reinterpret_pointer_cast<ConsoleWindow>(
506-
Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))
507-
->Dispatch("reset");
508-
}
509-
#else
502+
// Mac interprets this as cmd+r when io.ConfigMacOSXBehavior is on (on by default)
510503
if ((ImGui::IsKeyDown(ImGuiKey_LeftCtrl) || ImGui::IsKeyDown(ImGuiKey_RightCtrl)) &&
511504
ImGui::IsKeyPressed(ImGuiKey_R, false)) {
512505
std::reinterpret_pointer_cast<ConsoleWindow>(
513506
Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Console"))
514507
->Dispatch("reset");
515508
}
516-
#endif
517509

518510
if (GetMenuBar()) {
519511
GetMenuBar()->Update();

0 commit comments

Comments
 (0)