diff --git a/Dalamud/Game/Network/Internal/WinSockHandlers.cs b/Dalamud/Game/Network/Internal/WinSockHandlers.cs index 281291210..82f2f0d91 100644 --- a/Dalamud/Game/Network/Internal/WinSockHandlers.cs +++ b/Dalamud/Game/Network/Internal/WinSockHandlers.cs @@ -19,8 +19,7 @@ namespace Dalamud.Game.Network.Internal /// public WinSockHandlers() { - this.ws2SocketHook = HookManager.DirtyLinuxUser ? null - : Hook.FromSymbol("ws2_32.dll", "socket", this.OnSocket, true); + this.ws2SocketHook = Hook.FromSymbol("ws2_32.dll", "socket", this.OnSocket, true); this.ws2SocketHook?.Enable(); } diff --git a/Dalamud/Hooking/Internal/HookManager.cs b/Dalamud/Hooking/Internal/HookManager.cs index 18e29489e..206e0e34a 100644 --- a/Dalamud/Hooking/Internal/HookManager.cs +++ b/Dalamud/Hooking/Internal/HookManager.cs @@ -27,51 +27,6 @@ namespace Dalamud.Hooking.Internal { } - /// - /// Gets a value indicating whether the client is running under Linux Wine. - /// - /// A value indicating whether the game is running under Wine. - internal static bool DirtyLinuxUser - { - get - { - // TODO: Temporary for testing - return false; - - if (checkLinuxOnce) - { - checkLinuxOnce = false; - - bool Check1() - { - return EnvironmentConfiguration.XlWineOnLinux; - } - - bool Check2() - { - var hModule = NativeFunctions.GetModuleHandleW("ntdll.dll"); - var proc1 = NativeFunctions.GetProcAddress(hModule, "wine_get_version"); - var proc2 = NativeFunctions.GetProcAddress(hModule, "wine_get_build_id"); - - return proc1 != IntPtr.Zero || proc2 != IntPtr.Zero; - } - - bool Check3() - { - return Registry.CurrentUser.OpenSubKey(@"Software\Wine") != null || - Registry.LocalMachine.OpenSubKey(@"Software\Wine") != null; - } - - if (isRunningLinux = Check1() || Check2() || Check3()) - { - Log.Information($"Dalamud detected running on Wine"); - } - } - - return isRunningLinux; - } - } - /// /// Gets a static list of tracked and registered hooks. /// diff --git a/Dalamud/Interface/Internal/InterfaceManager.cs b/Dalamud/Interface/Internal/InterfaceManager.cs index 6d1df7d5d..ae9335e9e 100644 --- a/Dalamud/Interface/Internal/InterfaceManager.cs +++ b/Dalamud/Interface/Internal/InterfaceManager.cs @@ -94,8 +94,7 @@ namespace Dalamud.Interface.Internal Log.Error(e, "RTSS Free failed"); } - this.setCursorHook = HookManager.DirtyLinuxUser ? null - : Hook.FromSymbol("user32.dll", "SetCursor", this.SetCursorDetour, true); + this.setCursorHook = Hook.FromSymbol("user32.dll", "SetCursor", this.SetCursorDetour, true); this.presentHook = new Hook(this.address.Present, this.PresentDetour); this.resizeBuffersHook = new Hook(this.address.ResizeBuffers, this.ResizeBuffersDetour);