-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-Authored-By: Maksim Belov <[email protected]> Co-Authored-By: Mathias Boulay <[email protected]> Co-Authored-By: Duy Tran Khanh <[email protected]>
- Loading branch information
1 parent
684b25e
commit afbfc2a
Showing
19 changed files
with
1,187 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1725902304131 | ||
1725917740464 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/pojlib/input/gamepad/DefaultDataProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package pojlib.input.gamepad; | ||
|
||
import pojlib.input.GrabListener; | ||
|
||
import org.lwjgl.glfw.CallbackBridge; | ||
|
||
public class DefaultDataProvider implements GamepadDataProvider { | ||
public static final DefaultDataProvider INSTANCE = new DefaultDataProvider(); | ||
|
||
// Cannot instantiate this class publicly | ||
private DefaultDataProvider() {} | ||
|
||
@Override | ||
public GamepadMap getGameMap() { | ||
return GamepadMapStore.getGameMap(); | ||
} | ||
|
||
|
||
@Override | ||
public GamepadMap getMenuMap() { | ||
return GamepadMapStore.getMenuMap(); | ||
} | ||
|
||
@Override | ||
public boolean isGrabbing() { | ||
return CallbackBridge.isGrabbing(); | ||
} | ||
|
||
@Override | ||
public void attachGrabListener(GrabListener grabListener) { | ||
CallbackBridge.addGrabListener(grabListener); | ||
} | ||
} |
Oops, something went wrong.