Configuration
narzoul edited this page on Mar 24 · 13 revisions
Configuration files
DDrawCompat supports configuration since v0.4.0 and loads the following list of configuration files on startup:

Global configuration:
%PROGRAMDATA%\DDrawCompat\DDrawCompat.ini
User configuration:
%LOCALAPPDATA%\DDrawCompat\DDrawCompat.ini
Directory configuration:
.\DDrawCompat.ini
Process configuration:
.\DDrawCompat-exename.ini
Overlay configuration:
.\DDrawCompatOverlay-exename.ini
Note: exename is the name of the current executable file, without the .exe file extension. %PROGRAMDATA% and %LOCALAPPDATA% usually expand to "C:\ProgramData" and "C:\Users\username\AppData\Local" respectively and may be hidden in File Explorer by default. If logging is enabled, the log file shows the fully expanded path of all configuration files.

Configuration files are not created automatically, except for the overlay configuration, as detailed in the Overlay section below. Note that any files created by DDrawCompat (including the log file and the overlay configuration file) may be redirected to %LOCALAPPDATA%\VirtualStore\<path-to-app> if the application is running without elevated privileges and is installed under a protected Windows directory (e.g., under Program Files).

Format and semantics
All files are in text format similar to the INI file format, but without sections.

Settings are specified as name/value pairs, where the setting's name and its value are separated by an equals sign (=). Only one setting can be specified per line. In case of multi-valued settings, comma is used as the separator between values.

Some settings allow an additional integer parameter to be specified for some of their values. The parameter value can be optionally specified in parentheses following the setting value. If the parameter is not specified or invalid, a default value will be used instead.

All setting names and values are case-insensitive.

Comments can be started by a semicolon (;) or hashmark (#) and last until the end of the line. Spaces and tabs are allowed around separators and at the beginning and end of lines.

A valid setting specification overrides any previous value of the same setting. Invalid values are ignored, and the previous value is kept. If no valid value is given for a setting in any of the configuration files, its default value will be used.

Overlay
Some of the settings can also be changed in-game via an overlay. Use the hotkey specified by the ConfigHotKey setting (Shift+F11 by default) to open or close the overlay. The overlay appears centered on the screen and can be used in windowed mode also. Its position cannot be changed.

While the overlay is open, mouse input is redirected to a new cursor that can be used to control it. Keyboard input is not redirected and will continue to be passed on to the application.

The overlay displays rows of settings, with the setting's name to the left, followed by a combo box showing its current value and allowing it to be changed. If the selected value allows a parameter to be specified, then the name of the parameter appears at the end of the row, followed by a horizontal scroll bar that can be used to change the parameter's value.

The row under the mouse cursor is highlighted by a yellow rectangle. Clicking anywhere inside it will focus the view on it, hiding the rest of the overlay window. This allows for a better preview of the changes. Clicking outside the row releases the focus.

The combo box dropdown can be opened by clicking on the box and can be closed by clicking outside the dropdown list. Clicking on any of the list elements immediately applies the new setting, without closing the dropdown list.

The parameter values can be changed by clicking or holding the left mouse button on the left or right arrow of the scroll bar. Clicking on the thumb track (between the arrows) will scroll towards the cursor's position by 5% of the total value range. Holding down the left mouse button on the thumb track will make the thumb follow the cursor. All changes are applied immediately. The parameter's current value can be seen in parentheses within the combo box.

Note that the game should be continuously rendering in the background in order for any setting changes to be immediately visible. Visual glitches may occur when changing settings this way, possibly requiring an application restart to resolve.

The "Export" button saves the current settings to the overlay configuration file. The previous contents of the file (including any manual modifications) are discarded. Only the settings that can be changed through the overlay are exported. If a setting has the same value as the one specified by the base configuration files (1-4), then it will be commented out in the exported file.

The "Import" button reloads the settings from the overlay configuration file, which is also automatically loaded on startup.

The "Reset all" button resets all settings to their base value, i.e., the value obtained from the base configuration files (1-4).

The above buttons are disabled (shown with a gray label) if clicking on them would have no effect.

The "Close" button or the "X" button closes the overlay. All changes are kept when the overlay is closed, until the application exits. Exported changes also persist across restarts.

Settings
The following section shows the available setting names, descriptions, possible values and default values. If a possible value allows a parameter to be specified, then the name of the parameter, the permitted range of its values and its default value are shown respectively as (Name: min..max | default).

For example, consider the following specification:

scale(Gap: 1..100 | 50)
This means that the parameter value must be an integer between 1 and 100 (inclusive), and if not specified (or specified incorrectly), it will default to 50. Therefore, scale(1) and scale(100) are valid values, but scale(0) and scale(101) are not, and would be interpreted as scale(50) instead, just like a plain scale setting without parentheses would be. The name of the parameter is Gap in this case, but this is not important, as it is only used as a label in the configuration overlay.

AlternatePixelCenter
Direct3D 9 and older versions have the (0, 0) pixel coordinate at the center of the top-left pixel instead of at the top-left corner of it. Therefore, applications should shift their vertex coordinates by a half pixel when trying to render a textured quad with perfect 1:1 texel-to-pixel mapping. Refer to the Directly Mapping Texels to Pixels (Direct3D 9) article of the Windows API documentation for details.

Unfortunately, many old applications didn't get this right, causing various display glitches, such as horizontal or vertical lines around sprite edges or at the edges of the screen, or hard to read text. Resolution scaling, antialiasing and texture filtering overrides can make this issue worse. Enabling this setting may correct some of these glitches.

Possible values:

on: Offset vertex coordinates by -0.5 pixels along both axes.
off: Don't offset vertex coordinates.
custom(Offset: -100..100 | -50): Offset vertex coordinates by Offset/100 pixels along both axes.
Default: off

AltTabFix
May help in some cases where the application doesn't correctly restore its resources after alt-tabbing, usually resulting in missing objects or textures.

Possible values:

keepvidmem(KeepPrimary: 0..1 | 1): Prevent the application from losing video memory surfaces when minimizing from fullscreen mode. The primary surface is kept only if the KeepPrimary parameter is set to 1. Some applications expect the primary surface to be lost.
noactivateapp(PassToApp: 0..1 | 1): Do not notify DirectDraw about alt-tabbing. This keeps all video memory intact as with the keepvidmem(1) option, and also bypasses any other special handling done by DirectDraw. Only the fullscreen window is minimized. If the PassToApp parameter is set to 0, the application is also not notified about alt-tabbing. This may have side effects, such as not pausing a game that normally auto-pauses when minimized, or continuing to play music/sounds in the background.
off
Default: off

Antialiasing
Forces multisample antialiasing (MSAA) on Direct3D rendered content. May introduce visual glitches.

All values (except off) allow a parameter value between 0 and 7 to select a quality level. The meaning of the quality levels is driver-specific and generally not well documented. The maximum quality level for each sample count is also driver dependent, but setting a higher value will automatically use the maximum supported value instead. Selecting an unsupported sample count will also fall back to using the highest supported sample count. Check the log file to see the sample counts and their respective maximum quality levels supported by the driver, e.g.: "Supported MSAA modes: msaa(7), msaa2x(4), msaa4x(2), msaa8x(2)".

Not all drivers support downsampling multisampled depth buffers. This prevents accessing such depth buffers via the CPU or copying it to another depth buffer via the GPU, possibly causing display issues in some games. If such an access is requested without proper support, the following message will appear in the log file: "Warning: Resolving multisampled depth buffers is not supported by the GPU driver. Disable antialiasing if experiencing visual glitches". Try using a higher ResolutionScale setting instead of antialiasing in this case.

Possible values:

msaa(Quality: 0..7 | 7): Enable MSAA with a driver-specific sample count, depending on the quality level specified by the parameter.
msaa2x(Quality: 0..7 | 7): Enable MSAA with 2 samples and the quality level specified by the parameter.
msaa4x(Quality: 0..7 | 7): Enable MSAA with 4 samples and the quality level specified by the parameter.
msaa8x(Quality: 0..7 | 7): Enable MSAA with 8 samples and the quality level specified by the parameter.
off: Disable MSAA.
Default: off

BltFilter
Specifies the scaling filter to be used by DirectDraw when stretching or shrinking 2D images on the GPU. CPU scaling always uses point filtering.

Possible values:

point: Use point filtering.
bilinear: Use bilinear filtering.
Default: point

CapsPatches
Specifies a list of modifications to apply to the DirectDraw and Direct3D capabilities that are exposed to the application. This doesn't change the actual hardware capabilities, but can fix bugs in games that don't handle some capabilities correctly. In case of Direct3D, the modifications are only applied to the hardware-accelerated device types (HAL and T&L HAL).

Possible values:

none: Don't apply any modifications.
<Struct>.<FieldId><Operator><Value>: Apply the given Operator (set: =, bitwise AND: &=, bitwise OR: |=) to the given FieldId of the given Struct (DDCAPS, D3DDEVICEDESC or D3DDEVICEDESC7). FieldId must specify a valid numeric field in the given Struct, using C/C++ notation. Array indexing is supported. Value is an unsigned integer, which can be specified in hexadecimal format by prefixing with 0x. Whitespace must no be used anywhere, including around the Operator. For example, D3DDEVICEDESC7.dpcTriCaps.dwTextureCaps|=0x2 adds the D3DPTEXTURECAPS_POW2 flag to the Direct3D 7 triangle texturing capabilities.
Default: none

ColorKeyMethod
Overrides the method used for texture color keying.

Possible values:

none: Disable texture color keying. Mainly useful for debugging purposes.
native: Use the GPU driver's native method. Note that modern drivers generally have buggy and inconsistent implementations, so this setting is not recommended anymore.
alphatest(AlphaRef: 1..255 | 1): Convert color keyed textures to an ARGB format, and perform alpha testing on the alpha value after texture filtering. Discard the pixel if the alpha value is less than AlphaRef.
Default: alphatest(1)

CompatFixes
Specifies a list of miscellaneous compatibility fixes.

Possible values:

none: Don't apply any of these fixes.
nodwmflush: Disable the use of the DwmFlush function for vertical synchronization in borderless fullscreen and windowed modes.
nohalftone: Disable the use of the HALFTONE GDI bitmap stretching mode, as it was not available on Windows 95/98, and may cause graphical glitches in some cases.
nosyslock: Apply the DDLOCK_NOSYSLOCK flag to all DirectDraw surface locks, which allows DirectDraw to be used by other threads while a thread keeps a video memory surface locked.
nowindowborders: Remove window borders that are sometimes unintentionally displayed in fullscreen games, and can also cause mouse clicks or window contents to be offset, even if the borders are not actually visible.
unalignedsurfaces: Force suboptimal alignment for system memory surfaces, which can fix performance issues on some old, buggy GPU drivers.
Default: none

ConfigHotKey
Specifies the hotkey for opening and closing the configuration overlay.

Possible values include most of the VK_* constants specified on the Virtual-Key Codes article of the Windows API documentation. Use the name of the VK_* constant without the VK_ prefix (e.g. tab instead of VK_TAB). Alphanumeric characters (A-Z and 0-9) can be specified as-is. Mouse buttons are not supported.

VK_SHIFT, VK_CONTROL, VK_MENU and their left- and right-hand variants are considered modifier keys. A non-modifier key is always required, and can optionally be prefixed by one or more modifier keys, using plus (+) as a separator character. For example, shift+menu+c is a valid hotkey. menu can also be specified as alt, and control can also be specified as ctrl.

Set to none or an empty value to disable the hotkey.

Default: shift+f11

ConfigRows
List of settings that are shown in the configuration overlay.

Settings that can't be modified via the overlay can also be specified. They will simply show their current values (grayed out) with no controls to change them.

The order of elements in the list also specifies the display order.

Possible values:

allro: Add all read-only (non-modifiable) settings to the overlay.
allrw: Add all read-write (modifiable) settings to the overlay.
SettingName: Add the specified setting to the overlay. If it was already added (e.g. by one of the groups above), then it's only repositioned.
Default: allrw, allro

ConfigTransparency
Sets the amount of transparency for the configuration overlay.

Possible values:

off: The overlay is fully opaque.
alpha(Alpha: 25..100 | 90): The overlay's opacity is set to Alpha percent.
Default: alpha(90)

CpuAffinity
Specifies the list of logical CPU cores that the process can be scheduled on. Many old games have problems running on multiple CPU cores and don't scale well with them anyway, so it's recommended to keep the default single processor affinity in most cases, unless experiencing performance problems.

Possible values:

all: Enable scheduling on all logical CPU cores.
N: Enable scheduling on the logical CPU core identified by N, which is an integer between 1 and the number of logical CPU cores in the system. The maximum supported value for N is 32, even if the system has more cores.
Default: 1

CpuAffinityRotation
Enables rotation of the logical CPU cores selected by the CpuAffinity setting between physical cores with similar performance characteristics (i.e., P-cores to P-cores and E-cores to E-cores).

The rotation is performed approximately 10 times per second.

This can help keep the heat output more even across CPU cores.

Possible values:

on: Enable rotation.
off: Disable rotation.
Default: on

CrashDump
Allows automatic creation of a crash dump when the application encounters an unhandled exception.

The dump file has the same name as the log file, but with a .dmp extension instead of .log.

This setting is intended for developers for debugging purposes.

Possible values:

off: Disable crash dumps.
mini: Enable mini dumps.
full: Enable full dumps.
Default: off

DepthFormat
Overrides the depth buffer format used by Direct3D applications. If the selected format is not supported, the next best format is used.

Possible values:

app: Unforced. Allow the application to choose the depth format.
16: Force 16-bit depth buffers.
24: Force 24-bit depth buffers.
32: Force 32-bit depth buffers.
Default: app

DesktopColorDepth
Color depth to emulate when the application is in windowed mode. Useful for some applications that require a specific color depth to be set for windowed mode.

Possible values:

initial: Use the color depth of the desktop at startup. This can be an emulated color depth set in the application's compatibility settings.
8: Use 8-bit color depth (256 colors).
16: Use 16-bit color depth.
32: Use 32-bit color depth.
Default: initial

DesktopResolution
Display resolution to set or emulate when the application is in windowed mode. Useful for some applications that require a specific resolution to be set prior to startup.

Possible values:

desktop: Use the system's configured desktop resolution.
initial: Use the current desktop resolution at the time when DDrawCompat is loaded, which may be different from the configured desktop resolution if a temporary mode change is in effect (e.g. due to a Windows compatibility setting).
WxH: Use the resolution specified by the integers W (width) and H (height), e.g. 1920x1080. If DisplayResolution is set to app, then the specified value must be supported by the display. Otherwise, the resolution is only emulated, and any resolution specified by the SupportedResolutions setting is allowed.
Default: desktop

DisplayAspectRatio
Overrides the display aspect ratio when DisplayResolution is not set to app.

Possible values:

app: Use the application's internal resolution as the aspect ratio. This keeps the image evenly stretched in the horizontal and vertical direction, but pads the edges of the screen with black borders.
display: Use the display resolution as the aspect ratio. This fills the entire screen, but the image may be stretched disproportionately more in the horizontal or vertical direction.
N:M: Use a custom aspect ratio as specified by the two integers between 1 and 65535, e.g. 4:3.
Default: app

DisplayFilter
Specifies the scaling filter to use when the internal display resolution set by the application doesn't match the resolution forced by the DisplayResolution setting.

Possible values:

point: Use a box filter, which simply duplicates pixels for upscaling, and averages pixels for downscaling.
bilinear(Blur: 0..100 | 0): Use bilinear filtering with the blur factor specified by the parameter. 0 is the least blurry, equivalent to pixel mixing. 100 is the blurriest, equivalent to the usual interpretation of bilinear filtering.
bicubic(Blur: 0..100 | 0): Use a Mitchell-Netravali filter satisfying B + 2C = 1, with B = Blur / 100.
lanczos(Lobes: 2..4 | 2): Use a Lanczos filter with the specified number of lobes on each side (for a total of 2 * Lobes - 1 due to symmetry).
spline(Lobes: 2..4 | 2): Use a spline based filter as defined by Panorama Tools. The Lobes parameter selects between Spline16, Spline36 and Spline64. See also: http://avisynth.nl/index.php/Resize#Spline_based_resizers
Default: bilinear(0)

DisplayRefreshRate
Allows forcing a specific refresh rate for the display.

Possible values:

app: Unforced. Allow the application to change the display refresh rate.
desktop: Use the refresh rate set for the desktop in the registry.
N: Use the refresh rate specified by the integer N, in Hz. The specified value must be supported by the display.
Default: app

DisplayResolution
Allows forcing a specific resolution for the display.

Possible values:

app: Unforced. Allow the application to change the display resolution.
desktop: Use the resolution set for the desktop in the registry.
WxH: Use the resolution specified by the integers W (width) and H (height), e.g. 1920x1080. The specified value must be supported by the display.
Default: desktop

DpiAwareness
Allows overriding the DPI scaling mode of the application.

Refer to the DPI_AWARENESS_CONTEXT article of the Windows API documentation for details.

Using a DPI unaware mode can make windowed applications easier to see on high DPI displays, and can fix oversized dialog boxes in fullscreen mode. However, it can also introduce some problems (see known issues below).

Possible values:

app: Unforced. Use the setting specified by the system.
unaware: DPI unaware.
system: System DPI aware.
permonitor: Per monitor DPI aware. Requires Windows 8.1 or newer.
permonitorv2: Per monitor DPI aware v2. Requires Windows 10 v1703 or newer.
gdiscaled: DPI unaware with improved quality of GDI-based content. Requires Windows 10 v1703 or newer. Currently not supported.
Default: permonitor

Known issues:

The specified value will fail to be applied if the compatibility settings of the executable file also specify an override for high DPI scaling. Check the logs to see if the DpiAwareness override was applied successfully.
The DPI scaling override accessible from the Compatibility tab of the executable's Properties dialog may incorrectly show that no override is active. This can happen if multiple overrides have been added to the registry, e.g. when DirectDraw automatically adds the HIGHDPIAWARE flag to an executable which already had a different override added. (This automatic addition is blocked since DDrawCompat v0.5.0). To fix this, set any override in the dialog, apply the changes, then remove the override and apply the changes again. This should clear the conflicting flags from the registry.
Prior to Windows 10 v1607, DPI unaware borderless fullscreen applications may be scaled twice: once by DisplayFilter up to the virtualized (96 DPI) resolution, and a second time by Windows to the full display resolution. Exclusive fullscreen mode is scaled by DisplayFilter only.
EnableDDrawCompat
Enables or disables the use of DDrawCompat for the current process. This can be useful for selectively applying DDrawCompat only to specific executable files in the current directory, by using Process configuration files (option 4 in the list at the top of this page). Note that DDrawCompat will still be loaded even if disabled, but it won't install any hooks and won't apply any of its own configurations or compatibility fixes. All DirectDraw requests will be forwarded to the system ddraw.dll, without any modifications.

Possible values:

off: Disable DDrawCompat.
on: Enable DDrawCompat.
Default: on

FontAntialiasing
Allows enabling or disabling font antialiasing. Some applications render text incorrectly when font antialiasing is enabled.

On startup, DDrawCompat automatically restores the font antialiasing setting of the system from the registry, and prevents the application from changing the setting for the entire desktop. Instead, the font antialiasing setting is applied only for the current application's windows.

Font antialiasing cannot be enabled for the application if it's disabled globally by the system.

Possible values:

app: Unforced. Use the system setting at startup and allow the application to change it.
on: Enable font antialiasing for the application.
off: Disable font antialiasing for the application.
Default: app

ForceD3D9On12
Allows disabling the native Direct3D 9 driver implementation of the GPU vendor, which forces the system to use the D3D9On12 translation layer instead. D3D9On12 is an independent project and not supported here. This is an experimental setting, likely to introduce more problems than it solves.

Requires Windows 10 or newer, and a GPU that supports DirectX 12.

This setting does the same thing as my standalone project with the same name (ForceD3D9On12), but also applies all fixes and enhancements of DDrawCompat.

Possible values:

on: Use D3D9On12.
off: Use the system default driver, which can be either a native driver or D3D9On12.
forceoff: Use the native driver if possible, even if the system default is D3D9On12. This setting is only meaningful for 12th Gen and newer Intel GPUs using some older driver versions. Recent drivers use the native driver by default and have fewer issues, so a driver update is recommended instead of using this option.
Default: off

FpsLimiter
Attempts to limit the frame rate of the application, which could be used to slow down some games that are running too fast or have e.g. physics issues at high frame rates. It can also help conserve system resources.

Possible values:

off: Do not limit the frame rate.
flipstart(MaxFPS: 10..200 | 60): Limit frame rate by inserting a delay before presenting frames. May have higher input latency, but better compatibility than the flipend option. Only works with fullscreen applications that use page flipping for presentation.
flipend(MaxFPS: 10..200 | 60): Limit frame rate by inserting a delay after presenting frames. Only works with fullscreen applications that use page flipping for presentation.
msgloop(MaxFPS: 10..200 | 60): Limit frame rate by extending the message loop with additional waiting and processing of messages. Attempts to detect frames by catching updates to the primary surface outside of window procedures. May work for applications that render directly to the primary surface without page flipping. It might also allow the cursor to have an independent, unrestricted frame rate.
Default: off

FullscreenMode
Allows choosing the presentation mode for fullscreen applications.

Possible values:

borderless: Use a borderless window that covers the entire screen. Likely has better support for screen recording and faster alt-tabbing. Requires Windows 8 or newer.
exclusive(VSync: 0..1 | 1): Enable exclusive fullscreen mode. Not supported when using D3D9On12. To avoid crashes when NVIDIA G-Sync is enabled, set "Preferred refresh rate" to "Application-controlled" in NVIDIA Control Panel's "Manage 3D Settings" page.
Setting the VSync parameter to 0 enables unrestricted presentation rate for minimal input latency, but may introduce screen tearing artifacts. Note that VSync may still be forced on by graphics driver settings, which may lead to unpredictable behavior when the VSync parameter is set to 0.
Default: borderless

LogLevel
Allows overriding the verbosity of DDrawCompat's logs.

Possible values:

none: Disable logging. No new log files will be created, but existing log files are not removed.
info: Enable informative and error logs only.
debug: Enable low level debug logs. May consume a lot of disk space and negatively affects performance.
trace: Enable even more detailed debug logs. Contains additional information, such as vertex data and execute buffer contents.
Default: info for Release builds, debug for Debug builds

MousePollingRate
Allows limiting the rate of mouse movement events visible to the application while in fullscreen mode. This can fix some issues with games that can't handle high polling rate mice. Note that this uses a low level mouse hook to emulate a lower polling rate, and doesn't physically change the polling rate of the mouse. It also cannot increase the current physical polling rate of the mouse.

Possible values:

native: Use the native mouse polling rate.
125: Limit mouse movement rate to 125 Hz.
250: Limit mouse movement rate to 250 Hz.
500: Limit mouse movement rate to 500 Hz.
1000: Limit mouse movement rate to 1000 Hz.
Default: native

MouseSensitivity
Modifies the sensitivity (movement speed) of the mouse while in fullscreen mode. Note that this uses a low level mouse hook to emulate a different sensitivity, and doesn't physically change the sensitivity of the mouse.

Possible values:

native: Use the default mouse sensitivity provided by Windows and the mouse driver.
desktop(Scale: 10..400 | 100): Try to match the sensitivity of the Windows desktop, with an additional scaling multiplier specified by the Scale parameter, given as a percentage (100 = no additional scaling).
noaccel(Scale: 10..400 | 100): Similar to the desktop setting, but with the "Enhance pointer precision" (mouse acceleration) setting of Windows effectively ignored, as if it was disabled.
Default: desktop(100)

PalettizedTextures
Enables emulation of palettized textures, which is not supported natively by modern GPUs, and may be required by a few games. Converts palettized textures to 32-bit ARGB format. Mipmapping is currently not supported for palettized textures, which may cause some games to crash.

Possible values:

on
off
Default: off

PresentDelay
Allows tuning the maximum number of milliseconds by which presenting a frame on the screen can be delayed. The specified value is a maximum delay only, as DDrawCompat automatically stops the delay when the application reads from any Windows message queue (via GetMessage or PeekMessage). This delay helps in mitigating issues such as flickering mouse cursor or other graphical elements, since many old games render frames in multiple partial screen updates, and the partial results can become visible if presented at the wrong time. However, in some cases this delay might just unnecessarily increase input lag.

Note that presentation timing is also limited by VSync, which can only be bypassed using the FullscreenMode=exclusive(0) setting, but this can lead to screen tearing artifacts.

Possible values:

off: Don't delay frames at all.
on(MaxDelay: 1..50 | 10): Set the maximum frame delay to MaxDelay milliseconds.
Default: on(10)

RenderColorDepth
Allows overriding the color depth used for Direct3D rendered content. 32-bit rendering or dithering can decrease color banding.

The values ending with d8 or d10 are dithered using ordered dithering as a post-processing effect after DisplayFilter is applied. Other values are not dithered.

Possible values:

app: Render at the application's selected color depth.
appd8: Render at 8 bits per channel, then dither to the application's selected color depth (if it's lower).
appd10: Render at 10 bits per channel, then dither to the application's selected color depth.
16: Render at 5:6:5 bits per channel.
16d8: Render at 8 bits per channel, then dither to 5:6:5 bits per channel.
16d10: Render at 10 bits per channel, then dither to 5:6:5 bits per channel.
32: Render at 8 bits per channel.
32d10: Render at 10 bits per channel, then dither to 8 bits per channel.
Default: 32

ResolutionScale
Allows overriding the resolution used for Direct3D rendered content. May introduce visual glitches.

Note that setting a very high resolution can result in a significant performance drop and instability. It's usually better to limit the resolution to display(1) and use the Antialiasing setting for further visual improvements, if possible.

The maximum allowed resolution depends on the GPU's texture size limit.

Possible values:

app(Multiplier: 1..16 | 1): Use the integer scale factor specified by the parameter.
display(Multiplier: -16..16 | 1): Use the ratio of the actual display resolution (possibly adjusted by DisplayAspectRatio) and the emulated display resolution as the base scale factor, and multiply it by the absolute parameter value. If the parameter is positive, the final scale factor is rounded up to the nearest integer, which can reduce the amount of visual glitches. If the parameter is 0, scaling is disabled.
WxH(Multiplier: -16..16 | 1): Use the ratio of the specified resolution value, e.g. 1920x1080 (possibly adjusted by DisplayAspectRatio) and the emulated display resolution as the base scale factor, and multiply it by the absolute parameter value. If the parameter is positive, the final scale factor is rounded up to the nearest integer, which can reduce the amount of visual glitches. If the parameter is 0, scaling is disabled.
Default: app(1)

ResolutionScaleFilter
Selects the downscaling filter used when CPU access is required for a resolution scaled render target.

This setting is meant to fix some visual glitches with resolution scaling, e.g. 3D characters that leave a pixel trail around them. It's recommended to keep the default point filter unless experiencing such issues, as it's faster and shouldn't have lower image quality than bilinear filtering.

Possible values:

point: Point filtering.
bilinear: Bilinear filtering.
Default: point

SoftwareDevice
Allows overriding the device type used by Direct3D for software rendering. Hardware-accelerated device types (HAL and T&L HAL) are not affected.

Check the "Using Direct3D device type:" info logs to find out which device type is used natively by an application.

The default setting replaces the Ramp device with the RGB device, since the Ramp device is not supported on recent Windows versions.

Possible values:

app: Allow the application to select the device type.
hal: Replace software devices with a hardware-accelerated (HAL) device. This may allow the use of settings such as Antialiasing, ResolutionScale and TextureFilter. Not supported for applications rendering in 8-bit (palettized) color depth.
ref: Replace software devices with the Reference Rasterizer (for debugging purposes). Requires a copy of d3dref.dll, which can be obtained e.g. from the DirectX 7 SDK.
rgb: Replace software devices with the RGB device.
Default: rgb

SpriteAltPixelCenter
Allows using a different AlternatePixelCenter setting for sprites detected by the SpriteDetection setting.

Possible values:

apc: Use the main AlternatePixelCenter setting for sprites also.
on: Offset sprite vertex coordinates by -0.5 pixels along both axes.
off: Don't offset sprite vertex coordinates.
custom(Offset: -100..100 | -50): Offset sprite vertex coordinates by Offset/100 pixels along both axes.
Default: apc

SpriteDetection
Allows the detection of Direct3D sprites (orthogonally projected texture images) in order to alleviate visual glitches when using the Antialiasing, ResolutionScale or TextureFilter settings. Sprites are often used for displaying menus, HUDs or background images in 3D games.

Antialiasing is automatically disabled for detected sprites, TextureFilter is replaced by SpriteFilter, and texture coordinates can optionally be fixed up by SpriteTexCoord.

Sprite detection only works with software vertex processing.

Possible values:

off: Disable sprite detection.
point: Detect point filtered polygons with identical Z coordinates as sprites.
zconst: Detect all polygons with identical Z coordinates as sprites.
zmax(ZMax: 0..100 | 0): Detect polygons with identical Z coordinates less than or equal to a certain threshold as sprites. The threshold is the parameter value divided by 100.
Default: off

SpriteFilter
Overrides texture filtering for sprites detected by the SpriteDetection setting.

Possible values:

app: Allow the application to specify the texture filtering.
point: Force point filtering on sprites.
bilinear: Force bilinear filtering on sprites.
Default: app

SpriteTexCoord
Applies adjustments to the texture coordinates or texture sampling method of sprites detected by the SpriteDetection setting.

Possible values:

app: No adjustments are applied.
clamp: Clamp texture samples inside the texture boundary if the vertices' texture coordinates are within the texture boundary or less than 1 texel outside of it.
clampall: Clamp all texture samples inside the texture boundary. Faster than clamp, but may break some effects, e.g. texture mirroring or tiling.
round(Offset: -50..50 | 0): Round texture coordinates to the nearest texel boundary after adding an offset to both components. The offset is the parameter value divided by 100, in texels.
Default: app

StatsAggregateTime
Number of seconds over which aggregate statistics (average, min, max) are calculated for the stats overlay.

Must be an integer value between 1 and 60.

Default: 3

StatsColumns
Specifies the columns to display in the stats overlay.

Possible values:

label: Add a column with the names of the stats in each row.
cur: Add a column for the current value (averaged over the last update interval, see StatsUpdateRate)
avg: Add a column for the average value (averaged over the last StatsAggregateTime seconds)
min: Add a column for the minimum value (during the last StatsAggregateTime seconds)
max: Add a column for the maximum value (during the last StatsAggregateTime seconds)
Default: label, cur, avg, min, max

StatsHotKey
Specifies the hotkey for opening and closing the stats overlay.

See the description of ConfigHotKey for the format of the value.

Default: shift+f12

StatsPosX
Specifies the horizontal position of the stats overlay.

Possible values:

left: Use the leftmost position.
center: Center the overlay horizontally.
right: Use the rightmost position.
custom(Position: 0..100 | 100): Position the overlay between the leftmost (0) and rightmost (100) positions according to the parameter.
Default: right

StatsPosY
Specifies the vertical position of the stats overlay.

Possible values:

top: Use the topmost position.
center: Center the overlay vertically.
bottom: Use the bottommost position.
custom(Position: 0..100 | 0): Position the overlay between the topmost (0) and bottommost (100) positions according to the parameter.
Default: top

StatsRows
Specifies the rows to display in the stats overlay.

Possible values:

label: Add a row with the names of the columns.
vblankcount, presentcount, flipcount, blitcount, lockcount: Number of vblank/present/flip/blit/lock events.
vblanktime, presenttime, fliptime, blittime, locktime: Milliseconds between vblank/present/flip/blit/lock events.
vblankrate, presentrate, fliprate, blitrate, lockrate: 1000 divided by the corresponding time stat above (after aggregation).
ddiusage: Percentage of CPU time spent in the user mode DDI (display driver interface).
gdiobjects: Number of GDI object handles in use. May be used for detecting GDI resource leaks. Bad things happen if this gets close to ~10000.
debug: Information useful for debugging (total number of present events, stat updates, and a timestamp). Columns are ignored.
The "events" referenced above are:

vblank: The display entered the vertical blanking interval. Useful as an indicator of the display refresh rate.
present: A new frame is queued up for display at the next vertical blanking interval.
flip: A full frame is ready to be displayed.
blit: A subrectangle of the currently displayed frame is updated.
lock: The currently displayed frame is locked for direct CPU writes.
Default: label, presentrate, fliprate, blitcount, lockcount

StatsTransparency
Sets the amount of transparency for the stats overlay.

Possible values:

off: The overlay is fully opaque.
alpha(Alpha: 25..100 | 75): The overlay's opacity is set to Alpha percent.
Default: alpha(75)

StatsUpdateRate
Number of updates per second for the stats overlay.

Must be an integer value between 1 and 10.

Default: 5

SupportedDepthFormats
Overrides the list of depth buffer formats that can be used by the application.

For details of the values starting with a capital letter, see: D3DFORMAT - Buffer Formats

Possible values:

D32
D15S1
D24S8
D24X8
D16
S1D15
S8D24
X8D24
15: Allow D15S1 and S1D15.
16: Allow D16.
24: Allow D24S8, D24X8, S8D24 and X8D24.
32: Allow D32.
all: Allow all formats.
Default: all

SupportedDevices
Specifies the list of Direct3D device types that can be enumerated and used by the application. May be useful to force an application to choose a different device type than it would normally prefer.

Possible values:

all: Allow all device types.
mmx: Allow the MMX device.
ramp: Allow the Ramp device.
ref: Allow the Reference device.
rgb: Allow the RGB device.
hal: Allow the HAL device.
tnl: Allow the T&L HAL device.
Default: all

SupportedRefreshRates
Specifies the list of supported display refresh rates that can be enumerated and used by the application. This can be used as a workaround for applications that have buffer overflow bugs when too many display modes are enumerated, or to force an application to select a single specific refresh rate.

Possible values:

native: Allow all natively supported refresh rates.
desktop: Allow the desktop's configured refresh rate.
RefreshRate: Allow the specified integer RefreshRate value in Hz, e.g. 60 or 144. When using the DisplayResolution=app setting, the specified refresh rate must be supported at the resolution selected by the application. Otherwise, the specified refresh rate must be supported at the resolution selected by the DisplayResolution setting.
Default: native

SupportedResolutions
Overrides the list of supported resolutions. Affects both the resolutions reported to the application, as well as the resolutions it can set.

This can be useful for applications that can't handle too many supported resolutions, or that require support for resolutions not natively supported by the display. The latter also requires using the DisplayResolution setting to force a natively supported resolution.

Possible values:

native: Include all natively supported resolutions.
WxH: Include the resolution specified by the integers W (width) and H (height), e.g. 1920x1080.
Default: native, 640x480, 800x600, 1024x768

SupportedTextureFormats
Overrides the list of texture formats that can be used by the application. Some applications may crash when too many formats are available.

For details of the values starting with a capital letter, see: D3DFORMAT

Possible values:

R8G8B8
A8R8G8B8
X8R8G8B8
R5G6B5
X1R5G5B5
A1R5G5B5
A4R4G4B4
R3G3B2
A8
A8R3G3B2
X4R4G4B4
A8P8
P8
L8
A8L8
A4L4
V8U8
L6V5U5
X8L8V8U8
FourCC code: Allow the specified FourCC code, e.g. DXT5.
argb: Allow A8R8G8B8, A1R5G5B5 and A4R4G4B4.
bump: Allow V8U8, L6V5U5 and X8L8V8U8.
dxt: Allow all DXTn FourCCs: DXT1, DXT2, DXT3, DXT4, DXT5.
lum: Allow L8, A8L8 and A4L4.
rgb: Allow X8R8G8B8, R5G6B5, X1R5G5B5 and X4R4G4B4.
all: Allow all formats.
Default: all

SurfacePatches
Allows adding safety buffers to the top or bottom of video memory surfaces while they are accessed by the CPU. This can fix some applications that erroneously read or write past the beginning or end of the surface memory.

Possible values:

top:N: Add N extra rows of pixels to the top of each surface memory.
bottom:N: Add N extra rows of pixels to the bottom of each surface memory.
none: No patches are applied.
Default: none

TerminateHotKey
Specifies a hotkey that can be used for forcefully terminating the application (e.g. in case it's hung).

See the description of ConfigHotKey for the format of the value.

Default: ctrl+alt+end

TextureFilter
Overrides texture filtering for Direct3D rendered content. May introduce visual glitches.

Possible values:

app: Use the application-specified filtering.
point: Use point filtering.
bilinear: Use bilinear filtering.
trilinear: Use trilinear filtering.
af2x: Use 2x anisotropic filtering.
af4x: Use 4x anisotropic filtering.
af8x: Use 8x anisotropic filtering.
af16x: Use 16x anisotropic filtering.
Default: app

ThreadPriorityBoost
Enables or disables dynamic thread priority boosts for threads. Refer to the Priority Boosts article of the Windows API documentation for details.

Changing this setting may fix stuttering and performance issues in some games when using single CPU core affinity.

Possible values:

app: Use the application or system settings.
off: Disable dynamic thread priority boosts for all application threads.
on: Enable dynamic thread priority boosts for all application threads.
main: Enable dynamic thread priority boosts only for the main application thread.
Default: off

VertexBufferMemoryType
Overrides the memory type used for vertex buffers. System memory may be faster because it allows instant CPU access.

Possible values:

app: Allow the application to specify the memory type.
sysmem: Use system memory for all vertex buffers.
vidmem: Use video memory for all vertex buffers.
Default: sysmem

VertexFixup
Specifies whether DDrawCompat uses the CPU or the GPU to apply various vertex fixups in case of software vertex processing. Using the GPU is faster, but slightly less accurate, which may cause minor 3D graphical artifacts in rare cases.

Such vertex fixups are done in the following situations:

When using the AlternatePixelCenter=on setting
When using the ResolutionScale setting to upscale rendering
When using the SpriteTexCoord=round setting
Fixing invalid Z and RHW coordinates to avoid graphical artifacts
Possible values:

cpu: Use the CPU for vertex modifications. Does not work on video memory vertex buffers, so it should be used with VertexBufferMemoryType=sysmem.
gpu: Use the GPU for vertex modifications.
Default: gpu

ViewportEdgeFix
Allows fixing oddly colored lines along the bottom or right edges of any Direct3D rendered scene that uses software vertex processing. This issue happens if an application clips the vertex coordinates in a way that the scene doesn't fully cover the last row or column of pixels, and can be more apparent when using resolution scaling or antialiasing. If similar lines occur at the top or left edges instead, then try changing the AlternatePixelCenter setting first.

Possible values:

off: Don't apply any correction.
scale(Gap: 1..100 | 50): Slightly scale the scene so that the last pixel row and column become fully covered. The Gap parameter indicates the percentage of the last pixel that needs to be covered. Sprites detected by the SpriteDetection setting are not scaled.
Default: off

VSync
Controls whether the application must wait for a page flip to finish before updating the primary surface again. This can be used for limiting the frame rate to the refresh rate (or a fraction of it) for fullscreen applications that use page flipping. This setting has no effect on application that don't use page flipping.

Note that DDrawCompat uses VSync for presentation to the display itself, irrespective of this setting. This can be disabled by using the FullscreenMode=exclusive(0) setting. Otherwise, if VSync is set to off, some frames will be discarded when the frame rate is higher than the refresh rate.

Possible values:

app: Use the application settings (on or off).
on(Interval: 1..16 | 1): After a page flip, delay any rendering requests for the new and the previous display surfaces until the specified number of vertical blanking intervals occur. When an application uses double buffering, this has a similar effect as the FpsLimiter=flipstart setting, with the limit set to the display refresh rate divided by Interval.
wait(Interval: 1..16 | 1): After a page flip, wait for the specified number of vertical blanking intervals to occur before starting the rendering of the next frame. This has the same effect as the FpsLimiter=flipend setting, with the limit set to the display refresh rate divided by Interval.
off: Allow unrestricted rendering without any delays.
Default: app

WinVersionLie
Allows overriding the Windows version information reported to the application. Some applications may work differently or refuse to run at all if they detect specific Windows versions.

The parameter value specifies an optional Service Pack number. 0 means no Service Pack.

Possible values:

off: Do not override the Windows version information.
95(SP: 0..5 | 0): Use Windows 95 version information.
nt4(SP: 0..5 | 0): Use Windows NT 4.0 version information.
98(SP: 0..5 | 0): Use Windows 98 version information.
2000(SP: 0..5 | 0): Use Windows 2000 version information.
xp(SP: 0..5 | 0): Use Windows XP version information.
Default: off

Pages 3
Find a page…
Home
Configuration
Configuration files
Format and semantics
Overlay
Settings
AlternatePixelCenter
AltTabFix
Antialiasing
BltFilter
CapsPatches
ColorKeyMethod
CompatFixes
ConfigHotKey
ConfigRows
ConfigTransparency
CpuAffinity
CpuAffinityRotation
CrashDump
DepthFormat
DesktopColorDepth
DesktopResolution
DisplayAspectRatio
DisplayFilter
DisplayRefreshRate
DisplayResolution
DpiAwareness
EnableDDrawCompat
FontAntialiasing
ForceD3D9On12
FpsLimiter
FullscreenMode
LogLevel
MousePollingRate
MouseSensitivity
PalettizedTextures
PresentDelay
RenderColorDepth
ResolutionScale
ResolutionScaleFilter
SoftwareDevice
SpriteAltPixelCenter
SpriteDetection
SpriteFilter
SpriteTexCoord
StatsAggregateTime
StatsColumns
StatsHotKey
StatsPosX
StatsPosY
StatsRows
StatsTransparency
StatsUpdateRate
SupportedDepthFormats
SupportedDevices
SupportedRefreshRates
SupportedResolutions
SupportedTextureFormats
SurfacePatches
TerminateHotKey
TextureFilter
ThreadPriorityBoost
VertexBufferMemoryType
VertexFixup
ViewportEdgeFix
VSync
WinVersionLie
Installation guide
Clone this wiki locally
https://github.com/narzoul/DDrawCompat.wiki.git
Footer
© 2025 GitHub, Inc.
Footer navigation
Terms
Privacy
Security
Status
Docs
Contact
Manage cookies
Do not share my personal information
