From 615e30fa5286a89c52ecaa8aed46d61a77dd511a Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 29 Mar 2024 22:40:55 +1000 Subject: [PATCH] GS/OGL: Fix recursive macro compile error On some Intel drivers. --- pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp index a81d8fcf3b..6e9012f3c2 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp @@ -1298,10 +1298,14 @@ std::string GSDeviceOGL::GenGlslHeader(const std::string_view& entry, GLenum typ pxAssert(0); } - // Select the entry point ie the main function - header += "#define "; - header += entry; - header += " main\n"; + // Don't remove this, the recursive macro breaks some Intel drivers. + if (entry != "main") + { + // Select the entry point ie the main function + header += "#define "; + header += entry; + header += " main\n"; + } header += macro;