MochiEngine
Loading...
Searching...
No Matches
Mochi::Input::IGamepadProvider Class Referenceabstract

#include <IGamepadProvider.h>

Inheritance diagram for Mochi::Input::IGamepadProvider:
Mochi::Input::DummyGamepadProvider Mochi::Input::SDLGamepadProvider

Public Member Functions

virtual GamepadData GetData (const unsigned int &player) const =0
 Gets data of the gamepad in the selected slot for this frame.
virtual bool HasGamepad (const unsigned int &player) const =0
 Checks if there is a gamepad connected in the specified player slot.

Detailed Description

Interface used to get per-frame data of the connected gamepads.

Member Function Documentation

◆ GetData()

virtual GamepadData Mochi::Input::IGamepadProvider::GetData ( const unsigned int & player) const
pure virtual

Gets data of the gamepad in the selected slot for this frame.

Parameters
playerThe slot to get the data from.
Returns
GamepadData of the selected slot for this frame.

Implemented in Mochi::Input::DummyGamepadProvider, and Mochi::Input::SDLGamepadProvider.

◆ HasGamepad()

virtual bool Mochi::Input::IGamepadProvider::HasGamepad ( const unsigned int & player) const
pure virtual

Checks if there is a gamepad connected in the specified player slot.

Parameters
playerThe slot to check.
Returns
True if the slot has a gamepad connected.

Implemented in Mochi::Input::DummyGamepadProvider, and Mochi::Input::SDLGamepadProvider.


The documentation for this class was generated from the following file: