blob: ab941c54d411ddc73257c5f7f657d1c6a93b3f4f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/*
* Copyright (C) 2017-2018 Team Kodi
* This file is part of Kodi - https://kodi.tv
*
* SPDX-License-Identifier: GPL-2.0-or-later
* See LICENSES/README.md for more information.
*/
#include "GUIFeatureTranslator.h"
using namespace KODI;
using namespace GAME;
BUTTON_TYPE CGUIFeatureTranslator::GetButtonType(JOYSTICK::FEATURE_TYPE featureType)
{
switch (featureType)
{
case JOYSTICK::FEATURE_TYPE::SCALAR:
case JOYSTICK::FEATURE_TYPE::KEY:
return BUTTON_TYPE::BUTTON;
case JOYSTICK::FEATURE_TYPE::ANALOG_STICK:
return BUTTON_TYPE::ANALOG_STICK;
case JOYSTICK::FEATURE_TYPE::RELPOINTER:
return BUTTON_TYPE::RELATIVE_POINTER;
case JOYSTICK::FEATURE_TYPE::WHEEL:
return BUTTON_TYPE::WHEEL;
case JOYSTICK::FEATURE_TYPE::THROTTLE:
return BUTTON_TYPE::THROTTLE;
default:
break;
}
return BUTTON_TYPE::UNKNOWN;
}
|