Remove old PInvoke libs

This commit is contained in:
goaaats 2025-04-15 23:58:01 +02:00
parent 90b15d45c6
commit 4e724fbe45
8 changed files with 11 additions and 17 deletions

View file

@ -40,13 +40,12 @@ using Dalamud.Utility;
using FFXIVClientStructs.FFXIV.Client.System.Framework;
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Component.GUI;
using PInvoke;
using Serilog.Events;
namespace Dalamud.Interface.Internal;
/// <summary>
/// This plugin implements all of the Dalamud interface separately, to allow for reloading of the interface and rapid prototyping.
/// This plugin implements all the Dalamud interface separately, to allow for reloading of the interface and rapid prototyping.
/// </summary>
[ServiceManager.EarlyLoadedService]
internal class DalamudInterface : IInternalDisposableService
@ -575,7 +574,7 @@ internal class DalamudInterface : IInternalDisposableService
// Release focus of any ImGui window if we click into the game.
var io = ImGui.GetIO();
if (!io.WantCaptureMouse && (User32.GetKeyState((int)User32.VirtualKey.VK_LBUTTON) & 0x8000) != 0)
if (!io.WantCaptureMouse && (global::Windows.Win32.PInvoke.GetKeyState((int)VirtualKey.LBUTTON) & 0x8000) != 0)
{
unsafe
{

View file

@ -2,7 +2,6 @@
using Dalamud.Bindings.ImGui;
using Dalamud.Hooking;
using PInvoke;
using Serilog;
using Windows.Win32.Foundation;
using Windows.Win32.UI.WindowsAndMessaging;
@ -81,7 +80,7 @@ internal class HookWidget : IDataWindowWidget
var result = this.messageBoxMinHook!.Original(hwnd, "Cause Access Violation?", caption, MESSAGEBOX_STYLE.MB_YESNO);
if (result == (int)User32.MessageBoxResult.IDYES)
if (result == (int)MESSAGEBOX_RESULT.IDYES)
{
Marshal.ReadByte(IntPtr.Zero);
}