mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 06:44:27 +00:00
Merge pull request #10459 from AlexKornitzer/feature/cocoa-fix
ui_cocoa: fix mouse input for cocoa
This commit is contained in:
commit
51183787af
@ -139,6 +139,7 @@ static void app_terminate(void)
|
||||
#if defined(HAVE_COCOA_METAL)
|
||||
pos = [apple_platform.renderView convertPoint:[event locationInWindow] fromView:nil];
|
||||
#elif defined(HAVE_COCOA)
|
||||
pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil];
|
||||
#endif
|
||||
apple->touches[0].screen_x = (int16_t)pos.x;
|
||||
apple->touches[0].screen_y = (int16_t)pos.y;
|
||||
@ -172,6 +173,7 @@ static void app_terminate(void)
|
||||
if (!apple || pos.y < 0)
|
||||
return;
|
||||
apple->mouse_buttons |= (1 << event.buttonNumber);
|
||||
apple->touch_count = 1;
|
||||
}
|
||||
break;
|
||||
case NSEventTypeLeftMouseUp:
|
||||
|
Loading…
x
Reference in New Issue
Block a user