From 07237b9926c701bae01b0876cab0289f46a0b124 Mon Sep 17 00:00:00 2001 From: Dimitriy Ryazantcev Date: Wed, 8 Jan 2025 16:55:31 +0200 Subject: [PATCH] Update Mouse.cpp Use USER_DEFAULT_SCREEN_DPI define instead of 96 value. --- Src/Mouse.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Src/Mouse.cpp b/Src/Mouse.cpp index 61f71822..48d8a3d8 100644 --- a/Src/Mouse.cpp +++ b/Src/Mouse.cpp @@ -533,7 +533,7 @@ class Mouse::Impl explicit Impl(Mouse* owner) noexcept(false) : mState{}, mOwner(owner), - mDPI(96.f), + mDPI(USER_DEFAULT_SCREEN_DPI), mMode(MODE_ABSOLUTE), mAutoReset(true), mLastX(0), @@ -906,8 +906,8 @@ class Mouse::Impl const float dpi = s_mouse->mDPI; - s_mouse->mState.x = static_cast(pos.X * dpi / 96.f + 0.5f); - s_mouse->mState.y = static_cast(pos.Y * dpi / 96.f + 0.5f); + s_mouse->mState.x = static_cast(pos.X * dpi / USER_DEFAULT_SCREEN_DPI + 0.5f); + s_mouse->mState.y = static_cast(pos.Y * dpi / USER_DEFAULT_SCREEN_DPI + 0.5f); } return S_OK; @@ -970,8 +970,8 @@ class Mouse::Impl float dpi = s_mouse->mDPI; - s_mouse->mState.x = static_cast(pos.X * dpi / 96.f + 0.5f); - s_mouse->mState.y = static_cast(pos.Y * dpi / 96.f + 0.5f); + s_mouse->mState.x = static_cast(pos.X * dpi / USER_DEFAULT_SCREEN_DPI + 0.5f); + s_mouse->mState.y = static_cast(pos.Y * dpi / USER_DEFAULT_SCREEN_DPI + 0.5f); } }