Skip to content

Commit

Permalink
Skip setting SDL_HINT_VIDEO_X11_FORCE_EGL on NixOS
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiRulz committed Sep 10, 2024
1 parent a955868 commit 08bd14e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/BizHawk.Bizware.Graphics/OpenGL/SDL2OpenGLContext.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// #define DEBUG_OPENGL

using System.IO;

#if DEBUG_OPENGL
using System.Runtime.InteropServices;
using Silk.NET.OpenGL;
Expand Down Expand Up @@ -29,7 +31,7 @@ static SDL2OpenGLContext()
// try to use EGL if it is available
// GLX is the old API, and is the more or less "deprecated" at this point, and potentially more buggy with some drivers
// we do need to a bit more work, in case EGL is not actually available or potentially doesn't have desktop GL support
SDL_SetHint(SDL_HINT_VIDEO_X11_FORCE_EGL, "1");
if (!Directory.Exists("/nix")/* this is just for me --yoshi */) SDL_SetHint(SDL_HINT_VIDEO_X11_FORCE_EGL, "1");
}

// init SDL video
Expand Down

0 comments on commit 08bd14e

Please sign in to comment.