mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 02:54:04 +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
|
// nullify if not actually connected
|
||||||
if (!((XinputControllerAdapter) gamepad).getC().isConnected()) {
|
try {
|
||||||
|
if (!((XinputControllerAdapter) gamepad).getC().isConnected()) {
|
||||||
|
gamepad = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (NullPointerException notQuiteWindows) {
|
||||||
gamepad = null;
|
gamepad = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ class TitleScreen(val batch: SpriteBatch) : Screen {
|
|||||||
// render? just do it anyway
|
// render? just do it anyway
|
||||||
AppLoader.measureDebugTime("Ingame.render") { renderScreen() }
|
AppLoader.measureDebugTime("Ingame.render") { renderScreen() }
|
||||||
AppLoader.setDebugTime("Ingame.render-Light",
|
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