Skip to content

Commit

Permalink
Only process joystick events with valid device
Browse files Browse the repository at this point in the history
  • Loading branch information
levinli303 committed Jul 25, 2023
1 parent a1f0fa5 commit cf58d00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="auto"
android:versionCode="394"
android:versionCode="395"
android:versionName="1.5.24">

<uses-feature android:name="android.hardware.type.pc" android:required="false" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ class CelestiaInteraction(context: Context, private val appCore: AppCore, privat
if (!isReady) { return true }

if (event.source and InputDevice.SOURCE_JOYSTICK == InputDevice.SOURCE_JOYSTICK
&& event.device != null
&& event.actionMasked == MotionEvent.ACTION_MOVE) {
if (!canAcceptKeyEvents()) return false
// Process the movements starting from the
Expand Down

0 comments on commit cf58d00

Please sign in to comment.