Skip to content

Commit

Permalink
DISTS: Fix OpenGL renderer issue for builds with MSYS2/Mingw64 or MSY…
Browse files Browse the repository at this point in the history
…S2/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 1rst and 2nd generations. In those systems, launching a game in ScummVM (built with MSYS2/Mingw)
with the OpenGL renderer would cauase 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
LWJGL/lwjgl#119
msys2/MSYS2-packages#454
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69880
  • Loading branch information
antoniou79 committed Aug 1, 2019
1 parent 886e18f commit 08780de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dists/scummvm.rc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#define IDI_ICON 1001
#define IDI_COUNT 1002
#define ID_GDF_XML __GDF_XML
#define IDR_RT_MANIFEST1 1

IDR_RT_MANIFEST1 RT_MANIFEST DISCARDABLE "dists/win32/scummvm.exe.manifest"
IDI_ICON ICON DISCARDABLE "icons/scummvm.ico"
IDI_COUNT ICON DISCARDABLE "icons/count.ico"

Expand All @@ -31,13 +33,13 @@ fonts.dat FILE "dists/engine-data/fonts.dat"
#endif

#if PLUGIN_ENABLED_STATIC(ACCESS)
access.dat FILE "dists/engine-data/access.dat"
access.dat FILE "dists/engine-data/access.dat"
#endif
#if PLUGIN_ENABLED_STATIC(CRYO)
cryo.dat FILE "dists/engine-data/cryo.dat"
#endif
#if PLUGIN_ENABLED_STATIC(CRYOMNI3D)
cryomni3d.dat FILE "dists/engine-data/cryomni3d.dat"
cryomni3d.dat FILE "dists/engine-data/cryomni3d.dat"
#endif
#if PLUGIN_ENABLED_STATIC(DRASCULA)
drascula.dat FILE "dists/engine-data/drascula.dat"
Expand Down Expand Up @@ -82,7 +84,7 @@ toon.dat FILE "dists/engine-data/toon.dat"
wintermute.zip FILE "dists/engine-data/wintermute.zip"
#endif
#if PLUGIN_ENABLED_STATIC(XEEN)
xeen.ccs FILE "dists/engine-data/xeen.ccs"
xeen.ccs FILE "dists/engine-data/xeen.ccs"
#endif
#if PLUGIN_ENABLED_STATIC(AGI)
pred.dic FILE "dists/pred.dic"
Expand Down
9 changes: 9 additions & 0 deletions dists/win32/scummvm.exe.manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

0 comments on commit 08780de

Please sign in to comment.