AppleWin/source/frontends/sa2/gamepad.h
Andrea Odetti e8972aa824 Add support for gamepads (hardcoded to be the first).
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2020-10-15 12:55:27 +01:00

23 lines
412 B
C++

#pragma once
#include "linux/paddle.h"
#include <SDL.h>
#include <vector>
#include <memory>
class Gamepad : public Paddle
{
public:
Gamepad(const int index);
virtual bool getButton(int i) const;
virtual int getAxis(int i) const;
private:
std::shared_ptr<SDL_GameController> myController;
std::vector<SDL_GameControllerButton> myButtonCodes;
std::vector<SDL_GameControllerAxis> myAxisCodes;
};