Skip to content

Commit

Permalink
Merge pull request #217 from rankynbass/add-libicuuc-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
reiichi001 authored Feb 21, 2025
2 parents 37dc715 + dca24c7 commit 2942d52
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/XIVLauncher.Core/Components/MainPage/MainPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,12 @@ public async Task<Process> StartGameAndAddon(Launcher.LoginResult loginResult, b
System.Environment.SetEnvironmentVariable("XMODIFIERS", "@im=null");
}

// Hack: Fix libicuuc dalamud crashes
if (App.Settings.FixError127 == true)
{
System.Environment.SetEnvironmentVariable("DOTNET_SYSTEM_GLOBALIZATION_USENLS", "true");
}

// Deal with "Additional Arguments". VAR=value %command% -args
var launchOptions = (App.Settings.AdditionalArgs ?? string.Empty).Split("%command%", 2);
var launchEnv = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class SettingsTabTroubleshooting : SettingsTab
{
new SettingsEntry<bool>("Hack: Disable gameoverlayrenderer.so", "May fix black screen on launch (Steam Deck) and some stuttering issues after 40+ minutes.", () => Program.Config.FixLDP ?? false, x => Program.Config.FixLDP = x),
new SettingsEntry<bool>("Hack: XMODIFIERS=\"@im=null\"", "Fixes some mouse-related issues, some stuttering issues", () => Program.Config.FixIM ?? false, x => Program.Config.FixIM = x),
new SettingsEntry<bool>("Hack: Fix libicuuc Dalamud error", "Fixes a specific \"an internal Dalamud error has occurred.\" In the terminal you will see this text:\n\"Cannot get symbol u_charsToUChars from libicuuc Error: 127\"", () => Program.Config.FixError127 ?? false, x => Program.Config.FixError127 = x),
new SettingsEntry<bool>($"Hack: Force locale to {(!string.IsNullOrEmpty(Program.CType) ? Program.CType : "C.UTF-8 (exact value depends on distro)")}",
!string.IsNullOrEmpty(Program.CType) ? $"Sets LC_ALL and LC_CTYPE to \"{Program.CType}\". This can fix some issues with non-Latin unicode characters in file paths if LANG is not a UTF-8 type" : "Hack Disabled. Could not find a UTF-8 C locale. You may have to set LC_ALL manually if LANG is not a UTF-8 type.",
() => Program.Config.FixLocale ?? false, b => Program.Config.FixLocale = b)
Expand Down
2 changes: 2 additions & 0 deletions src/XIVLauncher.Core/Configuration/ILauncherConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public interface ILauncherConfig

public bool? FixIM { get; set; }

public bool? FixError127 { get; set; }

public bool? SetWin7 { get; set; }

#endregion
Expand Down
1 change: 1 addition & 0 deletions src/XIVLauncher.Core/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ private static void LoadConfig(Storage storage)
Config.FixLDP ??= false;
Config.FixIM ??= false;
Config.FixLocale ??= false;
Config.FixError127 ??= false;
}

public const uint STEAM_APP_ID = 39210;
Expand Down

0 comments on commit 2942d52

Please sign in to comment.