mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 14:56:00 +00:00
Fixed accidental removal of optional delegate interface check
Fixes https://github.com/libsdl-org/SDL/issues/11970
This commit is contained in:
@@ -398,7 +398,11 @@ UIKit_GetSupportedOrientations(SDL_Window *window)
|
||||
|
||||
/* Get all possible valid orientations. If the app delegate doesn't tell
|
||||
* us, we get the orientations from Info.plist via UIApplication. */
|
||||
validOrientations = [app.delegate application:app supportedInterfaceOrientationsForWindow:data.uiwindow];
|
||||
if ([app.delegate respondsToSelector:@selector(application:supportedInterfaceOrientationsForWindow:)]) {
|
||||
validOrientations = [app.delegate application:app supportedInterfaceOrientationsForWindow:data.uiwindow];
|
||||
} else {
|
||||
validOrientations = [app supportedInterfaceOrientationsForWindow:data.uiwindow];
|
||||
}
|
||||
|
||||
if (hint != NULL) {
|
||||
NSArray *orientations = [@(hint) componentsSeparatedByString:@" "];
|
||||
|
Reference in New Issue
Block a user