mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
InputSystem: joystick deadzone indices and event input callback types
Adjust iface accordingly.
This commit is contained in:
parent
bbebbdac13
commit
4e3fdab7e7
@ -37,10 +37,12 @@ enum JoystickAxis_t
|
||||
MAX_JOYSTICK_AXES,
|
||||
};
|
||||
|
||||
enum JoystickDeadzoneMode_t
|
||||
enum JoystickDeadzoneIndex_t
|
||||
{
|
||||
JOYSTICK_DEADZONE_CROSS = 0,
|
||||
JOYSTICK_DEADZONE_SQUARE = 1,
|
||||
JOYSTICK_DEADZONE_NONE = 0,
|
||||
JOYSTICK_DEADZONE_XBOX360,
|
||||
JOYSTICK_DEADZONE_XBOX1,
|
||||
JOYSTICK_DEADZONE_OTHER
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -16,6 +16,10 @@
|
||||
DECLARE_POINTER_HANDLE( InputCursorHandle_t );
|
||||
#define INPUT_CURSOR_HANDLE_INVALID ( (InputCursorHandle_t)0 )
|
||||
|
||||
///-----------------------------------------------------------------------------
|
||||
/// Input event callback
|
||||
///-----------------------------------------------------------------------------
|
||||
typedef void ( *InputEventCallback_t ) ( const InputEvent_t& eventCallback );
|
||||
|
||||
///-----------------------------------------------------------------------------
|
||||
/// An enumeration describing well-known cursor icons
|
||||
@ -67,17 +71,17 @@ public:
|
||||
/// Is a button down? "Buttons" are binary-state input devices (mouse buttons, keyboard keys).
|
||||
virtual bool IsButtonDown( const ButtonCode_t code ) const = 0;
|
||||
|
||||
/// Returns the tick at which the button was pressed and released
|
||||
/// Returns the tick at which the button was pressed and released.
|
||||
virtual int GetButtonPressedTick( const ButtonCode_t code ) const = 0;
|
||||
|
||||
/// TODO[ AMOS ]: reverse this further ( returns an enum ? )...
|
||||
virtual int GetJoystickDeadzoneIndex( ) const = 0;
|
||||
/// Returns the joystick deadzone index for connected hardware.
|
||||
virtual JoystickDeadzoneIndex_t GetJoystickDeadzoneIndex( ) const = 0;
|
||||
|
||||
/// DoNothing; VFTable padding.
|
||||
virtual bool ReturnFalse( ) const = 0;
|
||||
|
||||
/// Polls the current input state.
|
||||
virtual void PollInputState( const void* const eventCallback ) = 0;
|
||||
virtual void PollInputState( const InputEventCallback_t eventCallback ) = 0;
|
||||
|
||||
/// Posts a user-defined event into the event queue; this is expected
|
||||
/// to be called in overridden wndprocs connected to the root panel.
|
||||
|
Loading…
x
Reference in New Issue
Block a user