|
|
@ -230,7 +230,9 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { |
|
|
|
|
|
|
|
|
override fun dispatchKeyEvent(event: KeyEvent): Boolean { |
|
|
override fun dispatchKeyEvent(event: KeyEvent): Boolean { |
|
|
if (event.source and InputDevice.SOURCE_JOYSTICK != InputDevice.SOURCE_JOYSTICK && |
|
|
if (event.source and InputDevice.SOURCE_JOYSTICK != InputDevice.SOURCE_JOYSTICK && |
|
|
event.source and InputDevice.SOURCE_GAMEPAD != InputDevice.SOURCE_GAMEPAD |
|
|
|
|
|
|
|
|
event.source and InputDevice.SOURCE_GAMEPAD != InputDevice.SOURCE_GAMEPAD && |
|
|
|
|
|
event.source and InputDevice.SOURCE_KEYBOARD != InputDevice.SOURCE_KEYBOARD && |
|
|
|
|
|
event.source and InputDevice.SOURCE_MOUSE != InputDevice.SOURCE_MOUSE |
|
|
) { |
|
|
) { |
|
|
return super.dispatchKeyEvent(event) |
|
|
return super.dispatchKeyEvent(event) |
|
|
} |
|
|
} |
|
|
@ -244,7 +246,9 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener { |
|
|
|
|
|
|
|
|
override fun dispatchGenericMotionEvent(event: MotionEvent): Boolean { |
|
|
override fun dispatchGenericMotionEvent(event: MotionEvent): Boolean { |
|
|
if (event.source and InputDevice.SOURCE_JOYSTICK != InputDevice.SOURCE_JOYSTICK && |
|
|
if (event.source and InputDevice.SOURCE_JOYSTICK != InputDevice.SOURCE_JOYSTICK && |
|
|
event.source and InputDevice.SOURCE_GAMEPAD != InputDevice.SOURCE_GAMEPAD |
|
|
|
|
|
|
|
|
event.source and InputDevice.SOURCE_GAMEPAD != InputDevice.SOURCE_GAMEPAD && |
|
|
|
|
|
event.source and InputDevice.SOURCE_KEYBOARD != InputDevice.SOURCE_KEYBOARD && |
|
|
|
|
|
event.source and InputDevice.SOURCE_MOUSE != InputDevice.SOURCE_MOUSE |
|
|
) { |
|
|
) { |
|
|
return super.dispatchGenericMotionEvent(event) |
|
|
return super.dispatchGenericMotionEvent(event) |
|
|
} |
|
|
} |
|
|
|