Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Hopefully fixed the last of the C variable declaration problems which…
Browse files Browse the repository at this point in the history
… caused compile failures with Visual Studio.
  • Loading branch information
slouken committed Feb 12, 2013
1 parent c097260 commit 61d1d98
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/joystick/SDL_gamecontroller.c
Expand Up @@ -423,9 +423,10 @@ void SDL_PrivateGameControllerParseButton( const char *szGameButton, const char

if ( button != SDL_CONTROLLER_BUTTON_INVALID )
{
int ridx;
pMapping->hatasbutton[ button ].hat = hat;
pMapping->hatasbutton[ button ].mask = mask;
int ridx = (hat << 4) | mask;
ridx = (hat << 4) | mask;
pMapping->rhatasbutton[ ridx ] = button;
}
else if ( axis != SDL_CONTROLLER_AXIS_INVALID )
Expand Down Expand Up @@ -1071,13 +1072,13 @@ SDL_PrivateGameControllerAxis(SDL_GameController * gamecontroller, SDL_CONTROLLE
int
SDL_PrivateGameControllerButton(SDL_GameController * gamecontroller, SDL_CONTROLLER_BUTTON button, Uint8 state)
{
if ( button == SDL_CONTROLLER_BUTTON_INVALID )
return (0);

int posted;
#if !SDL_EVENTS_DISABLED
SDL_Event event;

if ( button == SDL_CONTROLLER_BUTTON_INVALID )
return (0);

switch (state) {
case SDL_PRESSED:
event.type = SDL_CONTROLLERBUTTONDOWN;
Expand Down

0 comments on commit 61d1d98

Please sign in to comment.