From bd6937ae5ca8bbc7c5e9b7792933d9971cf1768b Mon Sep 17 00:00:00 2001 From: Mary Guillemard Date: Sat, 10 Feb 2024 20:13:10 +0100 Subject: Make IOpenGLContext.HasContext context dependent (#6290) This makes IOpenGLContext.HasContext not static and be implementable. By doing this, we can support more than WGL and WGL. This also allows the SDL2 headless version to run under Wayland. Signed-off-by: Mary --- src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Ryujinx.Headless.SDL2') diff --git a/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs b/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs index 3fb93a0e..7ea6e148 100644 --- a/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs +++ b/src/Ryujinx.Headless.SDL2/OpenGL/OpenGLWindow.cs @@ -96,6 +96,8 @@ namespace Ryujinx.Headless.SDL2.OpenGL } } + public bool HasContext() => SDL_GL_GetCurrentContext() != IntPtr.Zero; + public void Dispose() { SDL_GL_DeleteContext(_context); -- cgit v1.2.3