mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 23:59:27 +01:00
Fix a crash on Android when unplugging a controller during emulation.
If the action we are getting is a ACTION_CANCEL, it means that the "gesture" is aborted and we shouldn't perform any more actions on it.
This commit is contained in:
parent
742f9c6b14
commit
ceb08acf23
@ -313,6 +313,10 @@ public final class EmulationActivity extends Activity
|
||||
return super.dispatchGenericMotionEvent(event);
|
||||
}
|
||||
|
||||
// Don't attempt to do anything if we are disconnecting a device.
|
||||
if (event.getActionMasked() == MotionEvent.ACTION_CANCEL)
|
||||
return true;
|
||||
|
||||
InputDevice input = event.getDevice();
|
||||
List<InputDevice.MotionRange> motions = input.getMotionRanges();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user