Skip to content

Commit

Permalink
Fix it for real now
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhduytran0 committed Jul 8, 2024
1 parent 299923e commit 5acb911
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions TweakSB.x
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ static uint16_t forcePadIdiom = 0;
// Fix status bar for the external display
%hook _UIStatusBar
- (void)_prepareVisualProviderIfNeeded {
UIScreen *screen = self._effectiveTargetScreen;
if (forcePadIdiom || screen != UIScreen.mainScreen) {
UIScreen *screen = self.targetScreen ?: self._effectiveTargetScreen;
if (screen._isExternal) {
// For performance reason, we're gonna overwrite userInterfaceIdiom directly
// userInterfaceIdiom: ldr x0, [x0, #0x8]
uint64_t *collection = (uint64_t *)(__bridge void *)screen.traitCollection;
Expand Down
1 change: 1 addition & 0 deletions UIKitPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

@interface _UIStatusBar
- (void)setTargetScreen:(UIScreen *)screen;
- (UIScreen *)targetScreen;
- (UIScreen *)_effectiveTargetScreen;
@end

Expand Down

0 comments on commit 5acb911

Please sign in to comment.