mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-12-26 20:54:57 +00:00
virtual joysticks: move variable decls to top of function (for C90 compat; Bug 5038)
This commit is contained in:
parent
7379991778
commit
8cd08646bb
@ -343,6 +343,7 @@ static void
|
||||
VIRTUAL_JoystickUpdate(SDL_Joystick * joystick)
|
||||
{
|
||||
joystick_hwdata *hwdata;
|
||||
int i;
|
||||
|
||||
if (!joystick) {
|
||||
return;
|
||||
@ -353,13 +354,13 @@ VIRTUAL_JoystickUpdate(SDL_Joystick * joystick)
|
||||
|
||||
hwdata = (joystick_hwdata *)joystick->hwdata;
|
||||
|
||||
for (int i = 0; i < hwdata->naxes; ++i) {
|
||||
for (i = 0; i < hwdata->naxes; ++i) {
|
||||
SDL_PrivateJoystickAxis(joystick, i, hwdata->axes[i]);
|
||||
}
|
||||
for (int i = 0; i < hwdata->nbuttons; ++i) {
|
||||
for (i = 0; i < hwdata->nbuttons; ++i) {
|
||||
SDL_PrivateJoystickButton(joystick, i, hwdata->buttons[i]);
|
||||
}
|
||||
for (int i = 0; i < hwdata->nhats; ++i) {
|
||||
for (i = 0; i < hwdata->nhats; ++i) {
|
||||
SDL_PrivateJoystickHat(joystick, i, hwdata->hats[i]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user