; cnc-ddraw - https://github.com/CnCNet/cnc-ddraw - https://cncnet.org

[ddraw]
; ### Optional settings ###
; Use the following settings to adjust the look and feel to your liking

; Stretch to custom resolution, 0 = defaults to the size game requests
width=1278
height=1024

; Override the width/height settings shown above and always stretch to fullscreen
; Note: Can be combined with 'windowed=true' to get windowed-fullscreen aka borderless mode
fullscreen=false

; Run in windowed mode rather than going fullscreen
windowed=true

; Maintain aspect ratio
maintas=true

; Windowboxing / Integer Scaling
boxing=false

; Real rendering rate, -1 = screen rate, 0 = unlimited, n = cap
; Note: Does not have an impact on the game speed, to limit your game speed use 'maxgameticks='
maxfps=60

; Vertical synchronization, enable if you get tearing - (Requires 'renderer=auto/opengl/direct3d9')
; Note: vsync=true can fix tearing but it will cause input lag
vsync=false

; Automatic mouse sensitivity scaling
; Note: Only works if stretching is enabled. Sensitivity will be adjusted according to the size of the window
adjmouse=true

; Preliminary libretro shader support - (Requires 'renderer=opengl') https://github.com/libretro/glsl-shaders
; 2x scaling example: https://imgur.com/a/kxsM1oY - 4x scaling example: https://imgur.com/a/wjrhpFV
shader=Shaders\interpolation\bilinear.glsl

; Window position, -32000 = center to screen
posX=-32000
posY=-32000

; Renderer, possible values: auto, opengl, gdi, direct3d9 (auto = try direct3d9/opengl, fallback = gdi)
renderer=auto

; Developer mode (don't lock the cursor)
devmode=false

; Show window borders in windowed mode
border=true

; Save window position/size/state on game exit and restore it automatically on next game start
; Possible values: 0 = disabled, 1 = save to global 'ddraw' section, 2 = save to game specific section
savesettings=1

; Should the window be resizable by the user in windowed mode?
resizable=false

; Enable linear (D3DTEXF_LINEAR) upscaling filter for the direct3d9 renderer
d3d9linear=true

; Enable upscale hack for high resolution patches (Supports C&C1, Red Alert 1 and KKND Xtreme)
vhack=false

; cnc-ddraw config program language, possible values: auto, english, chinese, german, spanish, russian, hungarian, french
configlang=auto

; Where should screenshots be saved
screenshotdir=.\Screenshots\


; ### Compatibility settings ###
; Use the following settings in case there are any issues with the game

; Hide WM_ACTIVATEAPP and WM_NCACTIVATE messages to prevent problems on alt+tab
noactivateapp=false

; Max game ticks per second, possible values: -1 = disabled, -2 = refresh rate, 0 = emulate 60hz vblank, 1-1000 = custom game speed
; Note: Can be used to slow down a too fast running game, fix flickering or too fast animations
; Note: Usually one of the following values will work: 60 / 30 / 25 / 20 / 15 (lower value = slower game speed)
maxgameticks=120

; Windows API Hooking, Possible values: 0 = disabled, 1 = IAT Hooking, 2 = Microsoft Detours, 3 = IAT+Detours Hooking (All Modules), 4 = IAT Hooking (All Modules)
; Note: Change this value if windowed mode or upscaling isn't working properly
; Note: 'hook=2' will usually work for problematic games, but 'hook=2' should be combined with renderer=gdi
hook=4

; Force minimum FPS, possible values: 0 = disabled, -1 = use 'maxfps=' value, -2 = same as -1 but force full redraw, 1-1000 = custom FPS
; Note: Set this to a low value such as 5 or 10 if some parts of the game are not being displayed (e.g. menus or loading screens)
minfps=-1

; Disable fullscreen-exclusive mode for the direct3d9/opengl renderers
; Note: Can be used in case some GUI elements like buttons/textboxes/videos/etc.. are invisible
nonexclusive=false

; Fixes issues where the pitch of a surface is not a multiple of 4
; Note: Enable this if some parts of the screen are being displayed diagonally
fixpitch=false

; Force CPU0 affinity, avoids crashes/freezing, *might* have a performance impact
singlecpu=true

; Available resolutions, possible values: 0 = Small list, 1 = Very small list, 2 = Full list
; Note: Set this to 2 if your chosen resolution is not working, set to 1 if the game is crashing
resolutions=0

; Child window handling, possible values: 0 = Disabled, 1 = Display top left, 2 = Display top left + repaint, 3 = Hide
; Note: Disables upscaling if a child window was detected
fixchilds=2

; Set the precision for Direct3D9 floating-point calculations to the precision used by the calling thread
; Note: Enable this if there are desyncs in online games
fpupreserve=false



; ### Hotkeys ###
; Use the following settings to configure your hotkeys, 0x00 = disabled
; Virtual-Key Codes: https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

; Switch between windowed and fullscreen mode = [Alt] + ???
;keytogglefullscreen=0x0D

; Maximize window without frame = [Alt] + ???
;keytogglemaximize=0x22

; Unlock cursor 1 = [Ctrl] + ???
keyunlockcursor1=0x09

; Unlock cursor 2 = [Right Alt] + ???
keyunlockcursor2=0xA3

; Screenshot
keyscreenshot=0x2C
