mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Cleanups
This commit is contained in:
parent
1fa89b642a
commit
f5417943c7
1 changed files with 9 additions and 9 deletions
|
@ -121,7 +121,7 @@ static void app_terminate(void)
|
||||||
case NSEventTypeRightMouseDragged:
|
case NSEventTypeRightMouseDragged:
|
||||||
case NSEventTypeOtherMouseDragged:
|
case NSEventTypeOtherMouseDragged:
|
||||||
{
|
{
|
||||||
NSPoint pos;
|
CGPoint pos;
|
||||||
apple = (cocoa_input_data_t*)input_driver_get_data();
|
apple = (cocoa_input_data_t*)input_driver_get_data();
|
||||||
if (!apple)
|
if (!apple)
|
||||||
return;
|
return;
|
||||||
|
@ -166,13 +166,13 @@ static void app_terminate(void)
|
||||||
case NSEventTypeRightMouseDown:
|
case NSEventTypeRightMouseDown:
|
||||||
case NSEventTypeOtherMouseDown:
|
case NSEventTypeOtherMouseDown:
|
||||||
{
|
{
|
||||||
NSInteger number = event.buttonNumber;
|
NSInteger number = event.buttonNumber;
|
||||||
#ifdef HAVE_COCOA_METAL
|
#ifdef HAVE_COCOA_METAL
|
||||||
NSPoint pos = [apple_platform.renderView convertPoint:[event locationInWindow] fromView:nil];
|
CGPoint pos = [apple_platform.renderView convertPoint:[event locationInWindow] fromView:nil];
|
||||||
#else
|
#else
|
||||||
NSPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil];
|
CGPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil];
|
||||||
#endif
|
#endif
|
||||||
apple = (cocoa_input_data_t*)input_driver_get_data();
|
apple = (cocoa_input_data_t*)input_driver_get_data();
|
||||||
if (!apple || pos.y < 0)
|
if (!apple || pos.y < 0)
|
||||||
return;
|
return;
|
||||||
apple->mouse_buttons |= (1 << number);
|
apple->mouse_buttons |= (1 << number);
|
||||||
|
@ -183,13 +183,13 @@ static void app_terminate(void)
|
||||||
case NSEventTypeRightMouseUp:
|
case NSEventTypeRightMouseUp:
|
||||||
case NSEventTypeOtherMouseUp:
|
case NSEventTypeOtherMouseUp:
|
||||||
{
|
{
|
||||||
NSInteger number = event.buttonNumber;
|
NSInteger number = event.buttonNumber;
|
||||||
#ifdef HAVE_COCOA_METAL
|
#ifdef HAVE_COCOA_METAL
|
||||||
NSPoint pos = [apple_platform.renderView convertPoint:[event locationInWindow] fromView:nil];
|
CGPoint pos = [apple_platform.renderView convertPoint:[event locationInWindow] fromView:nil];
|
||||||
#else
|
#else
|
||||||
NSPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil];
|
CGPoint pos = [[CocoaView get] convertPoint:[event locationInWindow] fromView:nil];
|
||||||
#endif
|
#endif
|
||||||
apple = (cocoa_input_data_t*)input_driver_get_data();
|
apple = (cocoa_input_data_t*)input_driver_get_data();
|
||||||
if (!apple || pos.y < 0)
|
if (!apple || pos.y < 0)
|
||||||
return;
|
return;
|
||||||
apple->mouse_buttons &= ~(1 << number);
|
apple->mouse_buttons &= ~(1 << number);
|
||||||
|
|
Loading…
Add table
Reference in a new issue