mirror of
https://git.sanhost.net/sanasol/hytale-f2p
synced 2026-03-01 08:41:51 -03:00
v2.4.7: Fix Linux SDL3_image crash and NVIDIA Wayland stability
- Add LD_LIBRARY_PATH with Client directory so the dynamic linker finds bundled native libraries (libSDL3_image.so.0, etc). Official Hytale uses Flatpak which provides these; F2P runs natively and needs this. - Add __NV_DISABLE_EXPLICIT_SYNC=1 for NVIDIA on Wayland to prevent crashes on Hyprland and other Wayland compositors. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -445,6 +445,17 @@ async function launchGame(playerNameOverride = null, progressCallback, javaPathO
|
||||
|
||||
const env = { ...process.env };
|
||||
|
||||
// Linux: Add Client directory to LD_LIBRARY_PATH so the dynamic linker can find
|
||||
// bundled native libraries (e.g. libSDL3_image.so.0). The .NET DllImport only tries
|
||||
// bare names like "SDL3_image.so" which don't match versioned .so.0 files.
|
||||
// LD_LIBRARY_PATH lets dlopen() find them via standard library resolution.
|
||||
if (process.platform === 'linux') {
|
||||
const clientDir = path.dirname(clientPath);
|
||||
const existing = env.LD_LIBRARY_PATH || '';
|
||||
env.LD_LIBRARY_PATH = existing ? `${clientDir}:${existing}` : clientDir;
|
||||
console.log(`Linux: LD_LIBRARY_PATH includes ${clientDir}`);
|
||||
}
|
||||
|
||||
const waylandEnv = setupWaylandEnvironment();
|
||||
Object.assign(env, waylandEnv);
|
||||
const gpuEnv = setupGpuEnvironment(gpuPreference);
|
||||
|
||||
Reference in New Issue
Block a user