From cadf3e44cad0036ae6ab426495c97e1087f52ed1 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 7 Dec 2017 09:35:28 -0800 Subject: [PATCH] The Metal view is a full SDL_uikitview to support multi-touch --- src/video/uikit/SDL_uikitmetalview.h | 2 +- src/video/uikit/SDL_uikitmetalview.m | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/src/video/uikit/SDL_uikitmetalview.h b/src/video/uikit/SDL_uikitmetalview.h index a26c356152881..1fb980638d029 100644 --- a/src/video/uikit/SDL_uikitmetalview.h +++ b/src/video/uikit/SDL_uikitmetalview.h @@ -38,7 +38,7 @@ #define METALVIEW_TAG 255 -@interface SDL_uikitmetalview : UIView +@interface SDL_uikitmetalview : SDL_uikitview - (instancetype)initWithFrame:(CGRect)frame scale:(CGFloat)scale diff --git a/src/video/uikit/SDL_uikitmetalview.m b/src/video/uikit/SDL_uikitmetalview.m index 17dca69d26c45..b05c8906355da 100644 --- a/src/video/uikit/SDL_uikitmetalview.m +++ b/src/video/uikit/SDL_uikitmetalview.m @@ -49,9 +49,6 @@ - (instancetype)initWithFrame:(CGRect)frame tag:(int)tag { if ((self = [super initWithFrame:frame])) { - /* Resize properly when rotated. */ - self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; - /* Set the appropriate scale (for retina display support) */ self.contentScaleFactor = scale; self.tag = tag; @@ -105,19 +102,7 @@ - (void)updateDrawableSize = [[SDL_uikitmetalview alloc] initWithFrame:view.frame scale:scale tag:METALVIEW_TAG]; -#if 1 - [view addSubview:metalview]; -#else - /* Sets this view as the controller's view, and adds the view to - * the window hierarchy. - * - * Left here for information. Not used because I suspect that for correct - * operation it will be necesary to copy everything from the window's - * current SDL_uikitview instance to the SDL_uikitview portion of the - * SDL_metalview. The latter would be derived from SDL_uikitview rather - * than UIView. */ [metalview setSDLWindow:window]; -#endif return metalview; }