Examples, SDL2/SDL3: use SDL_GetWindowSizeInPixels() to create framebuffers. (#8761, #9124)

+ cc #7433
This commit is contained in:
ocornut
2026-06-29 11:49:06 +02:00
parent 76f5be2749
commit c66d9a8190
4 changed files with 8 additions and 6 deletions

View File

@@ -155,7 +155,7 @@ int main(int, char**)
// [If using SDL_MAIN_USE_CALLBACKS: all code below would likely be your SDL_AppIterate() function]
// React to changes in screen size
int width, height;
SDL_GetWindowSize(window, &width, &height);
SDL_GetWindowSizeInPixels(window, &width, &height);
if (width != wgpu_surface_width || height != wgpu_surface_height)
ResizeSurface(width, height);