doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.39k stars 866 forks source link

[Feature Request]Force Refresh Rate #4421

Open ShinChaosBahamut opened 3 weeks ago

ShinChaosBahamut commented 3 weeks ago

Was wondering if it'd be possible to add a cvar that forces a game to use your desired refresh rate? (for those stubborn games that insist on using 60hz even though you have a 144hz monitor, for example)

WinterSnowfall commented 3 weeks ago

The d3d8/d3d9 situation on this front should be improved since f74b2cd . Otherwise, I don't think forcing anything not configurable in game is a good idea. Some of them have physics calculations tied to the frame-rate (which is generally expected to be 60 fps for older games).

vlad54rus commented 2 weeks ago

Some of them have physics calculations tied to the frame-rate

For such games the framerate cap can be configured separately (many are already pre-configured inside DXVK), so that's barely an argument.

Blisto91 commented 2 weeks ago

fwiw you can somewhat achieve this behavior with the below for d3d8/d3d9

d3d9.maxFrameRate = -1
d3d9.presentInterval = 1

Or the below for d3d10/d3d11

dxgi.maxFrameRate = -1
dxgi.syncInterval = 1

Though note this will always enable vsync for the game, not only when it is enabled ingame.

Edit: Removing the second line makes the game control vsync behavior. Note that if you are using dxvk in a environment where it can actively change the refresh rate of your monitor, e.g. X11 and regular Wine without fshack or on Windows, then the above won't be so useful for using your monitors max refresh rate. (i think)