mirror of
https://github.com/yawut/SDL.git
synced 2026-08-28 11:45:13 -05:00
Hopefully fixed the last of the C variable declaration problems which caused compile failures with Visual Studio.
This commit is contained in:
@@ -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 )
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user