src/render/metal/SDL_render_metal.m
changeset 11809 4b858abfb24d
parent 11807 6b3d9e08c586
child 11810 30acd4dcfdb6
equal deleted inserted replaced
11808:510c0e047122 11809:4b858abfb24d
   561 
   561 
   562 static int
   562 static int
   563 METAL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
   563 METAL_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
   564 { @autoreleasepool {
   564 { @autoreleasepool {
   565     METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
   565     METAL_RenderData *data = (__bridge METAL_RenderData *) renderer->driverdata;
   566     // !!! FIXME: We shouldn't need ActivateRenderer, but drawableSize is 0
       
   567     // in the first frame without it.
       
   568     METAL_ActivateRenderer(renderer);
       
   569     if (w) {
   566     if (w) {
   570         *w = (int)data.mtllayer.drawableSize.width;
   567         *w = (int)data.mtllayer.drawableSize.width;
   571     }
   568     }
   572     if (h) {
   569     if (h) {
   573         *h = (int)data.mtllayer.drawableSize.height;
   570         *h = (int)data.mtllayer.drawableSize.height;