@@ -53,32 +53,6 @@ - (instancetype)init
5353
5454@end
5555
56- @interface SDL_uikitwindow : UIWindow
57-
58- - (void )layoutSubviews ;
59-
60- @end
61-
62- @implementation SDL_uikitwindow
63-
64- - (void )layoutSubviews
65- {
66- #ifndef SDL_PLATFORM_VISIONOS
67- // Workaround to fix window orientation issues in iOS 8.
68- /* As of July 1 2019, I haven't been able to reproduce any orientation
69- * issues with this disabled on iOS 12. The issue this is meant to fix might
70- * only happen on iOS 8, or it might have been fixed another way with other
71- * code... This code prevents split view (iOS 9+) from working on iPads, so
72- * we want to avoid using it if possible. */
73- if (!UIKit_IsSystemVersionAtLeast (9.0 )) {
74- self.frame = self.screen .bounds ;
75- }
76- #endif
77- [super layoutSubviews ];
78- }
79-
80- @end
81-
8256static bool SetupWindowData (SDL_VideoDevice *_this, SDL_Window *window, UIWindow *uiwindow, bool created)
8357{
8458 SDL_VideoDisplay *display = SDL_GetVideoDisplayForWindow (window);
@@ -238,15 +212,15 @@ bool UIKit_CreateWindow(SDL_VideoDevice *_this, SDL_Window *window, SDL_Properti
238212 if (@available (iOS 13.0 , tvOS 13.0 , *)) {
239213 UIWindowScene *scene = GetActiveWindowScene ();
240214 if (scene) {
241- uiwindow = [[SDL_uikitwindow alloc ] initWithWindowScene: scene];
215+ uiwindow = [[UIWindow alloc ] initWithWindowScene: scene];
242216 }
243217 }
244218 if (!uiwindow) {
245219 // ignore the size user requested, and make a fullscreen window
246220#ifdef SDL_PLATFORM_VISIONOS
247- uiwindow = [[SDL_uikitwindow alloc ] initWithFrame: CGRectMake (0 , 0 , SDL_XR_SCREENWIDTH, SDL_XR_SCREENHEIGHT)];
221+ uiwindow = [[UIWindow alloc ] initWithFrame: CGRectMake (0 , 0 , SDL_XR_SCREENWIDTH, SDL_XR_SCREENHEIGHT)];
248222#else
249- uiwindow = [[SDL_uikitwindow alloc ] initWithFrame: data.uiscreen.bounds];
223+ uiwindow = [[UIWindow alloc ] initWithFrame: data.uiscreen.bounds];
250224#endif
251225 }
252226
0 commit comments