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