mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2026-04-22 15:57:15 +08:00
inpututil: bug fix: {Key,MousePress}KeyDuration returned a wrong value on browsers and mobiles
Closes #3322
This commit is contained in:
@@ -134,6 +134,10 @@ public class EbitenView extends ViewGroup implements InputManager.InputDeviceLis
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
// Ignore key repeat events.
|
||||
if (event.getRepeatCount() > 0) {
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
Ebitenmobileview.onKeyDownOnAndroid(keyCode, event.getUnicodeChar(), event.getSource(), event.getDeviceId());
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user