diff --git a/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp b/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp index f09f04f1..8548fa1c 100644 --- a/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp +++ b/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp @@ -24,11 +24,14 @@ #define STRINGIFY2(X) #X #define STRINGIFY(X) STRINGIFY2(X) +namespace CemuGL +{ #define GLFUNC(__type, __name) __type __name; #define EGLFUNC(__type, __name) __type __name; #include "Common/GLInclude/glFunctions.h" #undef GLFUNC #undef EGLFUNC +} #include "config/ActiveSettings.h" #include "config/LaunchSettings.h" @@ -241,6 +244,17 @@ void LoadOpenGLImports() #undef GLFUNC #undef EGLFUNC } + +#if BOOST_OS_LINUX +// dummy function for all code that is statically linked with cemu and attempts to use eglSwapInterval +// used to suppress wxWidgets calls to eglSwapInterval +extern "C" +EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval) +{ + return EGL_TRUE; +} +#endif + #elif BOOST_OS_MACOS void LoadOpenGLImports() { diff --git a/src/Common/GLInclude/GLInclude.h b/src/Common/GLInclude/GLInclude.h index bf7a6bf8..86df0232 100644 --- a/src/Common/GLInclude/GLInclude.h +++ b/src/Common/GLInclude/GLInclude.h @@ -36,6 +36,8 @@ typedef struct __GLXFBConfigRec *GLXFBConfig; #endif +namespace CemuGL +{ #define GLFUNC(__type, __name) extern __type __name; #define EGLFUNC(__type, __name) extern __type __name; #include "glFunctions.h" @@ -213,6 +215,8 @@ static void glCompressedTextureSubImage3DWrapper(GLenum target, GLuint texture, glBindTexture(target, originalTexture); } +} +using namespace CemuGL; // this prevents Windows GL.h from being included: #define __gl_h_ #define __GL_H__