mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-30 04:50:11 +08:00
[fix] use relative percentage-based mouse mapping instead of absolute positions
This commit is contained in:
@@ -20,8 +20,8 @@ int MouseController::SendMouseCommand(RemoteAction remote_action) {
|
||||
|
||||
if (remote_action.type == ControlType::mouse) {
|
||||
ip.type = INPUT_MOUSE;
|
||||
ip.mi.dx = (LONG)remote_action.m.x;
|
||||
ip.mi.dy = (LONG)remote_action.m.y;
|
||||
ip.mi.dx = (LONG)(remote_action.m.x * screen_width_);
|
||||
ip.mi.dy = (LONG)(remote_action.m.y * screen_height_);
|
||||
|
||||
switch (remote_action.m.flag) {
|
||||
case MouseFlag::left_down:
|
||||
|
||||
Reference in New Issue
Block a user