java: fix button not responding

This commit is contained in:
rafal1137 2020-04-14 17:51:55 +02:00
parent 07435ab070
commit 97bda7bfbe

View file

@ -265,7 +265,12 @@ public class ETLActivity extends SDLActivity implements JoyStickListener
btn_crouch.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
SDLActivity.onNativeKeyDown(31);
}
}, 20);
SDLActivity.onNativeKeyUp(31);
}
});