From a0ba78ded25a2bcacc537b63f7d2f9b6fa5b7cbf Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 6 Jul 2021 16:07:56 -0400 Subject: [PATCH 1/2] WiimoteEmu: Use proper names for left, right, and middle click on Quartz ciface --- Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp b/Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp index f225898dce..4ccf02fc17 100644 --- a/Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp +++ b/Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp @@ -613,6 +613,11 @@ void Wiimote::LoadDefaults(const ControllerInterface& ciface) m_buttons->SetControlExpression(0, "`Click 1`"); // B m_buttons->SetControlExpression(1, "`Click 3`"); +#elif __APPLE__ + // A + m_buttons->SetControlExpression(0, "`Left Click`"); + // B + m_buttons->SetControlExpression(1, "`Right Click`"); #else // A m_buttons->SetControlExpression(0, "`Click 0`"); @@ -633,7 +638,11 @@ void Wiimote::LoadDefaults(const ControllerInterface& ciface) // Shake for (int i = 0; i < 3; ++i) +#ifdef __APPLE__ + m_shake->SetControlExpression(i, "`Middle Click`"); +#else m_shake->SetControlExpression(i, "`Click 2`"); +#endif // Pointing (IR) m_ir->SetControlExpression(0, "`Cursor Y-`"); From f6fabec644f54369394b0e57d171dae9f709b0a6 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 6 Jul 2021 16:16:52 -0400 Subject: [PATCH 2/2] FreeLookManager: Use proper names for left, right, and middle click on Quartz ciface --- Source/Core/Core/FreeLookManager.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Source/Core/Core/FreeLookManager.cpp b/Source/Core/Core/FreeLookManager.cpp index a5381655be..90f2667890 100644 --- a/Source/Core/Core/FreeLookManager.cpp +++ b/Source/Core/Core/FreeLookManager.cpp @@ -142,11 +142,17 @@ void FreeLookController::LoadDefaults(const ControllerInterface& ciface) m_fov_buttons->SetControlExpression(FieldOfViewButtons::DecreaseY, hotkey_string({"Shift", "`Axis Z-`"})); + // Left Click #if defined HAVE_X11 && HAVE_X11 m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp, "if(`Click 3`,`RelativeMouse Y-` * 0.10, 0)"); m_rotation_gyro->SetControlExpression(GyroButtons::PitchDown, "if(`Click 3`,`RelativeMouse Y+` * 0.10, 0)"); +#elif __APPLE__ + m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp, + "if(`Left Click`,`RelativeMouse Y-` * 0.10, 0)"); + m_rotation_gyro->SetControlExpression(GyroButtons::PitchDown, + "if(`Left Click`,`RelativeMouse Y+` * 0.10, 0)"); #else m_rotation_gyro->SetControlExpression(GyroButtons::PitchUp, "if(`Click 1`,`RelativeMouse Y-` * 0.10, 0)"); @@ -154,16 +160,30 @@ void FreeLookController::LoadDefaults(const ControllerInterface& ciface) "if(`Click 1`,`RelativeMouse Y+` * 0.10, 0)"); #endif + // Middle Click +#ifdef __APPLE__ + m_rotation_gyro->SetControlExpression(GyroButtons::RollLeft, + "if(`Middle Click`,`RelativeMouse X-` * 0.10, 0)"); + m_rotation_gyro->SetControlExpression(GyroButtons::RollRight, + "if(`Middle Click`,`RelativeMouse X+` * 0.10, 0)"); +#else m_rotation_gyro->SetControlExpression(GyroButtons::RollLeft, "if(`Click 2`,`RelativeMouse X-` * 0.10, 0)"); m_rotation_gyro->SetControlExpression(GyroButtons::RollRight, "if(`Click 2`,`RelativeMouse X+` * 0.10, 0)"); +#endif + // Right Click #if defined HAVE_X11 && HAVE_X11 m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft, "if(`Click 3`,`RelativeMouse X-` * 0.10, 0)"); m_rotation_gyro->SetControlExpression(GyroButtons::YawRight, "if(`Click 3`,`RelativeMouse X+` * 0.10, 0)"); +#elif __APPLE__ + m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft, + "if(`Right Click`,`RelativeMouse X-` * 0.10, 0)"); + m_rotation_gyro->SetControlExpression(GyroButtons::YawRight, + "if(`Right Click`,`RelativeMouse X+` * 0.10, 0)"); #else m_rotation_gyro->SetControlExpression(GyroButtons::YawLeft, "if(`Click 1`,`RelativeMouse X-` * 0.10, 0)");