|
|
|
@ -160,13 +160,26 @@ namespace olc { |
|
|
|
|
#ifdef WIN32 |
|
|
|
|
GamePad(LPCDIDEVICEINSTANCEA lpddi); |
|
|
|
|
GamePad(DWORD xId); |
|
|
|
|
private: |
|
|
|
|
void startVibration(float strength = 1) const; |
|
|
|
|
|
|
|
|
|
void stopVibration() const; |
|
|
|
|
public: |
|
|
|
|
#endif |
|
|
|
|
#ifdef __linux__ |
|
|
|
|
GamePad(std::string path, int fd); |
|
|
|
|
|
|
|
|
|
void startVibration(float strength = 1) const; |
|
|
|
|
|
|
|
|
|
void stopVibration() const; |
|
|
|
|
#endif |
|
|
|
|
#ifdef __EMSCRIPTEN__ |
|
|
|
|
// TODO ctor
|
|
|
|
|
GamePad(long id, std::string name); |
|
|
|
|
|
|
|
|
|
void startVibration(float strength = 1) const; |
|
|
|
|
|
|
|
|
|
void stopVibration() const; |
|
|
|
|
#endif |
|
|
|
|
GamePad(const GamePad &other) = delete; |
|
|
|
|
|
|
|
|
@ -214,10 +227,6 @@ namespace olc { |
|
|
|
|
|
|
|
|
|
static void updateGamepads(); |
|
|
|
|
|
|
|
|
|
void startVibration(float strength = 1) const; |
|
|
|
|
|
|
|
|
|
void stopVibration() const; |
|
|
|
|
|
|
|
|
|
std::string name; |
|
|
|
|
int axisCount = GP_AXIS_COUNT; |
|
|
|
|
int buttonCount = GP_BUTTON_COUNT; |
|
|
|
|