From 7ebca36a9cfd059f823c368a6810cca5db65396f Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Wed, 22 Apr 2020 23:03:38 +0100 Subject: [PATCH] Disable debug callbacks on Intel HD 4000. --- OpenRA.Platforms.Default/OpenGL.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OpenRA.Platforms.Default/OpenGL.cs b/OpenRA.Platforms.Default/OpenGL.cs index af9b995518..f109698beb 100644 --- a/OpenRA.Platforms.Default/OpenGL.cs +++ b/OpenRA.Platforms.Default/OpenGL.cs @@ -513,6 +513,14 @@ namespace OpenRA.Platforms.Default Features ^= GLFeatures.DebugMessagesCallback; } + // Older Intel on Windows is broken too + if (Features.HasFlag(GLFeatures.DebugMessagesCallback) && Platform.CurrentPlatform == PlatformType.Windows) + { + var renderer = glGetString(GL_RENDERER); + if (renderer.Contains("HD Graphics") && !renderer.Contains("UHD Graphics")) + Features ^= GLFeatures.DebugMessagesCallback; + } + // Setup the debug message callback handler if (Features.HasFlag(GLFeatures.DebugMessagesCallback)) {