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:
1 parent
aafdeaf993
commit
e021b7df8a
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user