Skip to content

Commit fb247c9

Browse files
Merge branch 'bugfix-13634' into release-6.6.4
2 parents e7d3cdf + 973cc06 commit fb247c9

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

docs/notes/bugfix-13634.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# screenshots taken in landscape view are rotated by 90 degrees on iOS 8

engine/src/mbliphonedc.mm

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,20 +530,35 @@ static void MCScreenDCDoSnapshot(void *p_env)
530530
t_is_rotated = false;
531531
break;
532532
case UIInterfaceOrientationPortraitUpsideDown:
533-
t_angle = M_PI;
533+
// PM-2014-10-09: [[ Bug 13634 ]] No need to rotate the coords on iOS 8
534+
if (MCmajorosversion >=800)
535+
t_angle = 0.0;
536+
else
537+
t_angle = M_PI;
538+
534539
t_offset = CGSizeMake(t_screen_rect . width / 2, t_screen_rect . height / 2);
535540
t_is_rotated = false;
536541
break;
537542
case UIInterfaceOrientationLandscapeLeft:
538543
// MW-2011-10-17: [[ Bug 9816 ]] Angle caused upside-down image so inverted.
539-
t_angle = M_PI / 2.0;
544+
// PM-2014-10-09: [[ Bug 13634 ]] No need to rotate the coords on iOS 8
545+
if (MCmajorosversion >=800)
546+
t_angle = 0.0;
547+
else
548+
t_angle = M_PI / 2;
549+
540550
t_offset = CGSizeMake(t_screen_rect . height / 2, t_screen_rect . width / 2);
541551
t_is_rotated = true;
542552
break;
543553
case UIInterfaceOrientationLandscapeRight:
544554
// MW-2011-10-17: [[ Bug 9816 ]] Angle caused upside-down image so inverted.
545-
t_angle = -M_PI / 2.0;
546-
t_offset = CGSizeMake(t_screen_rect . height / 2, t_screen_rect . width / 2);
555+
// PM-2014-10-09: [[ Bug 13634 ]] No need to rotate the coords on iOS 8
556+
if (MCmajorosversion >=800)
557+
t_angle = 0.0;
558+
else
559+
t_angle = -M_PI / 2;
560+
561+
t_offset = CGSizeMake(t_screen_rect . height / 2, t_screen_rect . width / 2);
547562
t_is_rotated = true;
548563
break;
549564
}

0 commit comments

Comments
 (0)