22 lines
354 B
C++
22 lines
354 B
C++
#pragma once
|
|
#include <stdint.h>
|
|
|
|
struct SDL_Gamepad;
|
|
|
|
namespace mini
|
|
{
|
|
namespace pad
|
|
{
|
|
struct state_t {
|
|
SDL_Gamepad *gamepad = nullptr;
|
|
int8_t just_pressed = -1;
|
|
};
|
|
extern state_t state;
|
|
|
|
void init();
|
|
bool down(int8_t i);
|
|
bool press(int8_t i);
|
|
int press();
|
|
}
|
|
}
|