Skip to content

Commit

Permalink
Android: Changed an internal joystick function to return count instea…
Browse files Browse the repository at this point in the history
…d of id.

The returned value is currently not used by the caller. The instance id would
also not be needed on Java side and providing it just complicated the function.

Partially fixes Bugzilla #3234.
  • Loading branch information
philippwiesemann committed Feb 16, 2016
1 parent 0e2badc commit 9cd9925
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/joystick/android/SDL_sysjoystick.c
Expand Up @@ -340,7 +340,6 @@ Android_RemoveJoystick(int device_id)
return -1;
}

const int retval = item->device_instance;
if (item->joystick) {
item->joystick->hwdata = NULL;
}
Expand Down Expand Up @@ -376,7 +375,7 @@ Android_RemoveJoystick(int device_id)

SDL_free(item->name);
SDL_free(item);
return retval;
return numjoysticks;
}


Expand Down

0 comments on commit 9cd9925

Please sign in to comment.