Skip to content

Commit

Permalink
update to work with latest dxvk-settings-rework changes
Browse files Browse the repository at this point in the history
  • Loading branch information
rankynbass committed Dec 12, 2022
1 parent 03cf818 commit 21de7ae
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ public SettingsTabWine()
}
},

new SettingsEntry<string>("WINEDEBUG Variables", "Configure debug logging for wine. Useful for troubleshooting.", () => Program.Config.WineDebugVars ?? string.Empty, s => Program.Config.WineDebugVars = s)
new SettingsEntry<string>("WINEDEBUG Variables", "Configure debug logging for wine. Useful for troubleshooting.", () => Program.Config.WineDebugVars ?? string.Empty, s => Program.Config.WineDebugVars = s),
new SettingsEntry<bool>("Use WineD3D (Disable DXVK)",
"Don't check this unless you know what you're doing.\nIf you check this, XIVLauncher will try to use WineD3D instead of DXVK, and nothing in the DXVK tab will work.\nCustom wine versions may not work (especially proton-based wine). This will also break GShade.",
() => Program.Config.WineD3DEnabled ?? false, b => Program.Config.WineD3DEnabled = b),
};
}

Expand Down
2 changes: 2 additions & 0 deletions src/XIVLauncher.Core/Configuration/ILauncherConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public interface ILauncherConfig

public bool? GameModeEnabled { get; set; }

public bool? WineD3DEnabled { get; set; }

public Dxvk.DxvkVersion DxvkVersion { get; set; }

public bool? DxvkAsyncEnabled { get; set; }
Expand Down
5 changes: 3 additions & 2 deletions src/XIVLauncher.Core/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,13 @@ private static void LoadConfig(Storage storage)
Config.GlobalScale ??= 1.0f;

Config.GameModeEnabled ??= false;
Config.WineD3DEnabled ??= false;
Config.DxvkAsyncEnabled ??= true;
Config.DxvkFrameRate ??= 0;
Config.ESyncEnabled ??= true;
Config.FSyncEnabled ??= false;
Config.DxvkHudCustom ??= "fps,frametimes,gpuload,version";
Config.DxvkMangoCustom ??= Environment.GetEnvironmentVariable("HOME") + "/.config/MangoHud/MangoHud.conf";
Config.DxvkMangoCustom ??= Path.Combine(Environment.GetEnvironmentVariable("HOME"), ".config", "MangoHud", "MangoHud.conf");

Config.WineStartupType ??= WineStartupType.Managed;
Config.WineBinaryPath ??= "/usr/bin";
Expand Down Expand Up @@ -278,7 +279,7 @@ public static void CreateCompatToolsInstance()
var winePrefix = storage.GetFolder("wineprefix");
var wineSettings = new WineSettings(Config.WineStartupType, Config.WineBinaryPath, Config.WineDebugVars, wineLogFile, winePrefix, Config.ESyncEnabled, Config.FSyncEnabled);
var toolsFolder = storage.GetFolder("compatibilitytool");
var dxvkSettings = new DxvkSettings(Config.DxvkHudType, Config.DxvkHudCustom, Config.DxvkMangoCustom, Config.DxvkAsyncEnabled, Config.DxvkFrameRate, Config.DxvkVersion, storage.Root);
var dxvkSettings = new DxvkSettings(Config.DxvkHudType, storage.Root, Config.DxvkVersion, !Config.WineD3DEnabled ?? true, Config.DxvkHudCustom, new FileInfo(Config.DxvkMangoCustom), Config.DxvkAsyncEnabled ?? true, Config.DxvkFrameRate ?? 0);
CompatibilityTools = new CompatibilityTools(wineSettings, dxvkSettings, Config.GameModeEnabled, toolsFolder);
}

Expand Down

0 comments on commit 21de7ae

Please sign in to comment.