diff options
Diffstat (limited to 'src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs')
-rw-r--r-- | src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs b/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs index a2b26bbc..245aba77 100644 --- a/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs +++ b/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs @@ -151,11 +151,15 @@ namespace Ryujinx.Headless.SDL2.OpenGL GL.Clear(ClearBufferMask.ColorBufferBit); SwapBuffers(); - if (IsFullscreen) + if (IsExclusiveFullscreen) + { + Renderer?.Window.SetSize(ExclusiveFullscreenWidth, ExclusiveFullscreenHeight); + MouseDriver.SetClientSize(ExclusiveFullscreenWidth, ExclusiveFullscreenHeight); + } + else if (IsFullscreen) { // NOTE: grabbing the main display's dimensions directly as OpenGL doesn't scale along like the VulkanWindow. - // we might have to amend this if people run this on a non-primary display set to a different resolution. - if (SDL_GetDisplayBounds(0, out SDL_Rect displayBounds) < 0) + if (SDL_GetDisplayBounds(DisplayId, out SDL_Rect displayBounds) < 0) { Logger.Warning?.Print(LogClass.Application, $"Could not retrieve display bounds: {SDL_GetError()}"); |