mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 00:09:24 +01:00
Fix DInput cursor going to +infinite if the window size was 0
This commit is contained in:
parent
75f35393c3
commit
5a5c815ff0
@ -126,9 +126,9 @@ void KeyboardMouse::UpdateCursorInput()
|
|||||||
RECT rect;
|
RECT rect;
|
||||||
GetClientRect(m_hwnd, &rect);
|
GetClientRect(m_hwnd, &rect);
|
||||||
|
|
||||||
// Width and height are the size of the rendering window.
|
// Width and height are the size of the rendering window. They could be 0
|
||||||
const auto win_width = rect.right - rect.left;
|
const auto win_width = std::max(rect.right - rect.left, 1l);
|
||||||
const auto win_height = rect.bottom - rect.top;
|
const auto win_height = std::max(rect.bottom - rect.top, 1l);
|
||||||
|
|
||||||
const auto window_scale = g_controller_interface.GetWindowInputScale();
|
const auto window_scale = g_controller_interface.GetWindowInputScale();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user