Skip to content

Commit

Permalink
[util] Consolidate maxFrameRate options
Browse files Browse the repository at this point in the history
  • Loading branch information
doitsujin committed Jun 10, 2024
1 parent 7da2395 commit ed95853
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
3 changes: 1 addition & 2 deletions dxvk.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
# actual display mode does not match the game's one.
# n: Limit to n frames per second.

# dxgi.maxFrameRate = 0
# d3d9.maxFrameRate = 0
# dxvk.maxFrameRate = 0


# Override PCI vendor and device IDs reported to the application. Can
Expand Down
2 changes: 1 addition & 1 deletion src/d3d9/d3d9_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace dxvk {
: (adapter != nullptr ? adapter->deviceProperties().vendorID : 0);

this->maxFrameLatency = config.getOption<int32_t> ("d3d9.maxFrameLatency", 0);
this->maxFrameRate = config.getOption<int32_t> ("d3d9.maxFrameRate", 0);
this->maxFrameRate = config.getOption<int32_t> ("dxvk.maxFrameRate", 0);
this->presentInterval = config.getOption<int32_t> ("d3d9.presentInterval", -1);
this->shaderModel = config.getOption<int32_t> ("d3d9.shaderModel", 3);
this->dpiAware = config.getOption<bool> ("d3d9.dpiAware", true);
Expand Down
2 changes: 1 addition & 1 deletion src/dxgi/dxgi_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace dxvk {
this->maxDeviceMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxDeviceMemory", 0)) << 20;
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;

this->maxFrameRate = config.getOption<int32_t>("dxgi.maxFrameRate", 0);
this->maxFrameRate = config.getOption<int32_t>("dxvk.maxFrameRate", 0);
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);

// Expose Nvidia GPUs properly if NvAPI is enabled in environment
Expand Down
42 changes: 21 additions & 21 deletions src/util/config/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ namespace dxvk {
/* Shantae and the Pirate's Curse *
* Game speeds up above 60 fps */
{ R"(\\ShantaeCurse\.exe$)", {{
{ "dxgi.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Mighty Switch Force! Collection *
* Games speed up above 60 fps */
{ R"(\\MSFC\.exe$)", {{
{ "dxgi.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Cardfight!! Vanguard Dear Days: *
* Submits command lists multiple times */
Expand Down Expand Up @@ -405,7 +405,7 @@ namespace dxvk {
* Game speed increases when above 60 fps in *
* the tavern area */
{ R"(\\BLADESTORM Nightmare\\Launch_(EA|JP)\.exe$)", {{
{ "dxgi.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Ghost Recon Wildlands */
{ R"(\\GRW\.exe$)", {{
Expand Down Expand Up @@ -477,7 +477,7 @@ namespace dxvk {
/* Sonic Adventure 2 */
{ R"(\\Sonic Adventure 2\\(launcher|sonic2app)\.exe$)", {{
{ "d3d9.floatEmulation", "Strict" },
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* The Sims 2,
Body Shop,
Expand All @@ -499,7 +499,7 @@ namespace dxvk {
Built-in Vsync Locks the game to 30 FPS */
{ R"(\\Dead Space\.exe$)", {{
{ "d3d9.supportDFFormats", "False" },
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
{ "d3d9.presentInterval", "1" },
}} },
/* Halo CE/HaloPC */
Expand Down Expand Up @@ -582,7 +582,7 @@ namespace dxvk {
* D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY buffer */
{ R"(\\(trl|tra|tru)\.exe$)", {{
{ "d3d9.cachedDynamicBuffers", "True" },
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Everquest */
{ R"(\\eqgame\.exe$)", {{
Expand Down Expand Up @@ -620,7 +620,7 @@ namespace dxvk {
}} },
/* Demon Stone breaks at frame rates > 60fps */
{ R"(\\Demonstone\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Far Cry 1 has worse water rendering when it detects AMD GPUs */
{ R"(\\FarCry\.exe$)", {{
Expand All @@ -633,7 +633,7 @@ namespace dxvk {
}} },
/* Sine Mora EX */
{ R"(\\SineMoraEX\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Red Orchestra 2 */
{ R"(\\ROGame\.exe$)", {{
Expand Down Expand Up @@ -670,7 +670,7 @@ namespace dxvk {
}} },
/* Limbo */
{ R"(\\limbo\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Escape from Tarkov launcher
Same issue as Warhammer: RoR above */
Expand Down Expand Up @@ -714,7 +714,7 @@ namespace dxvk {
/* Bionic Commando
Physics break at high fps */
{ R"(\\bionic_commando\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Need For Speed 3 modern patch */
{ R"(\\nfs3\.exe$)", {{
Expand All @@ -723,12 +723,12 @@ namespace dxvk {
/* Beyond Good And Evil *
* UI breaks at high fps */
{ R"(\\BGE\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* King Of Fighters XIII *
* In-game speed increases on high FPS */
{ R"(\\kof(xiii|13_win32_Release)\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* YS Origin *
* Helps very bad frametimes in some areas */
Expand Down Expand Up @@ -805,7 +805,7 @@ namespace dxvk {
/* Battle Fantasia Revised Edition *
* Speedup above 60fps */
{ R"(\\bf10\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Codename Panzers Phase One/Two *
* Main menu won't render after intros *
Expand All @@ -832,23 +832,23 @@ namespace dxvk {
}} },
/* STEINS;GATE ELITE */
{ R"(\\SG_ELITE\\Game\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* The Incredibles */
{ R"(\\IncPC\.exe$)", {{
{ "d3d9.maxFrameRate", "59" },
{ "dxvk.maxFrameRate", "59" },
}} },
/* Conflict Vietnam */
{ R"(\\Vietnam\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Project: Snowblind */
{ R"(\\Snowblind\.(SP|MP|exe)$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Aviary Attorney */
{ R"(\\Aviary Attorney\\nw\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* Drakensang: The Dark Eye */
{ R"(\\drakensang\.exe$)", {{
Expand All @@ -874,7 +874,7 @@ namespace dxvk {
}} },
/* Sonic CD */
{ R"(\\soniccd\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* UK Truck Simulator 1 */
{ R"(\\UK Truck Simulator\\bin\\win_x86\\game\.exe$)", {{
Expand All @@ -893,7 +893,7 @@ namespace dxvk {
}} },
/* Dark Void - Crashes above 60fps in places */
{ R"(\\ShippingPC-SkyGame\.exe$)", {{
{ "d3d9.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
/* 9th Dawn II *
* OpenGL game that also spins up d3d9 *
Expand Down Expand Up @@ -958,7 +958,7 @@ namespace dxvk {
/* Fallout 4: Defaults to 45 FPS on OLED, but also breaks above 60 FPS */
{ R"(\\Fallout4\.exe$)", {{
{ "dxgi.syncInterval", "1" },
{ "dxgi.maxFrameRate", "60" },
{ "dxvk.maxFrameRate", "60" },
}} },
}};

Expand Down

0 comments on commit ed95853

Please sign in to comment.