Skip to content

Commit

Permalink
Fixed key down closing messagebox dialog instead of key up on Android.
Browse files Browse the repository at this point in the history
This fixed sending key up event to SDL a dialog closed by down did not consume.
  • Loading branch information
philippwiesemann committed Sep 14, 2014
1 parent df37d1d commit 0fbd904
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -771,8 +771,10 @@ public void onClick(View v) {
public boolean onKey(DialogInterface d, int keyCode, KeyEvent event) {
Button button = mapping.get(keyCode);
if (button != null) {
button.performClick();
return true;
if (event.getAction() == KeyEvent.ACTION_UP) {
button.performClick();
}
return true; // also for ignored actions
}
return false;
}
Expand Down

0 comments on commit 0fbd904

Please sign in to comment.