Fix: currentWindowInScene may unexpectedly return null

This is caused by AirPlay bug fix (https://github.com/PojavLauncherTeam/PojavLauncher_iOS/commit/bc8d5a9)
This commit is contained in:
khanhduytran0 committed 2024-08-03 17:39:52 +07:00
1 parent aafdeaf993
commit e021b7df8a
1 file changed
+1 -1
+1 -1
View File
@@ -145,7 +145,7 @@ void init_hookUIKitConstructor(void) {
@end
UIWindow* currentWindowInScene(BOOL external) {
id delegate;
id delegate = UIApplication.sharedApplication.delegate;
for (UIScene *scene in UIApplication.sharedApplication.connectedScenes.allObjects) {
if (external != (scene.session.role == UIWindowSceneSessionRoleApplication)) {
delegate = scene.delegate;