Debian Codegraph @

xbmc/games/controllers/input/InputSink.cpp

raw
1 /*
2 * Copyright (C) 2017-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
8
9 #include "InputSink.h"
10
11 #include "games/controllers/ControllerIDs.h"
12
13 using namespace KODI;
14 using namespace GAME;
15
16 CInputSink::CInputSink(JOYSTICK::IInputHandler* gameInput) : m_gameInput(gameInput)
17 {
18 }
19
20 std::string CInputSink::ControllerID(void) const
21 {
22 return DEFAULT_CONTROLLER_ID;
23 }
24
25 bool CInputSink::AcceptsInput(const std::string& feature) const
26 {
27 return m_gameInput->AcceptsInput(feature);
28 }
29
30 bool CInputSink::OnButtonPress(const std::string& feature, bool bPressed)
31 {
32 return true;
33 }
34
35 bool CInputSink::OnButtonMotion(const std::string& feature,
36 float magnitude,
37 unsigned int motionTimeMs)
38 {
39 return true;
40 }
41
42 bool CInputSink::OnAnalogStickMotion(const std::string& feature,
43 float x,
44 float y,
45 unsigned int motionTimeMs)
46 {
47 return true;
48 }
49
50 bool CInputSink::OnAccelerometerMotion(const std::string& feature, float x, float y, float z)
51 {
52 return true;
53 }
54
55 bool CInputSink::OnWheelMotion(const std::string& feature,
56 float position,
57 unsigned int motionTimeMs)
58 {
59 return true;
60 }
61
62 bool CInputSink::OnThrottleMotion(const std::string& feature,
63 float position,
64 unsigned int motionTimeMs)
65 {
66 return true;
67 }