-
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?
Changes from 2 commits
27051f7
3b499d3
e34859a
21c03aa
89216ce
f790ac6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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; } | ||
|
||
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 commentThe 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 |
||
{ | ||
this.StartupType = startupType ?? WineStartupType.Custom; | ||
this.CustomBinPath = customBinPath; | ||
this.DxvkFPSLimit = dxvkFPSLimit; | ||
this.EsyncOn = (esyncOn ?? false) ? "1" : "0"; | ||
this.FsyncOn = (fsyncOn ?? false) ? "1" : "0"; | ||
this.DebugVars = debugVars; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
using System.Numerics; | ||
using System.Text.RegularExpressions; | ||
using System.Runtime.InteropServices; | ||
using ImGuiNET; | ||
using XIVLauncher.Common.Unix.Compatibility; | ||
|
@@ -51,7 +52,10 @@ public SettingsTabWine() | |
return null; | ||
} | ||
}, | ||
|
||
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 commentThe 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 |
||
}, | ||
new SettingsEntry<Dxvk.DxvkHudType>("DXVK Overlay", "Configure how much of the DXVK overlay is to be shown.", () => Program.Config.DxvkHudType, type => Program.Config.DxvkHudType = type), | ||
new SettingsEntry<string>("WINEDEBUG Variables", "Configure debug logging for wine. Useful for troubleshooting.", () => Program.Config.WineDebugVars ?? string.Empty, s => Program.Config.WineDebugVars = s) | ||
}; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Same as earlier this does not need to be a string |
||
|
||
public Dxvk.DxvkHudType DxvkHudType { get; set; } | ||
|
||
public string? WineDebugVars { 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.
Wouldn't it make more sense to store an fps limit as an integer