From: Santino Mazza smazza@codeweavers.com
--- dlls/dinput/mouse.c | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/dlls/dinput/mouse.c b/dlls/dinput/mouse.c index eec022974b5..0cf2c4cd4dd 100644 --- a/dlls/dinput/mouse.c +++ b/dlls/dinput/mouse.c @@ -209,12 +209,17 @@ int dinput_mouse_hook( IDirectInputDevice8W *iface, WPARAM wparam, LPARAM lparam switch(wparam) { case WM_MOUSEMOVE: { + DPI_AWARENESS_CONTEXT context; POINT pt, pt1;
+ context = SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE); + GetCursorPos(&pt); state->lX += pt.x = hook->pt.x - pt.x; state->lY += pt.y = hook->pt.y - pt.y;
+ SetThreadDpiAwarenessContext(context); + if (impl->base.user_format.dwFlags & DIDF_ABSAXIS) { pt1.x = state->lX;