Skip to content

Commit

Permalink
setPlayerIndex changed to public
Browse files Browse the repository at this point in the history
  • Loading branch information
MrStahlfelge committed Sep 6, 2020
1 parent cb28d02 commit b859892
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/com/studiohartman/jamepad/ControllerIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,13 @@ public int getPlayerIndex() throws ControllerUnpluggedException {
return SDL_GameControllerGetPlayerIndex(pad);
*/

private void setPlayerIndex(int index) throws ControllerUnpluggedException {
/**
* Sets player index, if possible. At the time being, this doesn't seem to be supported on
* Windows, Linux and Mac by SDL
* @param index
*/
public void setPlayerIndex(int index) throws ControllerUnpluggedException {
ensureConnected();
// looks like SDL doesn't really change something here for Windows, Linux and Mac
nativeSetPlayerIndex(controllerPtr, index);
}

Expand Down

0 comments on commit b859892

Please sign in to comment.