From 95ccc98e52feea267f0c43229e969158687fedbc Mon Sep 17 00:00:00 2001 From: Theodore Watson Date: Mon, 2 Sep 2019 11:35:02 -0700 Subject: [PATCH] bugfix fixes reversed touches when not using hardware orientation. closes #6317 (#6363) --- addons/ofxiOS/src/core/ofxiOSEAGLView.mm | 4 ++-- addons/ofxiOS/src/core/ofxiOSGLKView.mm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/ofxiOS/src/core/ofxiOSEAGLView.mm b/addons/ofxiOS/src/core/ofxiOSEAGLView.mm index 50422c9df94..7620ac65182 100644 --- a/addons/ofxiOS/src/core/ofxiOSEAGLView.mm +++ b/addons/ofxiOS/src/core/ofxiOSEAGLView.mm @@ -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; diff --git a/addons/ofxiOS/src/core/ofxiOSGLKView.mm b/addons/ofxiOS/src/core/ofxiOSGLKView.mm index 4d09645eadb..6025f3f2c71 100644 --- a/addons/ofxiOS/src/core/ofxiOSGLKView.mm +++ b/addons/ofxiOS/src/core/ofxiOSGLKView.mm @@ -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;