Add an extra check to prevent 2.3 controller handling error
This commit is contained in:
parent
4175e3e813
commit
17f4a77e92
|
@ -437,6 +437,7 @@ public class GL2JNIActivity extends Activity {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
boolean handle_key(Integer playerNum, int kc, boolean down) {
|
boolean handle_key(Integer playerNum, int kc, boolean down) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
|
||||||
if (playerNum == null)
|
if (playerNum == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -460,6 +461,9 @@ public class GL2JNIActivity extends Activity {
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||||
|
|
Loading…
Reference in New Issue