v2.4.0: cleaned up various allocations that occurred every frame

This commit is contained in:
Evan Debenham
2024-02-05 17:11:48 -05:00
parent 94bf5b88c4
commit 2466974a71
20 changed files with 209 additions and 156 deletions
@@ -62,6 +62,10 @@ public class KeyEvent {
}
public static synchronized void processKeyEvents(){
if (keyEvents.isEmpty()) {
return;
}
for (KeyEvent k : keyEvents){
if (KeyBindings.getActionForKey(k) == GameAction.LEFT_CLICK){
Game.inputHandler.emulateTouch(ControllerHandler.CONTROLLER_POINTER_ID, PointerEvent.LEFT, k.pressed);