mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 01:20:25 +00:00
Avoid warning for unused var in app.mm
This commit is contained in:
parent
dadd7443b6
commit
08d1593481
@ -239,36 +239,24 @@ void osx_event_handler()
|
||||
[NSApp sendEvent: event];
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
case NSLeftMouseUp:
|
||||
case NSOtherMouseUp:
|
||||
case NSRightMouseUp:
|
||||
if (osx_emulate_mouse_buttons) {
|
||||
if (event_type == NSLeftMouseDown) {
|
||||
if ((!osx_window) || (NSPointInRect(point, view))) {
|
||||
buttons = 0x1;
|
||||
if (key[KEY_ALT])
|
||||
buttons = 0x4;
|
||||
if (key[KEY_LCONTROL])
|
||||
buttons = 0x2;
|
||||
}
|
||||
}
|
||||
else if (event_type == NSLeftMouseUp)
|
||||
buttons &= ~0x7;
|
||||
}
|
||||
else {
|
||||
if ((!osx_window) || (NSPointInRect(point, view))) {
|
||||
/* Deliver mouse downs only if cursor is on the window */
|
||||
|
||||
buttons |= ((event_type == NSLeftMouseDown) ? 0x1 : 0);
|
||||
buttons |= ((event_type == NSRightMouseDown) ? 0x2 : 0);
|
||||
buttons |= ((event_type == NSOtherMouseDown) ? 0x4 : 0);
|
||||
}
|
||||
|
||||
[NSApp sendEvent: event];
|
||||
gotmouseevent = YES;
|
||||
break;
|
||||
|
||||
case NSLeftMouseUp:
|
||||
case NSOtherMouseUp:
|
||||
case NSRightMouseUp:
|
||||
buttons &= ~((event_type == NSLeftMouseUp) ? 0x1 : 0);
|
||||
buttons &= ~((event_type == NSRightMouseUp) ? 0x2 : 0);
|
||||
buttons &= ~((event_type == NSOtherMouseUp) ? 0x4 : 0);
|
||||
}
|
||||
gotmouseevent = YES;
|
||||
|
||||
[NSApp sendEvent: event];
|
||||
gotmouseevent = YES;
|
||||
break;
|
||||
|
||||
case NSLeftMouseDragged:
|
||||
|
@ -52,6 +52,8 @@ extern "C" int allegro_main(int argc, char *argv[], NSObject* app_delegate);
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
(void*)pool;
|
||||
|
||||
SheAppDelegate *app_delegate = [[SheAppDelegate alloc] init];
|
||||
return allegro_main(argc, argv, app_delegate);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user