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.Graphics.OpenGL/IOpenGLContext.cs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/Ryujinx.Graphics.OpenGL/IOpenGLContext.cs') diff --git a/src/Ryujinx.Graphics.OpenGL/IOpenGLContext.cs b/src/Ryujinx.Graphics.OpenGL/IOpenGLContext.cs index a11b9cb2..525418d7 100644 --- a/src/Ryujinx.Graphics.OpenGL/IOpenGLContext.cs +++ b/src/Ryujinx.Graphics.OpenGL/IOpenGLContext.cs @@ -7,21 +7,6 @@ namespace Ryujinx.Graphics.OpenGL { void MakeCurrent(); - // TODO: Support more APIs per platform. - static bool HasContext() - { - if (OperatingSystem.IsWindows()) - { - return WGLHelper.GetCurrentContext() != IntPtr.Zero; - } - else if (OperatingSystem.IsLinux()) - { - return GLXHelper.GetCurrentContext() != IntPtr.Zero; - } - else - { - return false; - } - } + bool HasContext(); } } -- cgit v1.2.3