doc reshade changes

This commit is contained in:
Kaz Wolfe 2024-06-30 13:48:57 -07:00
parent 3a2bed3490
commit 9472a315df
No known key found for this signature in database
GPG key ID: 258813F53A16EBB4

View file

@ -67,15 +67,15 @@ internal class SwapChainVtableResolver : BaseAddressResolver, ISwapChainAddressR
if (!fileInfo.FileDescription.Contains("GShade") && !fileInfo.FileDescription.Contains("ReShade")) if (!fileInfo.FileDescription.Contains("GShade") && !fileInfo.FileDescription.Contains("ReShade"))
break; break;
// warning: these comments may no longer be accurate.
// reshade master@4232872 RVA // reshade master@4232872 RVA
// var p = processModule.BaseAddress + 0x82C7E0; // DXGISwapChain::Present // var p = processModule.BaseAddress + 0x82C7E0; // DXGISwapChain::Present
// var p = processModule.BaseAddress + 0x82FAC0; // DXGISwapChain::runtime_present // var p = processModule.BaseAddress + 0x82FAC0; // DXGISwapChain::runtime_present
// DXGISwapChain::handle_device_loss => DXGISwapChain::Present => DXGISwapChain::runtime_present // DXGISwapChain::handle_device_loss => DXGISwapChain::Present => DXGISwapChain::runtime_present
var scanner = new SigScanner(processModule); var scanner = new SigScanner(processModule);
var runtimePresentSig = "F6 C2 01 0F 85 88"; var runtimePresentSig = "F6 C2 01 0F 85 88"; // NOTE: This sig is from reshade's DLL, normally dxgi.dll.
try try
{ {
@ -88,13 +88,13 @@ internal class SwapChainVtableResolver : BaseAddressResolver, ISwapChainAddressR
} }
catch (Exception ex) catch (Exception ex)
{ {
Log.Error(ex, "Failed to get reshade version info - falling back to default DXGISwapChain::runtime_present signature"); Log.Error(ex, "Failed to get reshade version info - falling back to default DXGISwapChain::on_present signature");
} }
try try
{ {
var p = scanner.ScanText(runtimePresentSig); var p = scanner.ScanText(runtimePresentSig);
Log.Information($"ReShade DLL: {processModule.FileName} with DXGISwapChain::runtime_present at {p:X}"); Log.Information($"ReShade DLL: {processModule.FileName} with DXGISwapChain::on_present at {p:X}");
this.Present = p; this.Present = p;
this.IsReshade = true; this.IsReshade = true;
@ -102,7 +102,7 @@ internal class SwapChainVtableResolver : BaseAddressResolver, ISwapChainAddressR
} }
catch (Exception ex) catch (Exception ex)
{ {
Log.Error(ex, "Could not find reshade DXGISwapChain::runtime_present offset!"); Log.Error(ex, "Could not find reshade DXGISwapChain::on_present offset!");
} }
} }
} }