mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-17 13:27:43 +01:00
feat: Add support for gamepad control of ImGui
Alongside a settings option and the ability for plugins to query gamepad state. PLugins cannot, however, as of now set an input as 'handled' and block it for the game. Whether game or ImGui is receiving gamepad input can be be checked via `(ImGui.GetIO().ConfigFlags & ImGuiConfigFlags.NavEnableGamepad) > 0`
This commit is contained in:
parent
9d38069fb3
commit
76bf0bc52d
8 changed files with 396 additions and 155 deletions
|
|
@ -16,7 +16,14 @@ namespace Dalamud.Game.ClientState
|
|||
public IntPtr SetupTerritoryType { get; private set; }
|
||||
//public IntPtr SomeActorTableAccess { get; private set; }
|
||||
//public IntPtr PartyListUpdate { get; private set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Game function which polls the gamepads for data.
|
||||
///
|
||||
/// Called every frame, even when `Enable Gamepad` is off in the settings.
|
||||
/// </summary>
|
||||
public IntPtr GamepadPoll { get; private set; }
|
||||
|
||||
public IntPtr ConditionFlags { get; private set; }
|
||||
|
||||
protected override void Setup64Bit(SigScanner sig) {
|
||||
|
|
@ -38,6 +45,8 @@ namespace Dalamud.Game.ClientState
|
|||
ConditionFlags = sig.GetStaticAddressFromSig("48 8D 0D ?? ?? ?? ?? BA ?? ?? ?? ?? E8 ?? ?? ?? ?? B0 01 48 83 C4 30");
|
||||
|
||||
TargetManager = sig.GetStaticAddressFromSig("48 8B 05 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? FF 50 ?? 48 85 DB", 3);
|
||||
|
||||
this.GamepadPoll = sig.ScanText("40 ?? 57 41 ?? 48 81 EC ?? ?? ?? ?? 44 0F ?? ?? ?? ?? ?? ?? ?? 48 8B");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue