Mercurial > sdl-ios-xcode
comparison src/video/cocoa/SDL_cocoawindow.m @ 4678:f8431f66613d
Added SDL_TouchID, SDL_FingerID, SDL_GestureID types. Converted to integer cioordinates (<- not working).
author | jimtla |
---|---|
date | Sat, 31 Jul 2010 20:02:54 +0400 |
parents | 99b4560b7aa1 |
children | 5ee96ba0c01e |
comparison
equal
deleted
inserted
replaced
4677:31607094315c | 4678:f8431f66613d |
---|---|
302 SDL_Touch touch; | 302 SDL_Touch touch; |
303 | 303 |
304 touch.id = touchId; | 304 touch.id = touchId; |
305 touch.x_min = 0; | 305 touch.x_min = 0; |
306 touch.x_max = 1; | 306 touch.x_max = 1; |
307 touch.xres = touch.x_max - touch.x_min; | 307 touch.native_xres = touch.x_max - touch.x_min; |
308 touch.y_min = 0; | 308 touch.y_min = 0; |
309 touch.y_max = 1; | 309 touch.y_max = 1; |
310 touch.yres = touch.y_max - touch.y_min; | 310 touch.native_yres = touch.y_max - touch.y_min; |
311 touch.pressure_min = 0; | 311 touch.pressure_min = 0; |
312 touch.pressure_max = 1; | 312 touch.pressure_max = 1; |
313 touch.pressureres = touch.pressure_max - touch.pressure_min; | 313 touch.native_pressureres = touch.pressure_max - touch.pressure_min; |
314 | 314 |
315 if (SDL_AddTouch(&touch, "") < 0) { | 315 if (SDL_AddTouch(&touch, "") < 0) { |
316 continue; | 316 continue; |
317 } | 317 } |
318 printf("Success, added touch: %lin",touchId); | 318 printf("Success, added touch: %lin",touchId); |