The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_FINGERDOWN gives wrong cursor position on MultiTouch,OSX
NetCraft


Joined: 22 May 2016
Posts: 15
Device: Macbook, OS X, multitouch, SDL2.

Code:
float posX = event.tfinger.x;
float posY = event.tfinger.y;
if ( event.type == SDL_FINGERDOWN ) std::cout << "posX = " << posX << ", posY = " <<  posY << "\n";


It returns me coordinates of my multitouch device. If I tap my multitouch at the left-top corner it returns me coordinates something like 0.1x0.1. Ok, right. But how to get coordinates of the cursor position in OS X?

I can get only coordinates of multitouch device but it doesn't mean that it's the coordinates of the cursor on the screen. I mean... I can tap my multitouch at the left-top corner but my cursor at this time will be at the right-bottom corner of the screen.
NetCraft


Joined: 22 May 2016
Posts: 15
Noone knows? Sad