mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 00:20:01 +00:00
(OSX) Don't register click if we are on titlebar (we detect this for now
if y of location in windows' position is less than 0
This commit is contained in:
parent
5ff13df40f
commit
f5a38977d8
@ -148,20 +148,27 @@ static void app_terminate(void)
|
||||
case NSLeftMouseDown:
|
||||
case NSRightMouseDown:
|
||||
case NSOtherMouseDown:
|
||||
{
|
||||
NSPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil];
|
||||
apple = (cocoa_input_data_t*)input_driver_get_data();
|
||||
if (!apple)
|
||||
if (!apple || pos.y < 0)
|
||||
return;
|
||||
apple->mouse_buttons |= 1 << event.buttonNumber;
|
||||
apple->touch_count = 1;
|
||||
|
||||
apple->touch_count = 1;
|
||||
}
|
||||
break;
|
||||
case NSLeftMouseUp:
|
||||
case NSRightMouseUp:
|
||||
case NSOtherMouseUp:
|
||||
{
|
||||
NSPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil];
|
||||
apple = (cocoa_input_data_t*)input_driver_get_data();
|
||||
if (!apple)
|
||||
if (!apple || pos.y < 0)
|
||||
return;
|
||||
apple->mouse_buttons &= ~(1 << event.buttonNumber);
|
||||
apple->touch_count = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user