From e9623740f0529fd06b3bdecb0cf657a74a4a6032 Mon Sep 17 00:00:00 2001 From: Antoniou Athanasios Date: Sun, 4 Aug 2019 07:18:50 -0400 Subject: WIN32: Add a default application manifest This fixes an OpenGL renderer issue for builds with MSYS2/Mingw64 or MSYS2/Mingw32 The issue pertains to MSYS2 adding a default manifest file (default-manifest.o) to the executable The bug is for PC systems with GPU drivers that were not properly supported for Windows 10 systems, like Intel HD Graphics series 1st and 2nd generations. In those systems, launching a game in ScummVM (built with MSYS2/Mingw) with the OpenGL renderer would cause the game screen to be a white blank image, and various warnings would be output to the console, eg. "WARNING: GL ERROR: GL_INVALID_ENUM on glTexSubImage2D(0x0DE1, 0, 0, area.top, src.w, area.height(), _glFormat, _glType, src.gere.cpp:167)!" This was due to MSYS2/Mingw builds trying to load the (poorly supported) GPU driver while advertising support for Windows 10 in their embedded default Manifest file. Hence, the GPU driver DLL (eg ig4icd64.dll) would be unloaded, causing the bug. More information is available in the following links: https://github.com/pal1000/save-legacy-intel-graphics https://github.com/LWJGL/lwjgl/issues/119 https://github.com/msys2/MSYS2-packages/issues/454 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69880 Credits to sluicebox for the VS GenerateManifest flag --- devtools/create_project/msbuild.cpp | 1 + devtools/create_project/visualstudio.cpp | 2 ++ dists/scummvm.rc | 7 ++++--- dists/win32/scummvm.exe.manifest | 9 +++++++++ 4 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 dists/win32/scummvm.exe.manifest diff --git a/devtools/create_project/msbuild.cpp b/devtools/create_project/msbuild.cpp index a2cde964e2..fe73509b73 100644 --- a/devtools/create_project/msbuild.cpp +++ b/devtools/create_project/msbuild.cpp @@ -398,6 +398,7 @@ void MSBuildProvider::createBuildProp(const BuildSetup &setup, bool isRelease, b "\t\n" "\t\t<_PropertySheetDisplayName>" << setup.projectDescription << "_" << configuration << outputBitness << "\n" "\t\t" << (isRelease ? "false" : "true") << "\n" + "\t\tfalse\n" "\t\n" "\t\n" "\t\t\n"; diff --git a/devtools/create_project/visualstudio.cpp b/devtools/create_project/visualstudio.cpp index 44bbf6ba91..ba0d103d40 100644 --- a/devtools/create_project/visualstudio.cpp +++ b/devtools/create_project/visualstudio.cpp @@ -289,6 +289,7 @@ void VisualStudioProvider::createBuildProp(const BuildSetup &setup, bool isRelea "\t + + + + + + + + -- cgit v1.2.3