Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.

Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Glossary:DirectX/DirectDraw troubleshooting

From PCGamingWiki, the wiki about fixing PC games


Example of a DirectDraw issue in Patrician 3 - the game fails to refresh the map properly if the player enters and exits the main menu.
Example of a DirectDraw issue in Patrician 3 - the game fails to refresh the map properly if the player enters and exits the main menu.
Windows XP, Vista and 7 have compatibility issues with DirectDraw games using 256-color depth resulting in incorrect colors.
On Windows 7, these applications can also fully lock up the display, requiring a hard reset of the system.[1]
On Windows 8 and later, the rainbow color issue is generally not present, but DirectDraw compatibility is still low in general. Attempting to run games which use DirectDraw can lead to one of the following outcomes, depending on the game:

Affected titles

List of DirectDraw games


This issue appears to be caused by explorer.exe resetting the system palette, essentially overwriting the palette defined by the game (hence the rainbow colors). This is evidenced by how taking a screenshot of an affected game will show just the discoloration with black where the other game assets would be rendered and by the fix itself.

These games rely on DirectDraw, an API in DirectX (versions 7 and earlier) which was used to render graphics and is now deprecated. They used an exclusive color palette; they would set the system palette (the colors the system can use, back when there were only 256 colors) to the palette the game wants to use. However, some applications try to set their own exclusive palette, causing conflicting colors since the game's exclusive palette is no longer actually exclusive and is set to the wrong colors. In newer versions of Windows, CSRSS and the desktop window (explorer.exe) set their own palette, which causes the odd colors.[2]


Custom DirectDraw wrappers

These are small .dll files which are to be placed in the same directory as the target game's executable. They differ in implementation.
The choice of the wrapper is handled case-by-case. Try several of them out and compare their performance until the ideal solution is reached.
cnc-ddraw - converts API calls to Direct3D 9, OpenGL or GDI; additionally supports framerate limiting, vertical sync, mouse sensitivity scaling, borderless windowed mode, and upscaling via GLSL
DDrawCompat - no API conversion, tries to fix broken calls rather
DXGL - converts API calls to OpenGL
DxWrapper - uses a combination of multiple methods, including implementations of other open-source renderers as switches; requires manual .ini editing
WineD3D - based on Wine's Direct3D emulation, converts API calls to OpenGL

General DirectX emulators

DxWnd was originally created to enable old DirectX games to run in a window. Currently, it provides even more features: It can fix the odd rainbow color issue, enable time stretching, and you can decide between running the game in a window or in full screen.
dgVoodoo 2 converts old DirectX and Glide calls to Direct3D 11/12 ones.


DirectDraw Compatibility Tool is designed to fix color palette corruption in old games.
w7ddpatcher is another simple method.
PalettestealerSuspender prevents palette issues using a different method.[3]
Display Changer II changes the Windows desktop width, height, color depth, refresh rate, and rotation temporarily or permanently (via a configuration file). Can also run an application in a specific display setting and return to the previous resolution when the application closes.

Registry hack

Windows 7 actually has a built-in, hidden fix for this issue, but requires editing the registry.
Registry hack[3][4]
  1. Run the game at least once and exit out of it.
  2. Open the Registry Editor and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DirectDraw\MostRecentApplication.
  3. Take a note of the name, executable name, and the hexadecimal ID which looks similar to this: 0x02e41c67
  4. Remove the 0x prefix of the ID and separate the values into pairs, like so: 02 e4 1c 67
  5. Take the pairs and reverse their order, like so: 67 1c e4 02
  6. Open a text editor and add the registry text below. Change NameOfGame and Name appropriately for the target game, leave Flags untouched, and enter the new ID while keeping commas intact. If running a 32-bit system, remove Wow6432Node from the path.
Windows Registry Editor Version 5.00


7. Save the file as fix.reg to an easily accessible location and run it as administrator to import it to the registry.

Kill Explorer process with batch script

Use a batch script
  • Paste the following into a text editor and save as a batch script (.bat file) in the game's directory, then run it:
TASKKILL /F /IM "explorer.exe" 
start /w [insert executable name here].exe 
start explorer.exe
If the script fails or crashes before it restores the Explorer process, it will result in a blank desktop screen. In this case, manually restart the process by calling the Run window (pressing Win+R) and typing explorer

See also