Fixes mouse cursor bug that prevents mouse movement when the left/right mouse button is held down. (#16942)

This commit is contained in:
michael-leroy 2024-08-31 04:54:20 -07:00 committed by GitHub
parent b3af19f65f
commit 73b456e307
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -884,7 +884,7 @@ enum
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]);