mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +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
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package net.torvald.terrarum.console
|
||||
|
||||
import com.sun.javaws.exceptions.InvalidArgumentException
|
||||
import net.torvald.imagefont.GameFontBase
|
||||
import net.torvald.terrarum.Terrarum
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package net.torvald.terrarum.mapgenerator
|
||||
|
||||
import net.torvald.random.HQRNG
|
||||
import com.sun.javaws.exceptions.InvalidArgumentException
|
||||
|
||||
import java.util.Random
|
||||
|
||||
|
||||
Reference in New Issue
Block a user