Skip to content

Commit 3839a79

Browse files
authored
Merge pull request openframeworks#5952 from openframeworks/bugfix-ios-orient
bugfix ios viewport issue closes openframeworks#5627
2 parents 800cf90 + a83be03 commit 3839a79

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

addons/ofxiOS/src/core/ofxiOSViewController.mm

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,14 +201,10 @@ - (void)rotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientatio
201201
}
202202
//borg
203203
//NSLog(@"w %f h %f",[UIScreen mainScreen].bounds.size.width,[UIScreen mainScreen].bounds.size.height);
204-
//assumes Portrait orientation
205-
if(screenSize.width>screenSize.height){
206-
center.x = screenSize.height * 0.5;
207-
center.y = screenSize.width * 0.5;
208-
}else{
209-
center.x = screenSize.width * 0.5;
210-
center.y = screenSize.height * 0.5;
211-
}
204+
205+
center.x = screenSize.width * 0.5;
206+
center.y = screenSize.height * 0.5;
207+
212208
//NSLog(@"rotating to portrait %i, is portrait %i, currentInterfaceOrientation %i, bound: w %f h %f",UIInterfaceOrientationIsPortrait(interfaceOrientation),UIInterfaceOrientationIsPortrait(self.interfaceOrientation),UIInterfaceOrientationIsPortrait(currentInterfaceOrientation),bounds.size.width,bounds.size.height);
213209
}
214210

0 commit comments

Comments
 (0)