summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Quartz
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Quartz')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm
index 55f212900d..9a8ddfc6df 100644
--- a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm
+++ b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm
@@ -244,7 +244,8 @@ Core::DeviceRemoval KeyboardAndMouse::UpdateInput()
const double window_width = std::max(bounds.size.width, 1.0);
const double window_height = std::max(bounds.size.height, 1.0);
- if (g_controller_interface.IsMouseCenteringRequested() && Host_RendererHasFocus())
+ if (g_controller_interface.IsMouseCenteringRequested() &&
+ (Host_RendererHasFocus() || Host_TASInputHasFocus()))
{
m_cursor.x = 0;
m_cursor.y = 0;
@@ -258,8 +259,13 @@ Core::DeviceRemoval KeyboardAndMouse::UpdateInput()
g_controller_interface.SetMouseCenteringRequested(false);
}
- else
+ else if (!Host_TASInputHasFocus())
{
+ // When a TAS Input window has focus and "Enable Controller Input" is checked most types of
+ // input should be read normally as if the render window had focus instead. The cursor is an
+ // exception, as otherwise using the mouse to set any control in the TAS Input window will also
+ // update the Wii IR value (or any other input controlled by the cursor).
+
NSPoint loc = [NSEvent mouseLocation];
const auto window_scale = g_controller_interface.GetWindowInputScale();