mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 06:47:19 +00:00
[client] core: clamp the local position to the dstRect correctly
When running in a mode that is letterboxed the dstRect origin is not 0x0
This commit is contained in:
parent
9dd11b5e04
commit
bdfb18299d
@ -322,8 +322,10 @@ void core_handleGuestMouseUpdate(void)
|
||||
util_guestCurToLocal(&localPos);
|
||||
g_state.ds->guestPointerUpdated(
|
||||
g_cursor.guest.x, g_cursor.guest.y,
|
||||
util_clamp(localPos.x, 0.0, g_state.dstRect.w),
|
||||
util_clamp(localPos.y, 0.0, g_state.dstRect.h)
|
||||
util_clamp(localPos.x, g_state.dstRect.x,
|
||||
g_state.dstRect.x + g_state.dstRect.w),
|
||||
util_clamp(localPos.y, g_state.dstRect.y,
|
||||
g_state.dstRect.y + g_state.dstRect.h)
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user