Joystick / gamepad manager. Tracks connected pads and gamecontroller mappings. 更多...
#include <Joystick.h>
Public 成员函数 | |
| Module_REG (Joystick) | |
| virtual | ~Joystick () |
| Closes tracked pads and releases backend resources. | |
| virtual Pad * | addJoystick (int deviceindex)=0 |
| Open a device by SDL device index; returns null on failure. | |
| virtual void | removeJoystick (Pad *pad)=0 |
| Removes and destroys a previously opened pad. | |
| virtual Pad * | getJoystickFromID (int instanceid)=0 |
| Looks up a pad by SDL instance id; null if unknown. | |
| virtual Pad * | getJoystick (int joyindex)=0 |
| Pad at a dense joyindex in [0, getJoystickCount()). | |
| virtual int | getIndex (const Pad *pad)=0 |
| Dense index of pad, or -1 if not tracked. | |
| virtual int | getJoystickCount () const =0 |
| Number of currently tracked pads. | |
| virtual void | loadGamepadMappings (const std::string &mappings)=0 |
| Load SDL GameController mapping database (newline-separated). | |
| virtual std::string | saveGamepadMappings ()=0 |
| Serializes the in-memory GameController mapping database. | |
| virtual std::string | getGamepadMappingString (const std::string &guid) const =0 |
| Mapping string for a device GUID, or empty if none. | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
详细描述
Joystick / gamepad manager. Tracks connected pads and gamecontroller mappings.
在文件 Joystick.h 第 14 行定义.
构造及析构函数说明
◆ ~Joystick()
|
virtual |
Closes tracked pads and releases backend resources.
被 eve::joystick::sdl::Joystick 重载.
在文件 Joystick.cpp 第 12 行定义.
成员函数说明
◆ addJoystick()
|
pure virtual |
Open a device by SDL device index; returns null on failure.
在 eve::joystick::sdl::Joystick 内被实现.
◆ getGamepadMappingString()
|
pure virtual |
Mapping string for a device GUID, or empty if none.
在 eve::joystick::sdl::Joystick 内被实现.
◆ getIndex()
|
pure virtual |
Dense index of pad, or -1 if not tracked.
在 eve::joystick::sdl::Joystick 内被实现.
◆ getJoystick()
|
pure virtual |
Pad at a dense joyindex in [0, getJoystickCount()).
在 eve::joystick::sdl::Joystick 内被实现.
◆ getJoystickCount()
|
pure virtual |
Number of currently tracked pads.
在 eve::joystick::sdl::Joystick 内被实现.
◆ getJoystickFromID()
|
pure virtual |
Looks up a pad by SDL instance id; null if unknown.
在 eve::joystick::sdl::Joystick 内被实现.
◆ loadGamepadMappings()
|
pure virtual |
Load SDL GameController mapping database (newline-separated).
在 eve::joystick::sdl::Joystick 内被实现.
◆ Module_REG()
| eve::joystick::Joystick::Module_REG | ( | Joystick | ) |
◆ removeJoystick()
|
pure virtual |
Removes and destroys a previously opened pad.
在 eve::joystick::sdl::Joystick 内被实现.
◆ saveGamepadMappings()
|
pure virtual |
Serializes the in-memory GameController mapping database.
在 eve::joystick::sdl::Joystick 内被实现.
该类的文档由以下文件生成:
- src/modules/joystick/Joystick.h
- src/modules/joystick/Joystick.cpp
Public 成员函数 继承自