Hopefully fixed the last of the C variable declaration problems which caused compile failures with Visual Studio.
This commit is contained in:
parent
8af5f8ee18
commit
b836001559
1 changed files with 5 additions and 4 deletions
|
@ -423,9 +423,10 @@ void SDL_PrivateGameControllerParseButton( const char *szGameButton, const char
|
||||||
|
|
||||||
if ( button != SDL_CONTROLLER_BUTTON_INVALID )
|
if ( button != SDL_CONTROLLER_BUTTON_INVALID )
|
||||||
{
|
{
|
||||||
|
int ridx;
|
||||||
pMapping->hatasbutton[ button ].hat = hat;
|
pMapping->hatasbutton[ button ].hat = hat;
|
||||||
pMapping->hatasbutton[ button ].mask = mask;
|
pMapping->hatasbutton[ button ].mask = mask;
|
||||||
int ridx = (hat << 4) | mask;
|
ridx = (hat << 4) | mask;
|
||||||
pMapping->rhatasbutton[ ridx ] = button;
|
pMapping->rhatasbutton[ ridx ] = button;
|
||||||
}
|
}
|
||||||
else if ( axis != SDL_CONTROLLER_AXIS_INVALID )
|
else if ( axis != SDL_CONTROLLER_AXIS_INVALID )
|
||||||
|
@ -1071,13 +1072,13 @@ SDL_PrivateGameControllerAxis(SDL_GameController * gamecontroller, SDL_CONTROLLE
|
||||||
int
|
int
|
||||||
SDL_PrivateGameControllerButton(SDL_GameController * gamecontroller, SDL_CONTROLLER_BUTTON button, Uint8 state)
|
SDL_PrivateGameControllerButton(SDL_GameController * gamecontroller, SDL_CONTROLLER_BUTTON button, Uint8 state)
|
||||||
{
|
{
|
||||||
if ( button == SDL_CONTROLLER_BUTTON_INVALID )
|
|
||||||
return (0);
|
|
||||||
|
|
||||||
int posted;
|
int posted;
|
||||||
#if !SDL_EVENTS_DISABLED
|
#if !SDL_EVENTS_DISABLED
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
|
|
||||||
|
if ( button == SDL_CONTROLLER_BUTTON_INVALID )
|
||||||
|
return (0);
|
||||||
|
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case SDL_PRESSED:
|
case SDL_PRESSED:
|
||||||
event.type = SDL_CONTROLLERBUTTONDOWN;
|
event.type = SDL_CONTROLLERBUTTONDOWN;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue