mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 05:04:15 +01:00
Merge pull request #1046 from NotNite/reshade-5-fixes
Fix runtime_present for ReShade 5/GShade 4
This commit is contained in:
commit
148a571eb5
1 changed files with 18 additions and 1 deletions
|
|
@ -68,9 +68,26 @@ public class SwapChainVtableResolver : BaseAddressResolver, ISwapChainAddressRes
|
||||||
// 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 ?? ?? ?? ??";
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var p = scanner.ScanText("F6 C2 01 0F 85 ?? ?? ?? ??"); // E8 ?? ?? ?? ?? 45 0F B6 5E ??
|
var fileInfo = FileVersionInfo.GetVersionInfo(processModule.FileName);
|
||||||
|
|
||||||
|
if (fileInfo.FileMajorPart >= 5)
|
||||||
|
{
|
||||||
|
// ReShade 5/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}");
|
Log.Information($"ReShade DLL: {processModule.FileName} with DXGISwapChain::runtime_present at {p:X}");
|
||||||
|
|
||||||
this.Present = p;
|
this.Present = p;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue