diff options
author | dhewg | 2011-02-26 11:18:12 +0100 |
---|---|---|
committer | dhewg | 2011-02-26 11:20:23 +0100 |
commit | 3fb85835a10eb75c7a5b2f40504004abd94c73c3 (patch) | |
tree | 34a6866bd56c48c78deb10338eb138faccd6198c /backends/platform/android/org/inodes/gus/scummvm | |
parent | f78f2dff496598c9263d6155d485748073baedae (diff) | |
download | scummvm-rg350-3fb85835a10eb75c7a5b2f40504004abd94c73c3.tar.gz scummvm-rg350-3fb85835a10eb75c7a5b2f40504004abd94c73c3.tar.bz2 scummvm-rg350-3fb85835a10eb75c7a5b2f40504004abd94c73c3.zip |
ANDROID: Allow softkeybd on all devices
Diffstat (limited to 'backends/platform/android/org/inodes/gus/scummvm')
-rw-r--r-- | backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java b/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java index 09d39d25ea..8929809999 100644 --- a/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java +++ b/backends/platform/android/org/inodes/gus/scummvm/ScummVMActivity.java @@ -97,14 +97,11 @@ public class ScummVMActivity extends Activity { @Override protected void showVirtualKeyboard(final boolean enable) { - if (getResources().getConfiguration().keyboard == - Configuration.KEYBOARD_NOKEYS) { - runOnUiThread(new Runnable() { - public void run() { - showKeyboard(enable); - } - }); - } + runOnUiThread(new Runnable() { + public void run() { + showKeyboard(enable); + } + }); } } private MyScummVM scummvm; @@ -271,18 +268,16 @@ public class ScummVMActivity extends Activity { if (kevent.getRepeatCount() > 0) // Ignore keyrepeat for menu return false; - boolean timeout_fired = false; - if (getResources().getConfiguration().keyboard == - Configuration.KEYBOARD_NOKEYS) { - timeout_fired = !keycodeMenuTimeoutHandler.hasMessages(MSG_MENU_LONG_PRESS); - keycodeMenuTimeoutHandler.removeMessages(MSG_MENU_LONG_PRESS); - if (kevent.getAction() == KeyEvent.ACTION_DOWN) { - keycodeMenuTimeoutHandler.sendMessageDelayed( - keycodeMenuTimeoutHandler.obtainMessage(MSG_MENU_LONG_PRESS), - ViewConfiguration.getLongPressTimeout()); - return true; - } + + boolean timeout_fired = !keycodeMenuTimeoutHandler.hasMessages(MSG_MENU_LONG_PRESS); + keycodeMenuTimeoutHandler.removeMessages(MSG_MENU_LONG_PRESS); + + if (kevent.getAction() == KeyEvent.ACTION_DOWN) { + keycodeMenuTimeoutHandler.sendMessageDelayed(keycodeMenuTimeoutHandler.obtainMessage(MSG_MENU_LONG_PRESS), + ViewConfiguration.getLongPressTimeout()); + return true; } + if (kevent.getAction() == KeyEvent.ACTION_UP) { if (!timeout_fired) scummvm.pushEvent(new Event(Event.EVENT_MAINMENU)); |