mirror of
https://github.com/etlegacy/etlegacy-android.git
synced 2024-11-10 06:52:06 +00:00
java: fix button not responding
This commit is contained in:
parent
07435ab070
commit
97bda7bfbe
1 changed files with 6 additions and 1 deletions
|
@ -265,7 +265,12 @@ public class ETLActivity extends SDLActivity implements JoyStickListener
|
|||
btn_crouch.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
SDLActivity.onNativeKeyDown(31);
|
||||
Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
SDLActivity.onNativeKeyDown(31);
|
||||
}
|
||||
}, 20);
|
||||
SDLActivity.onNativeKeyUp(31);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue