[DirectX 9] Dark Souls: Prepare to Die Edition (Steam) "OverrideRefreshRate" feature not working
Hi there, thank you for all the work you've put into this project. If you ever have the time for it, could you please take at look at this issue?
This specific version of Dark Souls I'm trying to run, the "Prepare to Die Edition", will not work if you have a monitor with a refresh rate over 60hz. The game will boot up but if you try to access the settings in the menu, the game will crash. If you try to create or load an existing character, the game will crash. I tried using dxwrapper's "OverrideRefreshRate" to force the refresh rate to 60 but unfortunately it doesn't seem to work with this game.
I tried doing the same with dgVoodoo since it also has the feature that allows you to override the refresh rate and it actually worked. Unfortunately running a game as "recent" as this one with dgVoodoo creates it's own issues, such as bad performance and a bunch of visual glitches making the experience very unpleasant.
Running this game with dxwrapper would be much more ideal. If you could take a look and see if you could get the "OverrideRefreshRate" feature working with this game it would awesome.
Thank you.
dgVoodoo2 converts the game to Direct3D 11 or 12, which works very differently and cannot really be compared to Direct3D9.
Direct3D9 only supports setting the refresh rate for exclusive mode games. If the game is exclusive mode and you have set OverrideRefreshRate to 60 and the game is not going into 60 hz you could try setting DisableMaxWindowedMode. Direct3D9 uses a fake exclusive mode and setting that option should disable the fake exclusive mode.
For windowed or fullscreen windowed games, Direct3D9 does not support setting the monitors refresh rate. However, you could try setting LimitPerFrameFPS to 60. That will prevent any frame from presenting at a speed faster than 60 hz.
I tried using the DisableMaxWindowedMode option but it makes the game crash. Limiting the frame rate doesn't do anything because the problem is the game incompatibility with refresh rates higher than 60hz, the game itself is capped at 30fps. I guess there isn't anything that can be done then. That's unfortunate.
Thank you for taking the time to answer. I appreciate it 👍
the problem is the game incompatibility with refresh rates higher than 60hz
Maybe the game has an issue if it sees refresh rates higher than 60. I added code to filter out refresh rates that don't equal 60. Try this and see if it works: dxwrapper.zip
Note: this will only work if you have a video card that supports a refresh rate of 60.
Thank you for taking the time to look into this issue, unfortunately it didn't worked for me. I think that maybe it has something to do with the fact that I'm on a laptop, and usually is not possible to change refresh rate on a built-in screens. I don't have an external screen to test with unfortunately, but at least on paper it looks like it could work if we create a custom resolution with a custom refresh rate, it's just not possible to do that on a laptop.
I don't know how dgVoodoo does it but I'm starting to think that the reason it works is because it is using a virtual GPU so it's able override everything.