WindowServer: Scale Mouse movements
This fixes a bug where if the current screen was using scaling, the mouse would be twice as fast as normal.
This commit is contained in:
parent
e59bf87374
commit
a2a3f5228a
Notes:
sideshowbarker
2024-07-18 11:34:03 +09:00
Author: https://github.com/ElectrodeYT Commit: https://github.com/SerenityOS/serenity/commit/a2a3f5228ad Pull-request: https://github.com/SerenityOS/serenity/pull/8224 Reviewed-by: https://github.com/alimpfard
1 changed files with 1 additions and 1 deletions
|
@ -268,7 +268,7 @@ void ScreenInput::on_receive_mouse_data(const MousePacket& packet)
|
|||
m_cursor_location.translate_by(packet.x * m_acceleration_factor, packet.y * m_acceleration_factor);
|
||||
dbgln_if(WSSCREEN_DEBUG, "Screen: New Relative mouse point @ {}", m_cursor_location);
|
||||
} else {
|
||||
m_cursor_location = { packet.x * current_screen.physical_width() / 0xffff, packet.y * current_screen.physical_height() / 0xffff };
|
||||
m_cursor_location = { packet.x * current_screen.width() / 0xffff, packet.y * current_screen.height() / 0xffff };
|
||||
dbgln_if(WSSCREEN_DEBUG, "Screen: New Absolute mouse point @ {}", m_cursor_location);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue