From f417e16d075d7e9b8d06104414c9d9a7fe1db446 Mon Sep 17 00:00:00 2001 From: Elias Batek Date: Sat, 16 Sep 2023 22:00:50 +0200 Subject: [PATCH 1/2] Fix version(without_opengl) code path --- simpledisplay.d | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/simpledisplay.d b/simpledisplay.d index 40ea671..2c5a32c 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -1536,7 +1536,9 @@ void setOpenGLContextVersion() (ubyte hi, ubyte lo) { sdpyOpenGLContextVersion = Added April 24, 2023 (dub v11.0) +/ auto openGLCurrentContext() { - version(Windows) + version(without_opengl) + return null; + else version(Windows) return wglGetCurrentContext(); else return glXGetCurrentContext(); @@ -14965,6 +14967,7 @@ mixin DynamicLoad!(XRandr, "Xrandr", 2, XRandrLibrarySuccessfullyLoaded) XRandrL customEventFDWrite = -1; } + version(without_opengl) {} else if(glc !is null) { glXDestroyContext(display, glc); glc = null; From e0957688dbf9517add2b4048461ad260ff2c92a7 Mon Sep 17 00:00:00 2001 From: Elias Batek Date: Sat, 16 Sep 2023 23:59:49 +0200 Subject: [PATCH 2/2] Omit openGLCurrentContext in version(without_opengl) --- simpledisplay.d | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/simpledisplay.d b/simpledisplay.d index 2c5a32c..f6c8e3e 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -1535,10 +1535,9 @@ void setOpenGLContextVersion() (ubyte hi, ubyte lo) { sdpyOpenGLContextVersion = History: Added April 24, 2023 (dub v11.0) +/ +version(without_opengl) {} else auto openGLCurrentContext() { - version(without_opengl) - return null; - else version(Windows) + version(Windows) return wglGetCurrentContext(); else return glXGetCurrentContext();