early-access version 2281

This commit is contained in:
pineappleEA
2021-12-07 02:20:09 +01:00
parent c2ae6d480a
commit c4fa174d53
591 changed files with 36978 additions and 18653 deletions

View File

@@ -119,7 +119,7 @@ static int s_arrBindingOrder[] = {
SDL_CONTROLLER_BUTTON_PADDLE2,
SDL_CONTROLLER_BUTTON_PADDLE3,
SDL_CONTROLLER_BUTTON_PADDLE4,
-1,
SDL_CONTROLLER_BUTTON_TOUCHPAD,
};
SDL_COMPILE_TIME_ASSERT(s_arrBindingOrder, SDL_arraysize(s_arrBindingOrder) == BINDING_COUNT);
@@ -167,6 +167,7 @@ static SDL_bool s_bBindingComplete;
static SDL_Window *window;
static SDL_Renderer *screen;
static SDL_bool done = SDL_FALSE;
static SDL_bool bind_touchpad = SDL_FALSE;
SDL_Texture *
LoadTexture(SDL_Renderer *renderer, const char *file, SDL_bool transparent)
@@ -234,6 +235,13 @@ SetCurrentBinding(int iBinding)
return;
}
if (s_arrBindingOrder[iBinding] == SDL_CONTROLLER_BUTTON_TOUCHPAD &&
!bind_touchpad)
{
SetCurrentBinding(iBinding + 1);
return;
}
s_iCurrentBinding = iBinding;
pBinding = &s_arrBindings[s_arrBindingOrder[s_iCurrentBinding]];
@@ -562,7 +570,7 @@ WatchJoystick(SDL_Joystick * joystick)
if ((event.key.keysym.sym != SDLK_ESCAPE)) {
break;
}
/* Fall through to signal quit */
SDL_FALLTHROUGH;
case SDL_QUIT:
done = SDL_TRUE;
break;
@@ -731,6 +739,10 @@ main(int argc, char *argv[])
exit(1);
}
if (argv[1] && SDL_strcmp(argv[1], "--bind-touchpad") == 0) {
bind_touchpad = SDL_TRUE;
}
/* Create a window to display joystick axis position */
window = SDL_CreateWindow("Game Controller Map", SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,
@@ -755,7 +767,7 @@ main(int argc, char *argv[])
if ((event.key.keysym.sym != SDLK_ESCAPE)) {
break;
}
/* Fall through to signal quit */
SDL_FALLTHROUGH;
case SDL_QUIT:
done = SDL_TRUE;
break;