Fix compiler warning in Cocoa touch code
authorSam Lantinga <slouken@libsdl.org>
Sun, 03 Mar 2013 08:41:50 -0800
changeset 6953 b83579d7d19a
parent 6952 d2e309e7f77c
child 6954 65f66d01e17a
Fix compiler warning in Cocoa touch code
src/video/cocoa/SDL_cocoawindow.m
--- a/src/video/cocoa/SDL_cocoawindow.m	Sun Mar 03 08:32:08 2013 -0800
+++ b/src/video/cocoa/SDL_cocoawindow.m	Sun Mar 03 08:41:50 2013 -0800
@@ -408,14 +408,14 @@
     enumerator = [touches objectEnumerator];
     touch = (NSTouch*)[enumerator nextObject];
     while (touch) {
-        const SDL_TouchID touchId = (SDL_TouchID)[touch device];
+        const SDL_TouchID touchId = (SDL_TouchID)(intptr_t)[touch device];
         if (!SDL_GetTouch(touchId)) {
             if (SDL_AddTouch(touchId, "") < 0) {
                 return;
             }
         } 
 
-        const SDL_FingerID fingerId = (SDL_FingerID)[touch identity];
+        const SDL_FingerID fingerId = (SDL_FingerID)(intptr_t)[touch identity];
         float x = [touch normalizedPosition].x;
         float y = [touch normalizedPosition].y;
         /* Make the origin the upper left instead of the lower left */