Fixed issue with touch input on retina displays
authorSam Lantinga <slouken@libsdl.org>
Sat, 29 Sep 2012 17:38:54 -0700
changeset 6519 fc926eedd78a
parent 6518 42948831d16e
child 6520 7a7726af31c1
Fixed issue with touch input on retina displays
src/video/uikit/SDL_uikitview.m
--- a/src/video/uikit/SDL_uikitview.m	Sat Sep 29 17:23:40 2012 -0700
+++ b/src/video/uikit/SDL_uikitview.m	Sat Sep 29 17:38:54 2012 -0700
@@ -85,13 +85,14 @@
     SDL_Window *window = self->viewcontroller.window;
     SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
     SDL_DisplayModeData *displaymodedata = (SDL_DisplayModeData *) display->current_mode.driverdata;
-    point.x *= displaymodedata->scale;
-    point.y *= displaymodedata->scale;
     
     if (normalize) {
         CGRect bounds = [self bounds];
         point.x /= bounds.size.width;
         point.y /= bounds.size.height;
+    } else {
+        point.x *= displaymodedata->scale;
+        point.y *= displaymodedata->scale;
     }
     return point;
 }