Skip to content

Commit

Permalink
fix(graphics/five): tweaked ReShade version check
Browse files Browse the repository at this point in the history
Version 5.9.1 should have fixed the memory corruption bug. Similarly, it
seems 5.9 also fixed compatibility issues with ANGLE (crosire/reshade@9614a6b)
so we can enable in-process GPU if we're on 5.9+.

Fixes #2147.
Refs #2148.
  • Loading branch information
blattersturm committed Aug 6, 2023
1 parent 9f47128 commit 81fd97f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions code/components/rage-graphics-five/src/ReShadeFixups.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ bool IsValidGraphicsLibrary(const std::wstring& path)
{
return false;
}
// ReShade >= 5.9 causes heap corruption basically *all the time* so we hard-block it
else if (fixedInfo->dwProductVersionMS >= 0x50009)
// ReShade == 5.9 causes heap corruption basically *all the time* so we hard-block it
else if (fixedInfo->dwProductVersionMS == 0x50009 && fixedInfo->dwProductVersionLS < 0x10000)
{
console::Printf("script:reshade", "Blocked load of ReShade version 5.9 or higher, it causes crashes in RtlReportFatalFailure.\nDowngrade to 5.8 or below to be able to use ReShade, or report the issue to the ReShade authors.\n");
console::Printf("script:reshade", "Blocked load of ReShade version 5.9, it causes crashes in RtlReportFatalFailure.\nUpgrade to 5.9.1 or below to be able to use ReShade.\n");

This comment has been minimized.

Copy link
@AvarianKnight

AvarianKnight Aug 6, 2023

Contributor

or below

This comment has been minimized.

Copy link
@blattersturm

blattersturm Aug 6, 2023

Author Contributor

yes i know this still says 'below', will fix later

This comment has been minimized.

Copy link
@blattersturm

blattersturm Aug 6, 2023

Author Contributor

I REALLY CANT BE FAST ENOUGH FOR PEOPLE TO NOTICE

This comment has been minimized.

Copy link
@AvarianKnight

AvarianKnight Aug 6, 2023

Contributor

🤣

This comment has been minimized.

Copy link
@C4LLZ

C4LLZ Aug 10, 2023

Finally they fixed their stuff :)

This comment has been minimized.

Copy link
@LaagRP

LaagRP Aug 16, 2023

Sooo we finally get to enable this setting again and no longer need to cap our fps?? Big W

return false;
}
// as is ReShade v5+ because of an unknown crash (unless setting an override)
Expand Down Expand Up @@ -115,13 +115,17 @@ bool IsValidGraphicsLibrary(const std::wstring& path)
}

// in-process GPU is incompatible with ReShade (it'll swap out the D3D device underneath, failing a check in ANGLE)
static ConVar<bool> nuiUseInProcessGpu("nui_useInProcessGpu", ConVar_Archive, false);

if (nuiUseInProcessGpu.GetValue())
// this was fixed in 5.9 so allow it if the version is above such
if (fixedInfo->dwProductVersionMS < 0x50009)
{
console::Printf("script:reshade", "Blocked load of ReShade, as it is incompatible with NUI in-process GPU. Disable NUI in-process GPU to be able to use ReShade.\n");
static ConVar<bool> nuiUseInProcessGpu("nui_useInProcessGpu", ConVar_Archive, false);

return false;
if (nuiUseInProcessGpu.GetValue())
{
console::Printf("script:reshade", "Blocked load of ReShade, as it is incompatible with NUI in-process GPU. Update ReShade to version 5.9.1 or above to be able to use it.\n");

return false;
}
}

return true;
Expand Down

0 comments on commit 81fd97f

Please sign in to comment.