From 9030c54fab8c99df4f7327423590628b6e2306af Mon Sep 17 00:00:00 2001 From: Fabrice Date: Tue, 10 Feb 2026 16:43:51 +0100 Subject: use dummy --- src/graphics.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/graphics.cc') diff --git a/src/graphics.cc b/src/graphics.cc index 5618824..3eddc74 100644 --- a/src/graphics.cc +++ b/src/graphics.cc @@ -6,11 +6,11 @@ #include "utils.h" #include "wlstate.h" -/* clang-format off */ #define WAYC_OPENGL_MAJOR 4 #define WAYC_OPENGL_MINOR 6 #define WAYC_COLOR_BITS 8 +/* clang-format off */ static EGLint WAYC_EGL_ATTRS[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT, EGL_RED_SIZE, WAYC_COLOR_BITS, @@ -27,6 +27,10 @@ static EGLint WAYC_OGL_ATTRS[] = { EGL_NONE }; +static struct graphics_s WAYC_GRAPHICS_DUMMY = { + nullptr, nullptr, nullptr +}; + /* clang-format on */ static bool wayc_graphics_config(EGLDisplay display, EGLConfig* config) { @@ -84,6 +88,7 @@ void wayc_graphics_deinit(struct graphics_s* graphics) { if (graphics->display == nullptr || graphics->context == nullptr) return; + wayc_graphics_use(&WAYC_GRAPHICS_DUMMY); eglDestroyContext(graphics->display, graphics->context); eglTerminate(graphics->display); -- cgit v1.2.3