Pas a SDL3 complet

This commit is contained in:
2024-11-06 21:35:30 +01:00
parent 22619cf207
commit 53784e6fb0
7 changed files with 200 additions and 127 deletions

View File

@@ -11,8 +11,8 @@ namespace input
static uint8_t btnClicked = 0;
static int wheel = 0;
static SDL_Gamepad *gamepad = NULL;
static int8_t pad_btn_pressed = SDL_CONTROLLER_BUTTON_INVALID;
static int8_t pad_btn_down = SDL_CONTROLLER_BUTTON_INVALID;
static int8_t pad_btn_pressed = SDL_GAMEPAD_BUTTON_INVALID;
static int8_t pad_btn_down = SDL_GAMEPAD_BUTTON_INVALID;
void initGamePad()
{
@@ -98,7 +98,7 @@ namespace input
// Determina si hi ha algun botó del pad polsat ara mateix
bool anyPadBtn()
{
return pad_btn_down != SDL_CONTROLLER_BUTTON_INVALID;
return pad_btn_down != SDL_GAMEPAD_BUTTON_INVALID;
}
// Torna el codi del botó del pad que està sent polsat ara mateix