diff options
| author | Mary Guillemard <mary@mary.zone> | 2024-02-10 20:13:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-10 20:13:10 +0100 |
| commit | bd6937ae5ca8bbc7c5e9b7792933d9971cf1768b (patch) | |
| tree | 0fec9888ccca931c436d153cc48c58d987c4aff2 /src/Ryujinx.Ava/UI | |
| parent | b82e789d4f023f1797c9352bb0e7155595d6f1a2 (diff) | |
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 <mary@mary.zone>
Diffstat (limited to 'src/Ryujinx.Ava/UI')
| -rw-r--r-- | src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs b/src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs index 5ff756f2..63bf6cf7 100644 --- a/src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs +++ b/src/Ryujinx.Ava/UI/Renderer/SPBOpenGLContext.cs @@ -29,6 +29,8 @@ namespace Ryujinx.Ava.UI.Renderer _context.MakeCurrent(_window); } + public bool HasContext() => _context.IsCurrent; + public static SPBOpenGLContext CreateBackgroundContext(OpenGLContextBase sharedContext) { OpenGLContextBase context = PlatformHelper.CreateOpenGLContext(FramebufferFormat.Default, 3, 3, OpenGLContextFlags.Compat, true, sharedContext); |
