-
Notifications
You must be signed in to change notification settings - Fork 120
Configuration
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. Too see the advanced options you can open the AllSettings.ini file and add setting from there. More details on that later.
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.
Table of Contents:
Below are basic settings for DxWrapper:
RealDllPath
By default when DxWrapper is wrapping a dll it will load the Windows System dll. However, if you need DxWrapper to load a different dll you can list that dll here. A use case for this would be if you want to use DxWrapper along side some other wrapper like dgVoodoo or an existing game dll with the same name. Note: this option only works if you either rename DxWrapper to match the name of the file you are wrapping (such as d3d8.dll or ddraw.dll) or if you are using this setting on the stub dll. To use this setting on the stub dll you will need to create a new ini file that matches the name of the stub dll and add this setting into that ini file.
WrapperMode
This tells DxWrapper which dll it is wrapping. By default DxWrapper will detect the name of the wrapper and use the mode associated with the name. So, if you are wrapping d3d8.dll then it will automatically choose the d3d8 wrapper mode. However, in some circumstances games will rename the dll file. For example, if you are playing the GOG version of American Conquest, then it has a dll named mdraw.dll that is just ddraw.dll renamed. In this case you would rename DxWrapper to mdraw.dll and you would need to set the WrapperMode to ddraw to tell DxWrapper that this is a ddraw dll.
LoadCustomDllPath
This will load additional dlls into the program. This is useful if there are specific dlls that need to be loaded, for example the program keeps loading a system dll and you want the program to load a custom dll. This technique comes in handy in a few games like Warhammer 40,000 Chaos Gate and Star Wars Battlefront. To use this you can specify just the dll name or the full path and name.
ExcludeProcess
By default DxWrapper will load into all games in a specified folder that load the wrapped dll. However, in some circumstances you may not want to DxWrapper to load into a specific process. You can use this option to exclude that process name.
IncludeProcess
By default DxWrapper will load into all games in a specified folder that load the wrapped dll. However, in some circumstances you may want to DxWrapper to load only into one specific process. You can use this option to tell DxWrapper to only load into that one specific process name.
Note: Another way to do this is to rename the ini file. If you add the process name to the ini file name only that process will load this ini file. This can be useful if you have multiple processes in a single folder and you want different settings for each process. If for example you have a process named game.exe then you can rename dxwrapper.ini to dxwrapper-game.ini. This will tell dxwrapper that these settings should only work on the process game.exe.
RunProcess
This will run a process when the application starts up. This is useful if you want something to happen when the program starts up, for example if you want to mount an ISO or change a registry key. To use this you just need to type the command that you want to run.
WaitForProcess
This will pause the loading of the game until the process finishes. You can use this if the process needs to complete before the program will function. For instance if you need to mount an ISO for the game to run. This can be set to '0' for off or '1' for on.
DisableLogging
This will disable all logging for DxWrapper. It is recommended to keep logging enabled while you are first installing and testing DxWrapper with a game. Then, once the game is running correctly you can disable logging, if you like. However, if you keep logging enabled it can help you find issues later if they arise.
LoadPlugins
Description to come.
LoadFromScriptsOnly
Description to come.
Dd7to9
Description to come.
D3d8to9
This enables ReShade's d3d8to9 module that is intended to improve compatibility and stability in games using Direct3D 8 by converting all API calls to equivalent Direct3D 9 ones. It also opens those games up to the new possibilities from proven tools and wrappers written for Direct3D 9. This can be set to '0' for off or '1' for on.
DDrawCompat
This enables the DDrawCompat library. This can be enabled when wrapping any dll, however most of its functions will only work if the game uses ddraw.dll. This can be set to '0' for off or '1' for on.
Dinputto8
Description to come.
DisableGameUX
Description to come.
DSoundCtrl
This enables DSoundCtrl a wrapper which allows tweaking of some function calls of games to Microsoft DirectSound (part of DirectX). It can "work around" some driver and application limitations and bugs. It can also enhance the sound quality in many ways, for example by enabling 3D sound with games that disables this functionality by default. This can be set to '0' for off or '1' for on.
DxWnd
Description to come.
EnableDdrawWrapper
Description to come.
HandleExceptions
Description to come.
SingleProcAffinity
Description to come.
DDrawCompat20
Description to come.
DDrawCompat21
Description to come.
DDrawCompatExperimental
Description to come.
DDrawCompatDisableGDIHook
Description to come.
DDrawCompatNoProcAffinity
Description to come.
ConvertToDirectDraw7
Description to come.
ConvertToDirect3D7
Description to come.
DdrawOverrideBitMode
Description to come.
AutoFrameSkip
Description to come.
DdrawEmulateSurface
By default Dd7to9 will only emulate surfaces that are not supported by Direct3D9, such as 24-bit surfaces or the Device Context to a surface with an alpha channel. However, if you enable this option than all supported surfaces will be emulated. This helps in a few cases where games use Device Context and the text is messed up or if the game tries to use surface memory after the surface is released.
DdrawLimitDisplayModeCount
Description to come.
DdrawMaintainAspectRatio
Description to come.
DdrawOverrideWidth
Description to come.
DdrawOverrideHeight
Description to come.
DdrawOverrideRefreshRate
Description to come.
DdrawUseNativeResolution
Description to come.
AntiAliasing
Description to come.
EnableVSync
Description to come.
EnableWindowMode
Description to come.
FullscreenWindowMode
Description to come.
WindowModeBorder
Description to come.
FullScreen
This will monitor the main window of the program and set that window to full screen. It does this by updating the screen resolution to match the window resolution and then placing the window coordinates at the upper left and lower right to ensure that the window fills the screen. This can be set to '0' for off or '1' for on.
ForceWindowResize
This is intended to be use along side the FullScreen setting. It will allow DxWraper to change the resolution of Windows or stretch the game window to match the resolution size. This can be set to '0' for off or '1' for on.
WaitForWindowChanges
This is intended to be use along side the FullScreen setting. In most cases DxWrapper will set the window to full screen immediately after detecting a window that needs to be set to full screen. However in some cases the application has not yet finished setting the window. In this case you can have DxWrapper wait until it detects that the window has finished before setting the window to FullScreen. This can be set to '0' for off or '1' for on.
Al of the settings in this section are taken from DirectSound Control. I am no longer using the code from DirectSound Control, as I have completely re-written all the code, however, I kept the options the same.
Num2DBuffers
Maximum number of hardware mixed 2d buffers reported to the application. MUST be lower or equal than the hardware default.
Num3DBuffers
Maximum number of hardware mixed 3d buffers. MUST be lower or equal than the hardware default.
ForceCertification
Enables/Disables WHQL certification report
ForceVoiceManagement
Enables/Disables forcing of voice management. This can't be used together with "ForceSoftwareMixing" and "ForceHardwareMixing". This is the first option you should change to 1 if you have problems with a game. This options enables the DirectX build-in voice managements and overrides the developers placement of the sound buffers. This options will enable 3D positional audio for many games that have this feature disabled for whatever reason. You should always set ForceNonStaticBuffers to 1.
ForceSoftwareMixing
Enables/Disables forcing creation of software mixed buffers
ForceHardwareMixing
Enables/Disables forcing creation of hardware mixed buffers (caution !!). Set this to 1 if you have problems with games like DEUS EX : Invisible War ! Before you set this to 1 try to enable the Voice Management to see if this works. Enabling Voice Management is much safer than this option.
ForceNonStaticBuffers
Enables/Disables forcing of using non-static buffers. Static buffers are obsolete with PCI-cards. This should always be enabled when "ForceVoiceManagement" is set to 1.
PreventSpeakerSetup
Enables/Disables prevention changing the speaker setup configuration. Set this to 1 if you have problems with games like MAFIA etc.
ForceExclusiveMode
Enables/Disables forcing of exclusive cooperation level.
ForceHQ3DSoftMixing
Enables/Disables forcing of usage of the high quality HRTF algorithm (software mixing only). Set this to 1 to get better 3D sound quality for applications that uses software mixing.
ForcePrimaryBufferFormat
Enables/Disables forcing of a specified primary buffer format. Set this to 1 to get better sound quality for applications that don't set this parameters and soundcards that defaults to 8 Bit primary buffer. Note: If this option is set to 1 you can specify the output format with the following settings .
PrimaryBufferBits
Number of bits per sample. 16 is default, some soundcards are capable of using 24 or 32 bits per sample.
PrimaryBufferSamples
Number of samples per second. 44100 is default, some soundcards are capable of using 48000, 96000 or 192000 samples per second.
PrimaryBufferChannels
Number of channels. 2 (=Stereo) is default.
ForceSpeakerConfig
Enables/Disables forcing of a the report to the app of a certain speaker configuration. Some applications needs certain speaker configurations to enable 3D sound (e.g. Doom 3).
SpeakerConfig
Speaker configuration that will be returned with IDirectSound::GetSpeakerConfig() function when ForceSpeakerConfig is set to 1.
The following values are defined:
| Headphone | 1 |
|---|---|
| Mono | 2 |
| Quad | 3 |
| Stereo | 4 |
| Surround | 5 |
| 5.1 | 6 |
| 7.1 | 7 |
EnableStoppedDriverWorkaround
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 workaround the problem.
Below is a sample configuration for DxWrapper:
;; Config file for DirectX DLL Wrapper
[General]
RealDllPath = AUTO
WrapperMode = AUTO
LoadCustomDllPath = sample.dll
ExcludeProcess =
IncludeProcess =
RunProcess = powershell.exe "Mount-DiskImage 'sample.iso'"
WaitForProcess = 1
DisableLogging = 0
[Plugins]
LoadPlugins = 0
LoadFromScriptsOnly = 0
[Compatibility]
Dd7to9 = 0
D3d8to9 = 0
DDrawCompat = 1
Dinputto8 = 0
DisableGameUX = 0
DSoundCtrl = 0
DxWnd = 0
EnableDdrawWrapper = 0
HandleExceptions = 0
SingleProcAffinity = 0
[DDrawCompat]
DDrawCompat20 = 0
DDrawCompat21 = 0
DDrawCompatExperimental = 0
DDrawCompatDisableGDIHook = 0
DDrawCompatNoProcAffinity = 0
[ddraw]
ConvertToDirectDraw7 = 0
ConvertToDirect3D7 = 0
DdrawOverrideBitMode = 0
[Dd7to9]
AutoFrameSkip = 0
DdrawLimitDisplayModeCount = 0
DdrawMaintainAspectRatio = 0
DdrawUseNativeResolution = 0
DdrawOverrideWidth = 0
DdrawOverrideHeight = 0
DdrawOverrideRefreshRate = 0
[d3d9]
AntiAliasing = 0
EnableVSync = 0
EnableWindowMode = 0
FullscreenWindowMode = 0
WindowModeBorder = 0
[FullScreen]
FullScreen = 1
ForceWindowResize = 0
WaitForWindowChanges = 0
[DSoundCtrl]
Num2DBuffers = 0
Num3DBuffers = 0
ForceCertification = 0
ForceExclusiveMode = 0
ForceSoftwareMixing = 0
ForceHardwareMixing = 0
PreventSpeakerSetup = 0
ForceHQ3DSoftMixing = 0
ForceNonStaticBuffers = 0
ForceVoiceManagement = 0
ForcePrimaryBufferFormat = 0
PrimaryBufferBits = 16
PrimaryBufferSamples = 44100
PrimaryBufferChannels = 2
ForceSpeakerConfig = 0
SpeakerConfig = 6