mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
Make sure our pixel size is up to date at window creation
This guarantees that the application will always get SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED when a window is created. Fixes https://github.com/libsdl-org/SDL/issues/7441
This commit is contained in:
@@ -1860,6 +1860,9 @@ SDL_Window *SDL_CreateWindow(const char *title, int w, int h, Uint32 flags)
|
|||||||
SDL_UpdateFullscreenMode(window, SDL_TRUE);
|
SDL_UpdateFullscreenMode(window, SDL_TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Make sure window pixel size is up to date */
|
||||||
|
SDL_CheckWindowPixelSizeChanged(window);
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user