mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
metal: fix window pixel size when resizing
This commit is contained in:
@@ -660,7 +660,17 @@ bool Window::onSizeChanged(int width, int height)
|
|||||||
windowWidth = width;
|
windowWidth = width;
|
||||||
windowHeight = height;
|
windowHeight = height;
|
||||||
|
|
||||||
SDL_GL_GetDrawableSize(window, &pixelWidth, &pixelHeight);
|
if (glcontext != nullptr)
|
||||||
|
SDL_GL_GetDrawableSize(window, &pixelWidth, &pixelHeight);
|
||||||
|
#ifdef LOVE_GRAPHICS_METAL
|
||||||
|
else if (metalView != nullptr)
|
||||||
|
SDL_Metal_GetDrawableSize(window, &pixelWidth, &pixelHeight);
|
||||||
|
#endif
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pixelWidth = width;
|
||||||
|
pixelHeight = height;
|
||||||
|
}
|
||||||
|
|
||||||
if (graphics.get())
|
if (graphics.get())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user