pen: Added Cocoa backend.

This commit is contained in:
Ryan C. Gordon committed 2024-08-09 22:09:23 -04:00
1 parent a9d70dbacb
commit b4ca15b654
8 files changed
+248 -2

No files matched your search

+2 -2
View File
@@ -171,7 +171,7 @@ int SDL_AppEvent(void *appstate, const SDL_Event *event)
/*SDL_Log("Pen %" SDL_PRIu32 " button %d down!", event->pbutton.which, (int) event->pbutton.button);*/
pen = FindPen(event->ptouch.which);
if (pen) {
pen->buttons |= (1 << event->pbutton.button);
pen->buttons |= (1 << (event->pbutton.button-1));
}
return SDL_APP_CONTINUE;
@@ -179,7 +179,7 @@ int SDL_AppEvent(void *appstate, const SDL_Event *event)
/*SDL_Log("Pen %" SDL_PRIu32 " button %d up!", event->pbutton.which, (int) event->pbutton.button);*/
pen = FindPen(event->ptouch.which);
if (pen) {
pen->buttons &= ~(1 << event->pbutton.button);
pen->buttons &= ~(1 << (event->pbutton.button-1));
}
return SDL_APP_CONTINUE;