Skip to content

Commit

Permalink
Fixes mouse cursor bug that prevents mouse movement when the left/rig…
Browse files Browse the repository at this point in the history
…ht mouse button is held down. (libretro#16942)
  • Loading branch information
michael-leroy authored Aug 31, 2024
1 parent b3af19f commit 73b456e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/drivers/ui_cocoatouch.m
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ - (UIPointerRegion *)pointerInteraction:(UIPointerInteraction *)interaction
defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4))
{
cocoa_input_data_t *apple = (cocoa_input_data_t*) input_state_get_ptr()->current_data;
if (!apple)
if (!apple || apple->mouse_grabbed)
return nil;
CGPoint location = [apple_platform.renderView convertPoint:[request location] fromView:nil];
apple->touches[0].screen_x = (int16_t)(location.x * [[UIScreen mainScreen] scale]);
Expand Down

0 comments on commit 73b456e

Please sign in to comment.