mirror of https://github.com/encounter/SDL.git
Fixed key down closing messagebox dialog instead of key up on Android.
This fixed sending key up event to SDL a dialog closed by down did not consume.
This commit is contained in:
parent
df37d1d550
commit
0fbd904af8
|
@ -771,8 +771,10 @@ public class SDLActivity extends Activity {
|
||||||
public boolean onKey(DialogInterface d, int keyCode, KeyEvent event) {
|
public boolean onKey(DialogInterface d, int keyCode, KeyEvent event) {
|
||||||
Button button = mapping.get(keyCode);
|
Button button = mapping.get(keyCode);
|
||||||
if (button != null) {
|
if (button != null) {
|
||||||
button.performClick();
|
if (event.getAction() == KeyEvent.ACTION_UP) {
|
||||||
return true;
|
button.performClick();
|
||||||
|
}
|
||||||
|
return true; // also for ignored actions
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue