android: virtual gamepad asn't responsive
This commit is contained in:
parent
3320669bd4
commit
fca65dd2f9
|
@ -499,6 +499,8 @@ public class GL2JNIView extends GLSurfaceView
|
||||||
int joyx = get_anal(11, 0);
|
int joyx = get_anal(11, 0);
|
||||||
int joyy = get_anal(11, 1);
|
int joyy = get_anal(11, 1);
|
||||||
InputDeviceManager.getInstance().virtualGamepadEvent(rv, joyx, joyy, left_trigger, right_trigger);
|
InputDeviceManager.getInstance().virtualGamepadEvent(rv, joyx, joyy, left_trigger, right_trigger);
|
||||||
|
// Only register the mouse event if no virtual gamepad button is down
|
||||||
|
if (rv == 0xFFFF)
|
||||||
InputDeviceManager.getInstance().mouseEvent(mouse_pos[0], mouse_pos[1], mouse_btns);
|
InputDeviceManager.getInstance().mouseEvent(mouse_pos[0], mouse_pos[1], mouse_btns);
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ public:
|
||||||
previous_kcode = kcode;
|
previous_kcode = kcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const int VIRTUAL_GAMEPAD_ID = 123456;
|
static const int VIRTUAL_GAMEPAD_ID = 0x12345678; // must match the Java definition
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void load_axis_min_max(u32 axis) override
|
virtual void load_axis_min_max(u32 axis) override
|
||||||
|
|
Loading…
Reference in New Issue