mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
requesting xinput will always fail on non-windows
This commit is contained in:
@@ -335,7 +335,12 @@ public class AppLoader implements ApplicationListener {
|
||||
}
|
||||
|
||||
// nullify if not actually connected
|
||||
if (!((XinputControllerAdapter) gamepad).getC().isConnected()) {
|
||||
try {
|
||||
if (!((XinputControllerAdapter) gamepad).getC().isConnected()) {
|
||||
gamepad = null;
|
||||
}
|
||||
}
|
||||
catch (NullPointerException notQuiteWindows) {
|
||||
gamepad = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ class TitleScreen(val batch: SpriteBatch) : Screen {
|
||||
// render? just do it anyway
|
||||
AppLoader.measureDebugTime("Ingame.render") { renderScreen() }
|
||||
AppLoader.setDebugTime("Ingame.render-Light",
|
||||
(AppLoader.debugTimers["Ingame.render"] as Long) - ((AppLoader.debugTimers["Renderer.LightTotal"] as? Long) ?: 0)
|
||||
((AppLoader.debugTimers["Ingame.render"] as? Long) ?: 0) - ((AppLoader.debugTimers["Renderer.LightTotal"] as? Long) ?: 0)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user