AppleWin/source/frontends/sa2/gamepad.h
Andrea Odetti d314546b11 Paddle: make raw interface to return values in [-1,1] to ease transformations.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
2020-10-15 16:24:20 +01:00

23 lines
415 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 double getAxis(int i) const;
private:
std::shared_ptr<SDL_GameController> myController;
std::vector<SDL_GameControllerButton> myButtonCodes;
std::vector<SDL_GameControllerAxis> myAxisCodes;
};