diff --git a/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj b/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj index 225555e29..17c091259 100644 --- a/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj +++ b/Dalamud.CorePlugin/Dalamud.CorePlugin.csproj @@ -27,7 +27,7 @@ - + diff --git a/Dalamud.Injector/EntryPoint.cs b/Dalamud.Injector/EntryPoint.cs index 8be568063..f0e42aade 100644 --- a/Dalamud.Injector/EntryPoint.cs +++ b/Dalamud.Injector/EntryPoint.cs @@ -143,7 +143,6 @@ namespace Dalamud.Injector Console.WriteLine("Command line error: {0}", clex.Message); Console.WriteLine(); ProcessHelpCommand(args); - Environment.Exit(-1); } else if (Log.Logger == null) { @@ -151,27 +150,13 @@ namespace Dalamud.Injector } else if (exObj is Exception ex) { - Log.Error(ex, "A fatal error has occurred."); + Log.Error(ex, "A fatal error has occurred"); } else { - Log.Error($"A fatal error has occurred: {eventArgs.ExceptionObject}"); + Log.Error("A fatal error has occurred: {Exception}", eventArgs.ExceptionObject.ToString()); } -#if DEBUG - var caption = "Debug Error"; - var message = - $"Couldn't inject.\nMake sure that Dalamud was not injected into your target process " + - $"as a release build before and that the target process can be accessed with VM_WRITE permissions.\n\n" + - $"{eventArgs.ExceptionObject}"; -#else - var caption = "XIVLauncher Error"; - var message = - "Failed to inject the XIVLauncher in-game addon.\nPlease try restarting your game and your PC.\n" + - "If this keeps happening, please report this error."; -#endif - _ = MessageBoxW(IntPtr.Zero, message, caption, MessageBoxType.IconError | MessageBoxType.Ok); - Environment.Exit(-1); }; } diff --git a/Dalamud/Dalamud.csproj b/Dalamud/Dalamud.csproj index 23f6334f3..1007cf9de 100644 --- a/Dalamud/Dalamud.csproj +++ b/Dalamud/Dalamud.csproj @@ -65,7 +65,7 @@ - + diff --git a/Dalamud/Data/DataManager.cs b/Dalamud/Data/DataManager.cs index 2e679ab23..8daa7cdf5 100644 --- a/Dalamud/Data/DataManager.cs +++ b/Dalamud/Data/DataManager.cs @@ -303,6 +303,7 @@ namespace Dalamud.Data { var luminaOptions = new LuminaOptions { + LoadMultithreaded = true, CacheFileResources = true, #if DEBUG PanicOnSheetChecksumMismatch = true, diff --git a/Dalamud/Game/Gui/Internal/DalamudIME.cs b/Dalamud/Game/Gui/Internal/DalamudIME.cs index e955997fd..419b01de9 100644 --- a/Dalamud/Game/Gui/Internal/DalamudIME.cs +++ b/Dalamud/Game/Gui/Internal/DalamudIME.cs @@ -128,9 +128,9 @@ namespace Dalamud.Game.Gui.Internal private void ToggleWindow(bool visible) { if (visible) - Service.Get().OpenIMEWindow(); + Service.Get().OpenImeWindow(); else - Service.Get().CloseIMEWindow(); + Service.Get().CloseImeWindow(); } private long WndProcDetour(IntPtr hWnd, uint msg, ulong wParam, long lParam) diff --git a/Dalamud/Interface/Internal/DalamudCommands.cs b/Dalamud/Interface/Internal/DalamudCommands.cs index 56ec778d8..e81d9f5a4 100644 --- a/Dalamud/Interface/Internal/DalamudCommands.cs +++ b/Dalamud/Interface/Internal/DalamudCommands.cs @@ -289,7 +289,7 @@ namespace Dalamud.Interface.Internal private void OnDebugDrawIMEPanel(string command, string arguments) { - Service.Get().OpenIMEWindow(); + Service.Get().OpenImeWindow(); } private void OnOpenLog(string command, string arguments) diff --git a/Dalamud/Interface/Internal/DalamudInterface.cs b/Dalamud/Interface/Internal/DalamudInterface.cs index a25279e26..cd314a756 100644 --- a/Dalamud/Interface/Internal/DalamudInterface.cs +++ b/Dalamud/Interface/Internal/DalamudInterface.cs @@ -232,7 +232,7 @@ namespace Dalamud.Interface.Internal /// /// Opens the . /// - public void OpenIMEWindow() => this.imeWindow.IsOpen = true; + public void OpenImeWindow() => this.imeWindow.IsOpen = true; /// /// Opens the . @@ -263,7 +263,7 @@ namespace Dalamud.Interface.Internal /// Opens the . /// public void OpenStyleEditor() => this.styleEditorWindow.IsOpen = true; - + /// /// Opens the . /// @@ -276,7 +276,12 @@ namespace Dalamud.Interface.Internal /// /// Closes the . /// - public void CloseIMEWindow() => this.imeWindow.IsOpen = false; + public void CloseImeWindow() => this.imeWindow.IsOpen = false; + + /// + /// Closes the . + /// + public void CloseGamepadModeNotifierWindow() => this.gamepadModeNotifierWindow.IsOpen = false; #endregion diff --git a/Dalamud/Interface/Internal/Windows/IMEWindow.cs b/Dalamud/Interface/Internal/Windows/IMEWindow.cs index f07c56202..328f09c45 100644 --- a/Dalamud/Interface/Internal/Windows/IMEWindow.cs +++ b/Dalamud/Interface/Internal/Windows/IMEWindow.cs @@ -29,7 +29,7 @@ namespace Dalamud.Interface.Internal.Windows /// public override void Draw() { - if (this.IsOpen && Service.Get()[VirtualKey.SHIFT]) Service.Get().CloseIMEWindow(); + if (this.IsOpen && Service.Get()[VirtualKey.SHIFT]) Service.Get().CloseImeWindow(); var ime = Service.GetNullable(); if (ime == null || !ime.IsEnabled) @@ -42,7 +42,7 @@ namespace Dalamud.Interface.Internal.Windows /// public override void PostDraw() { - if (this.IsOpen && Service.Get()[VirtualKey.SHIFT]) Service.Get().CloseIMEWindow(); + if (this.IsOpen && Service.Get()[VirtualKey.SHIFT]) Service.Get().CloseImeWindow(); var ime = Service.GetNullable(); if (ime == null || !ime.IsEnabled) diff --git a/Dalamud/Interface/Internal/Windows/SettingsWindow.cs b/Dalamud/Interface/Internal/Windows/SettingsWindow.cs index 729390aa0..2dd5b2c57 100644 --- a/Dalamud/Interface/Internal/Windows/SettingsWindow.cs +++ b/Dalamud/Interface/Internal/Windows/SettingsWindow.cs @@ -952,6 +952,9 @@ namespace Dalamud.Interface.Internal.Windows { ImGui.GetIO().BackendFlags &= ~ImGuiBackendFlags.HasGamepad; ImGui.GetIO().ConfigFlags &= ~ImGuiConfigFlags.NavEnableSetMousePos; + + var di = Service.Get(); + di.CloseGamepadModeNotifierWindow(); } else {