summaryrefslogtreecommitdiff
path: root/src/video/uikit/SDL_uikitwindow.m
diff options
context:
space:
mode:
authorAlex Szpakowski <slime73@gmail.com>2014-11-23 23:29:24 -0400
committerAlex Szpakowski <slime73@gmail.com>2014-11-23 23:29:24 -0400
commitbc8f5758ab57fed350d2593b2a466a1255ae436c (patch)
tree15c1cc48771482558a2106cc9dc06e4fd9e014bb /src/video/uikit/SDL_uikitwindow.m
parentbe9b78d8b54eb162dc635d5cb0c5bb29adfbd7cb (diff)
downloadsdl-bc8f5758ab57fed350d2593b2a466a1255ae436c.tar.gz
Removed an ugly hack to make windows rotate properly on iOS 8+.
Recent commits apparently resolved the issue that made the hack necessary.
Diffstat (limited to 'src/video/uikit/SDL_uikitwindow.m')
-rw-r--r--src/video/uikit/SDL_uikitwindow.m19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/video/uikit/SDL_uikitwindow.m b/src/video/uikit/SDL_uikitwindow.m
index 0c2f12017..d1e32b2cb 100644
--- a/src/video/uikit/SDL_uikitwindow.m
+++ b/src/video/uikit/SDL_uikitwindow.m
@@ -41,21 +41,6 @@
#include <Foundation/Foundation.h>
-@implementation SDL_uikitwindow
-
-- (void)layoutSubviews
-{
- [super layoutSubviews];
-
- /* This seems to be needed on iOS 8, otherwise the window's frame is put in
- * an unexpected position when the screen or device is rotated.
- * FIXME: is there a better solution to that problem than this ugly hack?
- */
- self.frame = self.screen.bounds;
-}
-
-@end
-
@implementation SDL_WindowData
@synthesize uiwindow;
@@ -65,7 +50,7 @@
@end
-static int SetupWindowData(_THIS, SDL_Window *window, SDL_uikitwindow *uiwindow, SDL_bool created)
+static int SetupWindowData(_THIS, SDL_Window *window, UIWindow *uiwindow, SDL_bool created)
{
SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window);
SDL_DisplayData *displaydata = (__bridge SDL_DisplayData *) display->driverdata;
@@ -213,7 +198,7 @@ UIKit_CreateWindow(_THIS, SDL_Window *window)
/* ignore the size user requested, and make a fullscreen window */
/* !!! FIXME: can we have a smaller view? */
- SDL_uikitwindow *uiwindow = [[SDL_uikitwindow alloc] initWithFrame:data.uiscreen.bounds];
+ UIWindow *uiwindow = [[UIWindow alloc] initWithFrame:data.uiscreen.bounds];
/* put the window on an external display if appropriate. This implicitly
* does [uiwindow setframe:[uiscreen bounds]], so don't do it on the