mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Fix Quartz cursor going to +infinite if the window size was 0
This commit is contained in:
@ -188,8 +188,8 @@ void KeyboardAndMouse::UpdateInput()
|
||||
|
||||
loc.x -= bounds.origin.x;
|
||||
loc.y -= bounds.origin.y;
|
||||
m_cursor.x = (loc.x / bounds.size.width * 2 - 1.0) * window_scale.x;
|
||||
m_cursor.y = (loc.y / bounds.size.height * 2 - 1.0) * window_scale.y;
|
||||
m_cursor.x = (loc.x / std::max(bounds.size.width, 1.0) * 2 - 1.0) * window_scale.x;
|
||||
m_cursor.y = (loc.y / std::max(bounds.size.height, 1.0) * 2 - 1.0) * window_scale.y;
|
||||
}
|
||||
|
||||
std::string KeyboardAndMouse::GetName() const
|
||||
|
Reference in New Issue
Block a user