v1.4.0: mouse and controller cursor positions are now synced

This commit is contained in:
Evan Debenham
2022-07-29 15:33:03 -04:00
parent 3c4420e8a0
commit 90a1d3ce2b
2 changed files with 9 additions and 2 deletions
@@ -156,9 +156,10 @@ public class ControllerHandler implements ControllerListener {
controllerPointerActive = active;
if (active){
Gdx.input.setCursorCatched(true);
controllerPointerPos = new PointF(Game.width/2, Game.height/2);
controllerPointerPos = new PointF(PointerEvent.currentHoverPos());
} else if (!Cursor.isCursorCaptured()) {
Gdx.input.setCursorCatched(false);
Gdx.input.setCursorPosition((int)controllerPointerPos.x, (int)controllerPointerPos.y);
}
}