Skip to content

Commit

Permalink
scaling workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalten committed Apr 7, 2017
1 parent fb72ded commit 35fc80e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tongseng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static void callback(MTDeviceRef device, MTTouch touches[], size_t numTouches, d
int id = f->pathIndex;

float x = f->normalizedVector.position.x;
float y = 1.0f - f->normalizedVector.position.y; // reverse y axis
float y = 1.0f - f->normalizedVector.position.y/1.15f; // reverse y axis, work around scaling

if (x<0) x=0; else if (x>1) x=1;
if (y<0) y=0; else if (y>1) y=1;
Expand Down

0 comments on commit 35fc80e

Please sign in to comment.