SDL joystick/gamepad module backend (device enumeration and mappings). 更多...
#include <Joystick.h>
Public 成员函数 | |
| Joystick () | |
| Initializes SDL joystick subsystems used by this backend. | |
| ~Joystick () override | |
| Closes all tracked pads. | |
| Pad * | addJoystick (int deviceindex) override |
| Open a device by SDL device index; returns null on failure. | |
| void | removeJoystick (eve::joystick::Pad *pad) override |
| Removes and destroys a previously opened pad. | |
| Pad * | getJoystickFromID (int instanceid) override |
| Looks up a pad by SDL instance id; null if unknown. | |
| Pad * | getJoystick (int joyindex) override |
| Pad at a dense joyindex in [0, getJoystickCount()). | |
| int | getIndex (const eve::joystick::Pad *pad) override |
| Dense index of pad, or -1 if not tracked. | |
| int | getJoystickCount () const override |
| Number of currently tracked pads. | |
| void | loadGamepadMappings (const std::string &mappings) override |
| Load SDL GameController mapping database (newline-separated). | |
| std::string | saveGamepadMappings () override |
| Serializes the in-memory GameController mapping database. | |
| std::string | getGamepadMappingString (const std::string &guid) const override |
| Mapping string for a device GUID, or empty if none. | |
Public 成员函数 继承自 eve::joystick::Joystick | |
| Module_REG (Joystick) | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| Module. | |
| virtual std::string | getName () const =0 |
| Returns the name. | |
详细描述
SDL joystick/gamepad module backend (device enumeration and mappings).
在文件 Joystick.h 第 14 行定义.
构造及析构函数说明
◆ Joystick()
| eve::joystick::sdl::Joystick::Joystick | ( | ) |
Initializes SDL joystick subsystems used by this backend.
在文件 Joystick.cpp 第 15 行定义.
引用了 addJoystick() , 以及 eve::joystick::sdl::bindJoystickEventSinkOwner().
◆ ~Joystick()
|
overridevirtual |
Closes all tracked pads.
在文件 Joystick.cpp 第 27 行定义.
成员函数说明
◆ addJoystick()
|
overridevirtual |
Open a device by SDL device index; returns null on failure.
在文件 Joystick.cpp 第 63 行定义.
引用了 active, pad, removeJoystick() , 以及 reused.
被这些函数引用 Joystick().
◆ getGamepadMappingString()
|
overridevirtual |
Mapping string for a device GUID, or empty if none.
在文件 Joystick.cpp 第 175 行定义.
◆ getIndex()
|
overridevirtual |
◆ getJoystick()
|
overridevirtual |
Pad at a dense joyindex in [0, getJoystickCount()).
在文件 Joystick.cpp 第 40 行定义.
◆ getJoystickCount()
|
overridevirtual |
◆ getJoystickFromID()
|
overridevirtual |
Looks up a pad by SDL instance id; null if unknown.
在文件 Joystick.cpp 第 56 行定义.
◆ loadGamepadMappings()
|
overridevirtual |
Load SDL GameController mapping database (newline-separated).
在文件 Joystick.cpp 第 142 行定义.
◆ removeJoystick()
|
overridevirtual |
Removes and destroys a previously opened pad.
在文件 Joystick.cpp 第 104 行定义.
引用了 pad.
被这些函数引用 addJoystick().
◆ saveGamepadMappings()
|
overridevirtual |
该类的文档由以下文件生成:
- src/modules/joystick/sdl/Joystick.h
- src/modules/joystick/sdl/Joystick.cpp
Public 成员函数 继承自