Skip to content
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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Zi-SH
Copy link
Contributor

@Zi-SH Zi-SH commented May 29, 2022

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.

@@ -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),
Copy link
Contributor Author

@Zi-SH Zi-SH Jun 4, 2022

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; }
Copy link
Contributor

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)
Copy link
Contributor

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."
Copy link
Contributor

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; }
Copy link
Contributor

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

@Zi-SH
Copy link
Contributor Author

Zi-SH commented Jun 30, 2022

I don't have access to my system for another week, but I'll review it after I return.

@reiichi001 reiichi001 added the xl-core .NET Core version of xivlauncher label Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
xl-core .NET Core version of xivlauncher
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants