mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
Merge pull request #1323 from Sonicadvance1/Android-crash
Fix a crash on Android when unplugging a controller during emulation.
This commit is contained in:
@ -313,6 +313,10 @@ public final class EmulationActivity extends Activity
|
|||||||
return super.dispatchGenericMotionEvent(event);
|
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();
|
InputDevice input = event.getDevice();
|
||||||
List<InputDevice.MotionRange> motions = input.getMotionRanges();
|
List<InputDevice.MotionRange> motions = input.getMotionRanges();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user