-
Notifications
You must be signed in to change notification settings - Fork 330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement FPS Limiter (DXVK_FRAME_RATE) #1011
base: master
Are you sure you want to change the base?
Conversation
@@ -54,7 +54,6 @@ public SettingsTabWine() | |||
}, | |||
new SettingsEntry<string>("DXVK Frame Limit", "Configure how many frames DXVK should be limited to. Set to 0 for unlimited.", () => Program.Config.DxvkFrameRate ?? "0", s => Program.Config.DxvkFrameRate = s) | |||
{ | |||
CheckVisibility = () => RuntimeInformation.IsOSPlatform(OSPlatform.Linux), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After discussion with marzent about DXVK on Windows, I've opted to remove Linux-only visibility.
@@ -19,15 +19,18 @@ public class WineSettings | |||
public string EsyncOn { get; private set; } | |||
public string FsyncOn { get; private set; } | |||
|
|||
public string DxvkFPSLimit { get; private set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it make more sense to store an fps limit as an integer
public string DebugVars { get; private set; } | ||
public FileInfo LogFile { get; private set; } | ||
|
||
public DirectoryInfo Prefix { get; private set; } | ||
|
||
public WineSettings(WineStartupType? startupType, string customBinPath, string debugVars, FileInfo logFile, DirectoryInfo prefix, bool? esyncOn, bool? fsyncOn) | ||
public WineSettings(WineStartupType? startupType, string customBinPath, string debugVars, FileInfo logFile, DirectoryInfo prefix, bool? esyncOn, bool? fsyncOn, string dxvkFPSLimit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not a wine setting and should probably go into the appropriately named Dxvk
class
|
||
new SettingsEntry<string>("DXVK Frame Limit", "Configure how many frames DXVK should be limited to. Set to 0 for unlimited.", () => Program.Config.DxvkFrameRate ?? "0", s => Program.Config.DxvkFrameRate = s) | ||
{ | ||
CheckValidity = s => Regex.IsMatch(s, @"^\d{1,3}$") ? null : "Please specify a valid integer below 999." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regex is a bit overkill to check for a non-negative integer; afaik dxvk can also limit to more than 999fps
@@ -72,6 +72,8 @@ public interface ILauncherConfig | |||
|
|||
public bool? FSyncEnabled { get; set; } | |||
|
|||
public string DxvkFrameRate { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as earlier this does not need to be a string
I don't have access to my system for another week, but I'll review it after I return. |
Resubmitting #948 with fix for merge conflict and a few changes for Linux-only visibility.
I've been playing with this setting for a while and I've not had any issues with DXVK's frame limiter.