[Windows] Remove redundant DirectSound error codes
[xbmc.git] / xbmc / platform / android / activity / AndroidJoyStick.cpp
blob192e18b8b5d2ccd65f4536fbefc19237558177d8
1 /*
2 * Copyright (C) 2012-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #include "AndroidJoyStick.h"
11 #include "platform/android/activity/XBMCApp.h"
13 #include <android/input.h>
15 bool CAndroidJoyStick::onJoyStickEvent(AInputEvent* event)
17 int32_t source = AInputEvent_getSource(event);
19 // only handle input events from a gamepad or joystick
20 if ((source & (AINPUT_SOURCE_GAMEPAD | AINPUT_SOURCE_JOYSTICK)) != 0)
21 return CXBMCApp::Get().onInputDeviceEvent(event);
23 CXBMCApp::android_printf("CAndroidJoyStick::onJoyStickEvent(type = %d, keycode = %d, source = %d): ignoring non-joystick input event",
24 AInputEvent_getType(event), AKeyEvent_getKeyCode(event), source);
25 return false;