diff --git a/osu.Framework/Platform/SDL2/SDL2GraphicsSurface.cs b/osu.Framework/Platform/SDL2/SDL2GraphicsSurface.cs index 1c315afe59..c5bc15842f 100644 --- a/osu.Framework/Platform/SDL2/SDL2GraphicsSurface.cs +++ b/osu.Framework/Platform/SDL2/SDL2GraphicsSurface.cs @@ -58,29 +58,7 @@ public void Initialise() public Size GetDrawableSize() { - int width, height; - - switch (Type) - { - case GraphicsSurfaceType.OpenGL: - default: - SDL.SDL_GL_GetDrawableSize(window.SDLWindowHandle, out width, out height); - break; - - case GraphicsSurfaceType.Vulkan: - SDL.SDL_Vulkan_GetDrawableSize(window.SDLWindowHandle, out width, out height); - break; - - case GraphicsSurfaceType.Metal: - SDL.SDL_Metal_GetDrawableSize(window.SDLWindowHandle, out width, out height); - break; - - case GraphicsSurfaceType.Direct3D11: - // todo: SDL has no "drawable size" method for D3D11, return window size for now. - SDL.SDL_GetWindowSize(window.SDLWindowHandle, out width, out height); - break; - } - + SDL.SDL_GetWindowSizeInPixels(window.SDLWindowHandle, out int width, out int height); return new Size(width, height); } diff --git a/osu.Framework/osu.Framework.csproj b/osu.Framework/osu.Framework.csproj index 2bcac0e38b..8125eb6457 100644 --- a/osu.Framework/osu.Framework.csproj +++ b/osu.Framework/osu.Framework.csproj @@ -39,7 +39,7 @@ - +