[android] fixing virtual keyboard in dark souls (#3061)

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3061
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Co-authored-by: PavelBARABANOV <pavelbarabanov94@gmail.com>
Co-committed-by: PavelBARABANOV <pavelbarabanov94@gmail.com>
This commit is contained in:
PavelBARABANOV 2025-11-22 21:06:24 +01:00 committed by crueter
parent 79b162a37c
commit c3cbe2d4d0
No known key found for this signature in database
GPG Key ID: 425ACD2D4830EBC6
1 changed files with 5 additions and 2 deletions

View File

@ -235,10 +235,13 @@ class EmulationActivity : AppCompatActivity(), SensorEventListener {
}
override fun dispatchKeyEvent(event: KeyEvent): Boolean {
val isPhysicalKeyboard = event.source and InputDevice.SOURCE_KEYBOARD == InputDevice.SOURCE_KEYBOARD &&
event.device?.isVirtual == false
if (event.source and InputDevice.SOURCE_JOYSTICK != InputDevice.SOURCE_JOYSTICK &&
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
event.source and InputDevice.SOURCE_MOUSE != InputDevice.SOURCE_MOUSE &&
!isPhysicalKeyboard
) {
return super.dispatchKeyEvent(event)
}