src/video/uikit/SDL_uikitmetalview.m
changeset 11732 ad13456d6e7f
parent 11728 2f3ea7f5c671
child 11733 490588c02a65
     1.1 --- a/src/video/uikit/SDL_uikitmetalview.m	Thu Dec 07 16:08:47 2017 -0800
     1.2 +++ b/src/video/uikit/SDL_uikitmetalview.m	Thu Dec 07 17:12:03 2017 -0800
     1.3 @@ -84,6 +84,10 @@
     1.4      SDL_uikitview *view = (SDL_uikitview*)data.uiwindow.rootViewController.view;
     1.5      CGFloat scale = 1.0;
     1.6  
     1.7 +	if ([view isKindOfClass:[SDL_uikitmetalview class]]) {
     1.8 +		return (SDL_uikitmetalview *)view;
     1.9 +	}
    1.10 +
    1.11      if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
    1.12          /* Set the scale to the natural scale factor of the screen - the
    1.13           * backing dimensions of the Metal view will match the pixel