remove unnecessary equality checks
This commit is contained in:
parent
b07918295b
commit
a49f79b9d2
|
|
@ -1187,8 +1187,8 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
|
||||||
|
|
||||||
if (type == AINPUT_EVENT_TYPE_MOTION)
|
if (type == AINPUT_EVENT_TYPE_MOTION)
|
||||||
{
|
{
|
||||||
if ((FLAG_IS_SET(source, AINPUT_SOURCE_JOYSTICK) == AINPUT_SOURCE_JOYSTICK) ||
|
if (FLAG_IS_SET(source, AINPUT_SOURCE_JOYSTICK) ||
|
||||||
(FLAG_IS_SET(source, AINPUT_SOURCE_GAMEPAD) == AINPUT_SOURCE_GAMEPAD))
|
FLAG_IS_SET(source, AINPUT_SOURCE_GAMEPAD))
|
||||||
{
|
{
|
||||||
// For now we'll assume a single gamepad which we "detect" on its input event
|
// For now we'll assume a single gamepad which we "detect" on its input event
|
||||||
CORE.Input.Gamepad.ready[0] = true;
|
CORE.Input.Gamepad.ready[0] = true;
|
||||||
|
|
@ -1251,8 +1251,8 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
|
||||||
//int32_t AKeyEvent_getMetaState(event);
|
//int32_t AKeyEvent_getMetaState(event);
|
||||||
|
|
||||||
// Handle gamepad button presses and releases
|
// Handle gamepad button presses and releases
|
||||||
if ((FLAG_IS_SET(source, AINPUT_SOURCE_JOYSTICK) == AINPUT_SOURCE_JOYSTICK) ||
|
if (FLAG_IS_SET(source, AINPUT_SOURCE_JOYSTICK) ||
|
||||||
(FLAG_IS_SET(source, AINPUT_SOURCE_GAMEPAD) == AINPUT_SOURCE_GAMEPAD))
|
FLAG_IS_SET(source, AINPUT_SOURCE_GAMEPAD))
|
||||||
{
|
{
|
||||||
// For now we'll assume a single gamepad which we "detect" on its input event
|
// For now we'll assume a single gamepad which we "detect" on its input event
|
||||||
CORE.Input.Gamepad.ready[0] = true;
|
CORE.Input.Gamepad.ready[0] = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user