mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-06 01:46:25 +00:00
Adding SDL_GetWindowSizeInPixels for window size in pixels (#6112)
This commit is contained in:
@@ -308,7 +308,7 @@ D3D_ActivateRenderer(SDL_Renderer * renderer)
|
||||
int w, h;
|
||||
Uint32 window_flags = SDL_GetWindowFlags(window);
|
||||
|
||||
WIN_GetDrawableSize(window, &w, &h);
|
||||
SDL_GetWindowSizeInPixels(window, &w, &h);
|
||||
data->pparams.BackBufferWidth = w;
|
||||
data->pparams.BackBufferHeight = h;
|
||||
if (window_flags & SDL_WINDOW_FULLSCREEN && (window_flags & SDL_WINDOW_FULLSCREEN_DESKTOP) != SDL_WINDOW_FULLSCREEN_DESKTOP) {
|
||||
@@ -357,7 +357,7 @@ D3D_WindowEvent(SDL_Renderer * renderer, const SDL_WindowEvent *event)
|
||||
static int
|
||||
D3D_GetOutputSize(SDL_Renderer * renderer, int *w, int *h)
|
||||
{
|
||||
WIN_GetDrawableSize(renderer->window, w, h);
|
||||
SDL_GetWindowSizeInPixels(renderer->window, w, h);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1653,7 +1653,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
|
||||
SDL_GetWindowWMInfo(window, &windowinfo);
|
||||
|
||||
window_flags = SDL_GetWindowFlags(window);
|
||||
WIN_GetDrawableSize(window, &w, &h);
|
||||
SDL_GetWindowSizeInPixels(window, &w, &h);
|
||||
SDL_GetWindowDisplayMode(window, &fullscreen_mode);
|
||||
|
||||
SDL_zero(pparams);
|
||||
|
Reference in New Issue
Block a user