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); } }