Browse Source

Mac: Trigger SDL_FINGERUP for all touches.

Fixes bug #2348. Thanks to Alex Szpakowski for the patch!
J?rgen P. Tjern? 11 năm trước cách đây
mục cha
commit
8f660a4627
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      src/video/cocoa/SDL_cocoawindow.m

+ 3 - 1
src/video/cocoa/SDL_cocoawindow.m

@@ -699,9 +699,11 @@ SetWindowStyle(SDL_Window * window, unsigned int style)
             touches = [event touchesMatchingPhase:NSTouchPhaseBegan inView:nil];
             break;
         case COCOA_TOUCH_UP:
-        case COCOA_TOUCH_CANCELLED:
             touches = [event touchesMatchingPhase:NSTouchPhaseEnded inView:nil];
             break;
+        case COCOA_TOUCH_CANCELLED:
+            touches = [event touchesMatchingPhase:NSTouchPhaseCancelled inView:nil];
+            break;
         case COCOA_TOUCH_MOVE:
             touches = [event touchesMatchingPhase:NSTouchPhaseMoved inView:nil];
             break;