src/video/uikit/SDL_uikitmetalview.m
changeset 11732 ad13456d6e7f
parent 11728 2f3ea7f5c671
child 11733 490588c02a65
equal deleted inserted replaced
11731:30f337dc8c74 11732:ad13456d6e7f
    82 {
    82 {
    83     SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata;
    83     SDL_WindowData *data = (__bridge SDL_WindowData *)window->driverdata;
    84     SDL_uikitview *view = (SDL_uikitview*)data.uiwindow.rootViewController.view;
    84     SDL_uikitview *view = (SDL_uikitview*)data.uiwindow.rootViewController.view;
    85     CGFloat scale = 1.0;
    85     CGFloat scale = 1.0;
    86 
    86 
       
    87 	if ([view isKindOfClass:[SDL_uikitmetalview class]]) {
       
    88 		return (SDL_uikitmetalview *)view;
       
    89 	}
       
    90 
    87     if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
    91     if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
    88         /* Set the scale to the natural scale factor of the screen - the
    92         /* Set the scale to the natural scale factor of the screen - the
    89          * backing dimensions of the Metal view will match the pixel
    93          * backing dimensions of the Metal view will match the pixel
    90          * dimensions of the screen rather than the dimensions in points.
    94          * dimensions of the screen rather than the dimensions in points.
    91          */
    95          */