Use SDL_Vulkan_GetDrawableSize() instead of SDL_GL_GetDrawableSize()

This commit is contained in:
Sam Lantinga 2017-08-27 19:32:08 -07:00
parent 25e3a1ec90
commit 803fd6d526
1 changed files with 3 additions and 3 deletions

View File

@ -713,7 +713,7 @@ static SDL_bool createSwapchain(void)
}
// get size
SDL_GL_GetDrawableSize(state->windows[0], &w, &h);
SDL_Vulkan_GetDrawableSize(state->windows[0], &w, &h);
vulkanContext.swapchainSize.width = w;
vulkanContext.swapchainSize.height = h;
if(w == 0 || h == 0)
@ -1102,7 +1102,7 @@ static SDL_bool render(void)
getVulkanResultString(result));
quit(2);
}
SDL_GL_GetDrawableSize(state->windows[0], &w, &h);
SDL_Vulkan_GetDrawableSize(state->windows[0], &w, &h);
if(w != (int)vulkanContext.swapchainSize.width || h != (int)vulkanContext.swapchainSize.height)
{
return createNewSwapchainAndSwapchainSpecificStuff();
@ -1159,7 +1159,7 @@ int main(int argc, char *argv[])
SDL_Log("Screen BPP : %d\n", SDL_BITSPERPIXEL(mode.format));
SDL_GetWindowSize(state->windows[0], &dw, &dh);
SDL_Log("Window Size : %d,%d\n", dw, dh);
SDL_GL_GetDrawableSize(state->windows[0], &dw, &dh);
SDL_Vulkan_GetDrawableSize(state->windows[0], &dw, &dh);
SDL_Log("Draw Size : %d,%d\n", dw, dh);
SDL_Log("\n");