Skip to content

Commit bb03741

Browse files
committed
Fix rotation on lanscape iPads (thx @TheRealClarity)
1 parent 231cd11 commit bb03741

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

BaseBin/libjailbreak/src/display.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,15 @@ CGFloat get_main_screen_rotation(void)
217217
else { // iPads that DO have a lanscape base orientation...
218218
CFNumberRef displayBootRotationNum = MGCopyAnswer(CFSTR("DisplayBootRotation"));
219219
unsigned long long displayBootRotation = [(__bridge NSNumber *)displayBootRotationNum unsignedLongLongValue];
220-
if (displayBootRotation == 180) {
221-
return 180; // ...only need a fix for upside down?????
220+
switch (displayBootRotation) {
221+
case 0:
222+
return 90;
223+
case 90:
224+
return 0;
225+
case 180:
226+
return 270;
227+
case 270:
228+
return 180;
222229
}
223230
}
224231
}

0 commit comments

Comments
 (0)