mirror of https://github.com/ZDoom/qzdoom.git
Fixed: GetClientWidth and GetClientHeight were still using SDL_Surface which on some systems would allocate an SDL_Renderer automatically.
This commit is contained in:
parent
bf68f1a851
commit
5a578ba1ae
|
@ -506,7 +506,11 @@ int SystemBaseFrameBuffer::GetClientWidth()
|
||||||
|
|
||||||
if (Priv::softpolyEnabled)
|
if (Priv::softpolyEnabled)
|
||||||
{
|
{
|
||||||
return SDL_GetWindowSurface(Priv::window)->w;
|
if (polyrendertarget)
|
||||||
|
SDL_GetRendererOutputSize(polyrendertarget, &width, nullptr);
|
||||||
|
else
|
||||||
|
SDL_GetWindowSize(Priv::window, &width, nullptr);
|
||||||
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_VULKAN
|
#ifdef HAVE_VULKAN
|
||||||
|
@ -523,7 +527,11 @@ int SystemBaseFrameBuffer::GetClientHeight()
|
||||||
|
|
||||||
if (Priv::softpolyEnabled)
|
if (Priv::softpolyEnabled)
|
||||||
{
|
{
|
||||||
return SDL_GetWindowSurface(Priv::window)->h;
|
if (polyrendertarget)
|
||||||
|
SDL_GetRendererOutputSize(polyrendertarget, nullptr, &height);
|
||||||
|
else
|
||||||
|
SDL_GetWindowSize(Priv::window, nullptr, &height);
|
||||||
|
return height;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_VULKAN
|
#ifdef HAVE_VULKAN
|
||||||
|
|
Loading…
Reference in New Issue