Skip to content

Commit

Permalink
bugfix fixes reversed touches when not using hardware orientation. cl…
Browse files Browse the repository at this point in the history
…oses #6317 (#6363)
  • Loading branch information
ofTheo authored Sep 2, 2019
1 parent 459145e commit 95ccc98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions addons/ofxiOS/src/core/ofxiOSEAGLView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,12 @@ - (CGPoint)orientateTouchPoint:(CGPoint)touchPoint {
touchPointOriented.y = ofGetHeight() - touchPoint.y;
break;

case OF_ORIENTATION_90_LEFT:
case OF_ORIENTATION_90_RIGHT:
touchPointOriented.x = touchPoint.y;
touchPointOriented.y = ofGetHeight() - touchPoint.x;
break;

case OF_ORIENTATION_90_RIGHT:
case OF_ORIENTATION_90_LEFT:
touchPointOriented.x = ofGetWidth() - touchPoint.y;
touchPointOriented.y = touchPoint.x;
break;
Expand Down
4 changes: 2 additions & 2 deletions addons/ofxiOS/src/core/ofxiOSGLKView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,12 @@ - (CGPoint)orientateTouchPoint:(CGPoint)touchPoint {
touchPointOriented.y = ofGetHeight() - touchPoint.y;
break;

case OF_ORIENTATION_90_LEFT:
case OF_ORIENTATION_90_RIGHT:
touchPointOriented.x = touchPoint.y;
touchPointOriented.y = ofGetHeight() - touchPoint.x;
break;

case OF_ORIENTATION_90_RIGHT:
case OF_ORIENTATION_90_LEFT:
touchPointOriented.x = ofGetWidth() - touchPoint.y;
touchPointOriented.y = touchPoint.x;
break;
Expand Down

0 comments on commit 95ccc98

Please sign in to comment.