Merge branch 'master' into net7

This commit is contained in:
goat 2022-12-26 15:06:25 +01:00
commit de31fccd76
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
5 changed files with 34 additions and 5 deletions

View file

@ -370,13 +370,21 @@ internal sealed class DalamudConfiguration : IServiceType
}
/// <summary>
/// Save the configuration at the path it was loaded from.
/// Save the configuration at the path it was loaded from, at the next frame.
/// </summary>
public void QueueSave()
{
this.isSaveQueued = true;
}
/// <summary>
/// Immediately save the configuration.
/// </summary>
public void ForceSave()
{
this.Save();
}
/// <summary>
/// Save the file, if needed. Only needs to be done once a frame.
/// </summary>

View file

@ -8,7 +8,7 @@
</PropertyGroup>
<PropertyGroup Label="Feature">
<DalamudVersion>7.3.1.0</DalamudVersion>
<DalamudVersion>7.3.4.0</DalamudVersion>
<Description>XIV Launcher addon framework</Description>
<AssemblyVersion>$(DalamudVersion)</AssemblyVersion>
<Version>$(DalamudVersion)</Version>

View file

@ -68,9 +68,27 @@ public class SwapChainVtableResolver : BaseAddressResolver, ISwapChainAddressRes
// DXGISwapChain::handle_device_loss => DXGISwapChain::Present => DXGISwapChain::runtime_present
var scanner = new SigScanner(processModule);
var runtimePresentSig = "F6 C2 01 0F 85 ?? ?? ?? ??";
try
{
var p = scanner.ScanText("F6 C2 01 0F 85 ?? ?? ?? ??"); // E8 ?? ?? ?? ?? 45 0F B6 5E ??
var fileInfo = FileVersionInfo.GetVersionInfo(processModule.FileName);
// Looks like this sig only works for GShade 4
if (fileInfo.FileDescription?.Contains("GShade 4.") == true)
{
Log.Verbose("Hooking present for GShade 4");
runtimePresentSig = "E8 ?? ?? ?? ?? 45 0F B6 5E ??";
}
}
catch (Exception ex)
{
Log.Error(ex, "Failed to get reshade version info - falling back to default DXGISwapChain::runtime_present signature");
}
try
{
var p = scanner.ScanText(runtimePresentSig);
Log.Information($"ReShade DLL: {processModule.FileName} with DXGISwapChain::runtime_present at {p:X}");
this.Present = p;

View file

@ -103,6 +103,9 @@ public class BranchSwitcherWindow : Window
{
Pick();
// If we exit immediately, we need to write out the new config now
Service<DalamudConfiguration>.Get().ForceSave();
var appData = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
var xlPath = Path.Combine(appData, "XIVLauncher", "XIVLauncher.exe");

View file

@ -40,8 +40,8 @@ We are currently working from the following branches.
| Name | Purpose | .NET Version | Track |
|---|---|---|---|
| *master* | Upgrade to .NET 6 | .NET 6.0.3 (March 2022) | Staging |
| *net5* | Current release branch | .NET 5.0.6 (May 2021) | Release |
| *master* | Current release branch | .NET 6.0.3 (March 2022) | Release & Staging |
| *net7* | Upgrade to .NET 7 | .NET 7.0.0 (November 2022) | net7 |
| *api3* | Legacy version, no longer in active use | .NET Framework 4.7.2 (April 2017) | - |
<br>