Split ControllerHandler teardown into stop() and destroy() functions

This commit is contained in:
Cameron Gutman
2023-10-07 00:35:36 -05:00
parent 2b63203a5b
commit bc27492206
2 changed files with 23 additions and 3 deletions

View File

@@ -1093,6 +1093,7 @@ public class Game extends Activity implements SurfaceHolder.Callback,
InputManager inputManager = (InputManager) getSystemService(Context.INPUT_SERVICE);
if (controllerHandler != null) {
inputManager.unregisterInputDeviceListener(controllerHandler);
controllerHandler.destroy();
}
if (keyboardTranslator != null) {
inputManager.unregisterInputDeviceListener(keyboardTranslator);