Skip to content

Commit

Permalink
The Metal view is a full SDL_uikitview to support multi-touch
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Dec 7, 2017
1 parent ef6e629 commit cadf3e4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
2 changes: 1 addition & 1 deletion src/video/uikit/SDL_uikitmetalview.h
Expand Up @@ -38,7 +38,7 @@

#define METALVIEW_TAG 255

@interface SDL_uikitmetalview : UIView
@interface SDL_uikitmetalview : SDL_uikitview

- (instancetype)initWithFrame:(CGRect)frame
scale:(CGFloat)scale
Expand Down
15 changes: 0 additions & 15 deletions src/video/uikit/SDL_uikitmetalview.m
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit cadf3e4

Please sign in to comment.