Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GameController-based input handling #34

Merged
merged 13 commits into from
Apr 7, 2022
Merged

Add GameController-based input handling #34

merged 13 commits into from
Apr 7, 2022

Conversation

fwcd
Copy link
Owner

@fwcd fwcd commented Apr 6, 2022

Fixes #33

This will let us use mouse/keyboard controls on UIKit-based platforms, i.e. iPadOS, Mac Catalyst, etc.

Deferred:

  • Investigate why pointer locking doesn't work properly on iOS
  • Use GameController on macOS/AppKit too (?)

@fwcd fwcd added the enhancement New feature or request label Apr 6, 2022
fwcd added 11 commits April 6, 2022 05:09
...depending on whether a keyboard/mouse is connected
Fixes #30

SpriteKit seems to expect changes to happen on the main thread,
therefore we will schedule these changes there. Depending on the OS we
might already be on the main thread (e.g. on macOS), so we have to be
careful not to dispatch synchronously, since that would result in a
deadlock, therefore we submit the block asynchronously.
@fwcd fwcd changed the title WIP: Add GameController-based input handling Add GameController-based input handling Apr 7, 2022
@fwcd fwcd merged commit ede6ba3 into main Apr 7, 2022
@fwcd fwcd deleted the gamecontroller branch April 7, 2022 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use GameController framework
1 participant