mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 21:44:05 +09:00
added missing condition for hasController
It also wireframes on Ubuntu with openjdk version 1.8.0_111 Former-commit-id: 594bc71d65b68cd185bf8ac322d9ae66ada47604 Former-commit-id: fce5fefe993c0729b80a5c46c0c37bd3bd5ca8de
This commit is contained in:
@@ -89,8 +89,10 @@ constructor(gamename: String) : StateBasedGame(gamename) {
|
||||
try {
|
||||
hasController = gc.input.controllerCount > 0
|
||||
|
||||
// check if the first controller is actually available
|
||||
Controllers.getController(0).getAxisValue(0)
|
||||
if (hasController) {
|
||||
// check if the first controller is actually available
|
||||
Controllers.getController(0).getAxisValue(0)
|
||||
}
|
||||
}
|
||||
catch (e: ArrayIndexOutOfBoundsException) {
|
||||
hasController = false
|
||||
|
||||
Reference in New Issue
Block a user