fix(launcher/citicore): fall back to Win32 UI and downlevel SEH handling under Wine - #4095
fix(launcher/citicore): fall back to Win32 UI and downlevel SEH handling under Wine#4095RatPrez wants to merge 2 commits into
Conversation
Signed-off-by: Richard Saville <41370482+RatPrez@users.noreply.github.com>
Wine's ntdll doesn't match real ntdll's binary layout, so RtlpxLookupFunctionTable is never found there either, even on builds that report as Windows 8+. Skip straight to hooking RtlLookupFunctionTable directly when running under Wine, same as we already do for pre-Win8 systems. Signed-off-by: Richard Saville <41370482+RatPrez@users.noreply.github.com>
|
I did have a question for any maintainers on the I compared When you launch FiveM under Is there any way to enable this on linux? Maybe even a local build workaround? Without it, it becomes difficult to develop using frameworks locally. Obviously I understand the issues with validating a license when something is "insecure", but I thought it was still worth an ask. Thanks in advance :) |
Goal of this PR
Get the legacy FiveM client to a point where it can actually start under Wine/Proton on Linux. Right now it doesn't get past the launcher, two separate things kill it before you even see a window.
Let me know if there is any genuine issues with this code being merged.
...
How is this PR achieving the goal
Two unrelated Wine-compat fixes, both gated behind the existing
CfxIsWine()check inLaunchMode.hso native Windows behavior is untouched:client/launcher/UpdaterUI.cppThe update/patch splash screen is built with WinRT XAML Islands
DesktopWindowXamlSource, which Wine doesn't implement.The code already has a working plain-Win32-controls fallback
g_uui.tenMode = false, used for older Windows and safe mode.Added Wine to the existing
forceOffchecks inUI_InitTen()so it takes that path instead of trying to init XAML and dying.client/citicore/SEHTableHandler.Win32.cppCoreRT_SetupSEHHandlerdisassemblesRtlLookupFunctionTableinntdll.dllto locate the internalRtlpxLookupFunctionTable.Wine's
ntdlldoesn't match real ntdll's binary layout, so the lookup never finds it, and sinceIsWindows8OrGreater()reports true under Wine, it was hitting aFatalError().The code already has a fallback path for genuinely older/downlevel OS's that hooks
RtlLookupFunctionTabledirectly instead, routed Wine into that same path instead of the fatal error....
This PR applies to the following area(s)
FiveM, RedM
...
Successfully tested on
Platforms: Windows, Linux
...
Checklist