载入中...
搜索中...
未找到
Joystick.h
浏览该文件的文档.
Joystick / gamepad manager. Tracks connected pads and gamecontroller mappings.
Definition Joystick.h:14
virtual int getJoystickCount() const =0
Number of currently tracked pads.
virtual std::string saveGamepadMappings()=0
Serializes the in-memory GameController mapping database.
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 void loadGamepadMappings(const std::string &mappings)=0
Load SDL GameController mapping database (newline-separated).
virtual std::string getGamepadMappingString(const std::string &guid) const =0
Mapping string for a device GUID, or empty if none.
virtual int getIndex(const Pad *pad)=0
Dense index of pad, or -1 if not tracked.
Module_REG(Joystick)
virtual Pad * getJoystick(int joyindex)=0
Pad at a dense joyindex in [0, getJoystickCount()).
virtual Pad * addJoystick(int deviceindex)=0
Open a device by SDL device index; returns null on failure.
One connected (or previously connected) joystick / gamepad device. Gamepad axis/button names follow S...
Definition Pad.h:13
Definition Joystick.cpp:8