v1.4.0: mouse and controller cursor positions are now synced
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user