Skip to content

Configuration (advanced)

Elisha Riedlinger edited this page Jul 4, 2025 · 14 revisions

Advanced Configuration for the DxWrapper

The default Settings.ini file has limited configuration options to make it easy to use DxWrapper. In most cases all of the things that are needed can be configured from here. However in rare cases you may need to enable an advanced option. To see the advanced options you can open the AllSettings.ini file and add setting from there. This page covers those advanced settings that are not commonly needed.

When DxWrapper loads it tries to read the ini file. It looks for an ini file with the same name as the dll file. For example if you are using the winmm.dll file then it will look for a file called winmm.ini. Make sure to rename the ini file to match the dll name.

DxWrapper also can read environment variables on load and it will honor those. This prevents the need to have an extra ini file. See Added ability to configure settings via environment variables and #367.

Also see: Configuration

Also see: Configuration (stub)

Table of Contents:

Below are advanced settings for DxWrapper:

General

RealDllPath

See the Configuration page for details.

WrapperMode

See the Configuration page for details.

LoadCustomDllPath

See the Configuration page for details.

ExcludeProcess

See the Configuration page for details.

IncludeProcess

See the Configuration page for details.

RunProcess

See the Configuration page for details.

WaitForProcess

See the Configuration page for details.

DisableLogging

See the Configuration page for details.

Plugins

LoadPlugins

See the Configuration page for details.

LoadFromScriptsOnly

See the Configuration page for details.

Compatibility

Dd7to9

See the Configuration page for details.

D3d8to9

See the Configuration page for details.

D3d9to9Ex

See the Configuration page for details.

DDrawCompat

See the Configuration page for details.

Dinputto8

See the Configuration page for details.

DisableHighDPIScaling

High DPI scaling can cause Text Clipping, Blurring, Inconsistent font sizes or rendering full-screen DirectX applications partially off screen. Drawing (or writing) to someplace that doesn't exist may also cause crashes.

By default this option does not exist in the ini configuration file and dxwrapper will automatically disable high DPI scaling. You only need to add this option to the ini file if you want to prevent dxwrapper from disabling high DPI. This option can be set to 0 or 1.

DisableGameUX

See the Configuration page for details.

EnableDdrawWrapper

See the Configuration page for details.

EnableD3d9Wrapper

See the Configuration page for details.

EnableDinput8Wrapper

See the Configuration page for details.

EnableDsoundWrapper

See the Configuration page for details.

EnableOpenDialogHook

See the Configuration page for details.

WinVersionLie

See the Configuration page for details.

WinVersionLieSP

See the Configuration page for details.

FixPerfCounterUptime

This option will patch performance counter to fake uptime so that games see uptime as less than 1 day in order to fix shuttering and performance issues that happen when the device has long-uptime. This can be set to '0' for off or '1' for on.

ForceTermination

This enables DxWrapper to try and detect when the application has hung and close the application automatically. Some games like Might and Magic IX and Outpost 2 will hang on exit and requires this. DxWrapper uses two different means to detect when then application has hung. The first is detecting when the main windows has either closed or is very small. The second is by monitoring the threads and detecting when the DxWrapper thread has closed. This can be set to '0' for off or '1' for on.

HandleExceptions

See the Configuration page for details.

ResetScreenRes

Sometimes, certain games will make changes to the screen settings, such as brightness or font smoothing, that will remain after the game exits. This option will reset font smoothing, screen gamma (brightness) and resolution when the game exits. This can be set to '0' for off or '1' for on.

SingleProcAffinity

See the Configuration page for details.

Hooking

DdrawHookSystem32

Hooks the System32 ddraw.dll rather than the local copy. This can be set to '0' for off or '1' for on.

D3d8HookSystem32

Hooks the System32 d3d8.dll rather than the local copy. This can be set to '0' for off or '1' for on.

D3d9HookSystem32

Hooks the System32 d3d9.dll rather than the local copy. This can be set to '0' for off or '1' for on.

DinputHookSystem32

Hooks the System32 dinput.dll rather than the local copy. This can be set to '0' for off or '1' for on.

Dinput8HookSystem32

Hooks the System32 dinput8.dll rather than the local copy. This can be set to '0' for off or '1' for on.

DsoundHookSystem32

Hooks the System32 dsound.dll rather than the local copy. This can be set to '0' for off or '1' for on.

DDrawCompat

DDrawCompat20

See the Configuration page for details.

DDrawCompat21

See the Configuration page for details.

DDrawCompat31

See the Configuration page for details.

DDrawCompatDisableGDIHook

See the Configuration page for details.

DDrawCompatNoProcAffinity

See the Configuration page for details.

ddraw

DdrawOverrideBitMode

See the Configuration page for details.

DdrawUseDirect3D9Caps

See the Configuration page for details.

DdrawResolutionHack

By default DirectDraw application that use the 3D functions are limited to 2k resolution. DdrawResolutionHack eliminates that restriction, allowing these older games to use higher resolutions (4K or even 8k), if the game can support these resolutions. Some games use hard coded resolutions and thus are unaffected by this option.

By default this option does not exist in the ini configuration file and dxwrapper will automatically removes the DirectDraw resolution limiter. You only need to add this option to the ini file if you want to prevent dxwrapper from removing this limitation. This option requires EnableDdrawWrapper to be enabled and can be set to '0' for off or '1' for on.

DirectShowEmulation

This will hook DirectShow and attempts to disable DirectShow APIs to bypass DirectShow video. This can be useful if you want to skip a DirectShow video that does not work. This can be set to '0' for off or '1' for on.

Dd7to9

DdrawAutoFrameSkip

See the Configuration page for details.

DdrawFillSurfaceColor

This option will fill all surfaces on creation with a random color to allow you to see surfaces that the game may keep blank. This requires the Dd7to9 option to be enabled. This can be set to '0' for off or '1' for on.

DdrawEmulateSurface

See the Configuration page for details.

DdrawEmulateLock

See the Configuration page for details.

DdrawExtraEmulationSize

See the Configuration page for details.

DdrawForceMipMapAutoGen

See the Configuration page for details.

DdrawFlipFillColor

This will set the fill color when clearing the surface during a flip. This requires the Dd7to9 option to be enabled. This can be set to '0' for off or '1' for on.

DdrawFixByteAlignment

See the Configuration page for details.

DdrawEnableByteAlignment

See the Configuration page for details.

DdrawIntroVideoFix

See the Configuration page for details.

DdrawRemoveScanlines

See the Configuration page for details.

DdrawRemoveInterlacing

See the Configuration page for details.

DdrawReadFromGDI

See the Configuration page for details.

DdrawWriteToGDI

See the Configuration page for details.

DdrawEnableMouseHook

This will hook the mouse cursor and attempts to keep the mouse cursor inside the game window. This can be useful if you have multiple monitors and the game crashes if you move our mouse to the other screen accidentally. This requires the Dd7to9 option to be enabled. This can be set to '0' for off or '1' for on.

DdrawDisableDirect3DCaps

See the Configuration page for details.

DdrawKeepAllInterfaceCache

See the Configuration page for details.

DdrawLimitTextureFormats

See the Configuration page for details.

DdrawLimitDisplayModeCount

See the Configuration page for details.

DdrawCustomWidth

See the Configuration page for details.

DdrawCustomHeight

See the Configuration page for details.

DdrawUseNativeResolution

See the Configuration page for details.

DdrawClippedWidth

This will clip the resolution of the game to match this width. If the game's resolution is larger than the resolution set here then part of the game's screen will be cut off. This requires Dd7to9 and DdrawClippedHeight options to be enabled. Set DdrawClippedWidth to the desired width for the game.

DdrawClippedHeight

This will clip the resolution of the game to match this height. If the game's resolution is larger than the resolution set here then part of the game's screen will be cut off. This requires Dd7to9 and DdrawClippedWidth options to be enabled. Set DdrawClippedHeight to the desired height for the game.

DdrawOverrideWidth

See the Configuration page for details.

DdrawOverrideHeight

See the Configuration page for details.

DdrawOverrideStencilFormat

This will override the depth stencil format used to for Direct3D9 during the conversion. This requires Dd7to9 to be enabled. Set DdrawOverrideStencilFormat to the number related to the desired format, for example, if you want this to be D3DFMT_D24S8 then you will set this value to 75.

DdrawIntegerScalingClamp

See the Configuration page for details.

DdrawMaintainAspectRatio

See the Configuration page for details.

d3d9

AnisotropicFiltering

See the Configuration page for details.

AntiAliasing

See the Configuration page for details.

CacheClipPlane

This will cache the clip plane settings in DirectX9 and resets it before drawing a frame to fix a bug in the DirectX9 implementation in newer versions of Windows.

By default this option does not exist in the ini configuration file and dxwrapper will automatically cache clip plane settings. You only need to add this option to the ini file if you want to prevent dxwrapper from caching clip plane settings. This requires either the game to use Direct3D9 or for the Dd7to9 or D3d8to9 options to be enabled. This option can be set to 0 or 1.

Note: this option is enabled by default if the option doesn't exist in the ini config file.

EnvironmentCubeMapFix

See the Configuration page for details.

LimitStateBlocks

This option monitors state block usage and releases older state blocks once the state block count is too high. Some games will create state blocks each frame and never releases them, causing a memory leak. This requires either the EnableD3d9Wrapper, Dd7to9 or D3d8to9 options to be enabled. This can be set to 0 for off or 1 for on.

Note: this option is enabled by default for older games (Dd7to9 and D3d8to9) if the option doesn't exist in the ini config file.

ForceSingleBeginEndScene

This option monitors BeginScene and EndScene pairs and will skip extra calls to these functions, ensuring that only a single BeginScene / EndScene pair is called for each Present according to the Direct3D9 specs. This requires either the EnableD3d9Wrapper, Dd7to9 or D3d8to9 options to be enabled. This can be set to 0 for off or 1 for on.

EnableVSync

See the Configuration page for details.

ForceVsyncMode

See the Configuration page for details.

ShowFPSCounter

See the Configuration page for details.

OverrideRefreshRate

See the Configuration page for details.

LimitDisplayModeCount

See the Configuration page for details.

CustomDisplayWidth

See the Configuration page for details.

CustomDisplayHeight

See the Configuration page for details.

LimitPerFrameFPS

See the Configuration page for details.

EnableWindowMode

See the Configuration page for details.

WindowModeBorder

See the Configuration page for details.

WindowModeGammaShader

This option enables the use of a shader to set the gamma rather than using the gamma control. This requires either the EnableD3d9Wrapper, Dd7to9 or D3d8to9 options to be enabled. This can be set to 0 for off or 1 for on.

Note: this option is enabled by default if the option doesn't exist in the ini config file.

SetInitialWindowPosition

See the Configuration page for details.

InitialWindowPositionLeft

See the Configuration page for details.

InitialWindowPositionTop

See the Configuration page for details.

FullscreenWindowMode

See the Configuration page for details.

ForceExclusiveFullscreen

See the Configuration page for details.

ForceMixedVertexProcessing

See the Configuration page for details.

ForceSystemMemVertexCache

See the Configuration page for details.

SetPOW2Caps

This option will set the D3DPTEXTURECAPS_POW2 or D3DPTEXTURECAPS_NONPOW2CONDITIONAL texture caps. Some games look for these caps in order fer certain functionality to work. This requires either the EnableD3d9Wrapper, Dd7to9 or D3d8to9 options to be enabled.

Display Location Value
Set both 1
Set only conditional 2
Set only POW2 3
Set neither 4

Note: this option is enabled by default if the option doesn't exist in the ini config file.

EnableImgui

See the Configuration page for details.

SetSwapEffectShim

See the Configuration page for details.

DisableMaxWindowedMode

See the Configuration page for details.

ForceDirect3D9On12

See the Configuration page for details.

GraphicsHybridAdapter

See the Configuration page for details.

FullScreen

FullScreen

See the Configuration page for details.

ForceWindowResize

See the Configuration page for details.

SendAltEnter

Will send Alt+Enter to the screen window when dxwrapper detects that the game window does not fill the screen. This is useful for games that can enter fullscreen by pressing Alt+Enter. This requires the FullScreen option to be enabled. This option can be set to 0 or 1.

WaitForWindowChanges

See the Configuration page for details.

LoopSleepTime

The amount of time to sleep between each window handle check loop. This requires the FullScreen option to be enabled. This option defaults to 120.

WindowSleepTime

The amount of time to wait (sleep) for window handle and screen updates to finish. This requires the FullScreen option to be enabled. This option defaults to 500.

SetFullScreenLayer

The window layer to be selected for fullscreen. This requires the FullScreen option to be enabled. This option defaults to 0.

SetNamedLayer

List of named layers to select for fullscreen. This is useful if you want dxwrapper to select a specific window to make fullscreen. This requires the FullScreen option to be enabled. For this option you specify the name of the layer.

IgnoreWindowName

List of window classes to ignore for fullscreen. This is useful if you want dxwrapper to ignore a specific window and not make it fullscreen. This requires the FullScreen option to be enabled. For this option you specify the name of the layer.

dinput8

DeviceLookupCacheTime

See the Configuration page for details.

FilterNonActiveInput

See the Configuration page for details.

FixHighFrequencyMouse

See the Configuration page for details.

MouseMovementFactor

See the Configuration page for details.

MouseMovementPadding

See the Configuration page for details.

dsound

Num2DBuffers

See the Configuration page for details.

Num3DBuffers

See the Configuration page for details.

ForceCertification

See the Configuration page for details.

ForceExclusiveMode

See the Configuration page for details.

ForceSoftwareMixing

See the Configuration page for details.

ForceHardwareMixing

See the Configuration page for details.

ForceHQ3DSoftMixing

See the Configuration page for details.

ForceNonStaticBuffers

See the Configuration page for details.

ForceVoiceManagement

See the Configuration page for details.

ForcePrimaryBufferFormat

See the Configuration page for details.

PrimaryBufferBits

See the Configuration page for details.

PrimaryBufferSamples

See the Configuration page for details.

PrimaryBufferChannels

See the Configuration page for details.

AudioClipDetection

See the Configuration page for details.

AudioFadeOutDelayMS

The amount of time in milliseconds to wait after fading out an audio channel before stopping the playback. This requires both AudioClipDetection and EnableDsoundWrapper options to be enabled. This option defaults to 20.

FixSpeakerConfigType

Modern versions of Windows use some speaker config modes that are not recognized by older games. This option will convert these modes into the equivilant mode that older games understand. For instance, it will convert DSSPEAKER_7POINT1_SURROUND to DSSPEAKER_7POINT1 and DSSPEAKER_5POINT1_SURROUND to DSSPEAKER_5POINT1.

By default this option does not exist in the ini configuration file and dxwrapper will automatically fix the speaker config. You only need to add this option to the ini file if you want to prevent dxwrapper from fixing the speaker config. This option requires EnableDsoundWrapper to be enabled and can be set to '0' for off or '1' for on.

StoppedDriverWorkaround

Enables/Disables the workaround for the stopping sound problem with Doom3 and e.g. Creative Audigy soundcard. If you play Doom3 and the sound stops after a while, set this value to 1 to work around the problem.

AppCompatData

LockEmulation

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

BltEmulation

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

ForceLockNoWindow

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

ForceBltNoWindow

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

LockColorkey

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

FullscreenWithDWM

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

DisableLockEmulation

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

EnableOverlays

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

DisableSurfaceLocks

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

RedirectPrimarySurfBlts

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

StripBorderStyle

This enables a DirectDraw application compatibility option. This option can be set to 0 or 1.

WriteMemory

VerificationAddress

This is the address that is used to check the VerificationBytes.

VerificationBytes

Bytes that are validated before hot patching. This is used to verify the game bytes before patching to ensure that the correct code is modified. These bytes must match exactly before the hotpatch will be used.

ResetMemoryAfter

The amount of time to wiat before restoring the memory back after the hot patch. This is usefull if you want to set the hotpatch only for a limited amount of time. 0 means don't restore the memory.

AddressPointer

This is the address where the BytesToWrite will be written to. This option requires VerificationAddress and VerificationBytes to be enabled. You can include multiple AddressPointer lines if you want to update multiple memory addresses.

PatternString

This uses a pattern (HookingPattern) the address where the BytesToWrite will be written to. You can include multiple AddressPointer lines if you want to update multiple memory addresses.

BytesToWrite

The actual bytes to write to the game's memory for the hotpatch. You can include multiple AddressPointer lines if you want to update multiple memory addresses. You need to pair each BytesToWrite with each AddressPointer or PatternString.

For example:

AddressPointer             = 0x0051BCF1
BytesToWrite               = 0x00
AddressPointer             = 0x0051BDF6
BytesToWrite               = 0x4A9080

Another example:

PatternString              = 0F 85 ? ? ? ? 83 3D ? ? ? ? 06 0F 8D
BytesToWrite               = 0x90E9
PatternString              = 74 0A B8 01 00 00 00 E9 ? 00 00 00 C6 85
BytesToWrite               = 0x9090

Sample

Below is a sample configuration for DxWrapper:

;; Config file for DirectX DLL Wrapper
;;
;; For details, see: https://github.com/elishacloud/dxwrapper/wiki/Configuration
;;
[General]
RealDllPath                = AUTO
WrapperMode                = AUTO
LoadCustomDllPath          = 
ExcludeProcess             = 
IncludeProcess             = 
RunProcess                 = powershell.exe "Mount-DiskImage 'sample.iso'"
WaitForProcess             = 1
DisableLogging             = 0

[Plugins]
LoadPlugins                = 0
LoadFromScriptsOnly        = 0

[Compatibility]
Dd7to9                     = 1
D3d8to9                    = 0
D3d9to9Ex                  = 0
DDrawCompat                = 0
Dinputto8                  = 0
DisableGameUX              = 0
EnableDdrawWrapper         = 0
EnableD3d9Wrapper          = 0
EnableDinput8Wrapper       = 0
EnableDsoundWrapper        = 0
EnableOpenDialogHook       = 0
WinVersionLie              = off
WinVersionLieSP            = 0
HandleExceptions           = 0
SingleProcAffinity         = 0

[DDrawCompat]
DDrawCompat20              = 0
DDrawCompat21              = 0
DDrawCompat32              = 0
DDrawCompatDisableGDIHook  = 0
DDrawCompatNoProcAffinity  = 0

[ddraw]
DdrawOverrideBitMode       = 0
DdrawUseDirect3D9Caps      = 0

[Dd7to9]
DdrawAutoFrameSkip         = 0
DdrawEmulateSurface        = 0
DdrawEmulateLock           = 0
DdrawExtraEmulationSize    = 0
DdrawKeepAllInterfaceCache = 0
DdrawForceMipMapAutoGen    = 0
DdrawFixByteAlignment      = 0
DdrawEnableByteAlignment   = 0
DdrawIntroVideoFix         = 0
DdrawRemoveScanlines       = 0
DdrawRemoveInterlacing     = 0
DdrawReadFromGDI           = 0
DdrawWriteToGDI            = 0
DdrawDisableDirect3DCaps   = 0
DdrawLimitTextureFormats   = 0
DdrawLimitDisplayModeCount = 0
DdrawCustomWidth           = 0
DdrawCustomHeight          = 0
DdrawUseNativeResolution   = 0
DdrawOverrideWidth         = 0
DdrawOverrideHeight        = 0
DdrawIntegerScalingClamp   = 0
DdrawMaintainAspectRatio   = 0

[d3d9]
AnisotropicFiltering       = 0
AntiAliasing               = 0
EnvironmentCubeMapFix      = 0
EnableVSync                = 0
ForceVsyncMode             = 0
ShowFPSCounter             = 0
OverrideRefreshRate        = 0
LimitDisplayModeCount      = 0
CustomDisplayWidth         = 0
CustomDisplayHeight        = 0
LimitPerFrameFPS           = 0
EnableWindowMode           = 0
WindowModeBorder           = 0
SetInitialWindowPosition   = 0
InitialWindowPositionLeft  = 0
InitialWindowPositionTop   = 0
FullscreenWindowMode       = 0
ForceExclusiveFullscreen   = 0
ForceMixedVertexProcessing = 0
ForceSystemMemVertexCache  = 0
SetSwapEffectShim          = 0
DisableMaxWindowedMode     = 0
ForceDirect3D9On12         = 0
GraphicsHybridAdapter      = 0

[FullScreen]
FullScreen                 = 0
ForceWindowResize          = 0
WaitForWindowChanges       = 0

[dinput8]
DeviceLookupCacheTime      = 0
FilterNonActiveInput       = 0
FixHighFrequencyMouse      = 0
MouseMovementFactor        = 0
MouseMovementPadding       = 0

[dsound]
Num2DBuffers               = 0
Num3DBuffers               = 0
ForceCertification         = 0
ForceExclusiveMode         = 0
ForceSoftwareMixing        = 0
ForceHardwareMixing        = 0
ForceHQ3DSoftMixing        = 0
ForceNonStaticBuffers      = 0
ForceVoiceManagement       = 0
ForcePrimaryBufferFormat   = 0
PrimaryBufferBits          = 16
PrimaryBufferSamples       = 44100
PrimaryBufferChannels      = 2
AudioClipDetection         = 0

[HotPatch]
VerificationAddress        = 0x0041ACF0
VerificationBytes          = 0x6A0168E803000068B4E74800
ResetMemoryAfter           = 5000
AddressPointer             = 0x0041ACF1
BytesToWrite               = 0x00
AddressPointer             = 0x0041ACF8
BytesToWrite               = 0x40
Clone this wiki locally