Gamepad moved to a separate namespace, update public property name

This commit is contained in:
Raymond 2021-08-10 08:57:21 -04:00
parent 94645d8c7e
commit c102e3e64e
3 changed files with 7 additions and 12 deletions

View file

@ -1,6 +1,6 @@
using System; using System;
namespace Dalamud.Game.ClientState namespace Dalamud.Game.ClientState.GamePad
{ {
/// <summary> /// <summary>
/// Bitmask of the Button ushort used by the game. /// Bitmask of the Button ushort used by the game.

View file

@ -1,6 +1,6 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace Dalamud.Game.ClientState.Structs namespace Dalamud.Game.ClientState.GamePad
{ {
/// <summary> /// <summary>
/// Struct which gets populated by polling the gamepads. /// Struct which gets populated by polling the gamepads.

View file

@ -1,11 +1,10 @@
using System; using System;
using Dalamud.Game.ClientState.Structs;
using Dalamud.Hooking; using Dalamud.Hooking;
using ImGuiNET; using ImGuiNET;
using Serilog; using Serilog;
namespace Dalamud.Game.ClientState namespace Dalamud.Game.ClientState.GamePad
{ {
/// <summary> /// <summary>
/// Exposes the game gamepad state to dalamud. /// Exposes the game gamepad state to dalamud.
@ -24,7 +23,7 @@ namespace Dalamud.Game.ClientState
private int rightStickY; private int rightStickY;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="GamepadState" /> class. /// Initializes a new instance of the <see cref="GamepadState" /> class.
/// </summary> /// </summary>
/// <param name="resolver">Resolver knowing the pointer to the GamepadPoll function.</param> /// <param name="resolver">Resolver knowing the pointer to the GamepadPoll function.</param>
public GamepadState(ClientStateAddressResolver resolver) public GamepadState(ClientStateAddressResolver resolver)
@ -43,12 +42,10 @@ namespace Dalamud.Game.ClientState
private delegate int ControllerPoll(IntPtr controllerInput); private delegate int ControllerPoll(IntPtr controllerInput);
#if DEBUG
/// <summary> /// <summary>
/// Gets the pointer to the current instance of the GamepadInput struct. /// Gets the pointer to the current instance of the GamepadInput struct.
/// </summary> /// </summary>
public IntPtr GamepadInput { get; private set; } public IntPtr GamepadInputAddress { get; private set; }
#endif
/// <summary> /// <summary>
/// Gets the state of the left analogue stick in the left direction between 0 (not tilted) and 1 (max tilt). /// Gets the state of the left analogue stick in the left direction between 0 (not tilted) and 1 (max tilt).
@ -189,9 +186,7 @@ namespace Dalamud.Game.ClientState
var original = this.gamepadPoll.Original(gamepadInput); var original = this.gamepadPoll.Original(gamepadInput);
try try
{ {
#if DEBUG this.GamepadInputAddress = gamepadInput;
this.GamepadInput = gamepadInput;
#endif
var input = (GamepadInput*)gamepadInput; var input = (GamepadInput*)gamepadInput;
this.leftStickX = input->LeftStickX; this.leftStickX = input->LeftStickX;
this.leftStickY = input->LeftStickY; this.leftStickY = input->LeftStickY;