libsdl2: BGL_SHARE_CONTEXT is not available on GCC2.

This commit is contained in:
Augustin Cavalier
2022-01-11 17:46:18 -05:00
parent 771ae34f2d
commit 7192b54797

View File

@@ -1161,3 +1161,29 @@ index 1d6a3c5..58a85d8 100644
--
2.30.2
From b299660543439b2bee65ca29244cd3f1ea0269d7 Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Tue, 11 Jan 2022 17:45:29 -0500
Subject: Only expect BGL_SHARE_CONTEXT on __GNUC__ > 3.
diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index c88cb37..0c7a704 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -133,9 +133,11 @@ SDL_GLContext HAIKU_GL_CreateContext(_THIS, SDL_Window * window) {
_this->gl_config.accum_alpha_size) {
gl_flags |= BGL_ACCUM;
}
+#if __GNUC__ > 3
if (_this->gl_config.share_with_current_context) {
gl_flags |= BGL_SHARE_CONTEXT;
}
+#endif
bwin->CreateGLView(gl_flags);
_GetBeApp()->SetCurrentContext(bwin->GetGLView());
return (SDL_GLContext)(bwin->GetGLView());
--
2.30.2