| 1 |
/* |
| 2 |
* Copyright (C) 2017-2021 Team Kodi (https://kodi.tv) |
| 3 |
* |
| 4 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 5 |
* See LICENSE.md for more information. |
| 6 |
*/ |
| 7 |
|
| 8 |
#include "InputTranslator.h" |
| 9 |
#include "InputDefinitions.h" |
| 10 |
|
| 11 |
using namespace LIBRETRO; |
| 12 |
|
| 13 |
GAME_PORT_TYPE CInputTranslator::GetPortType(const std::string &portType) |
| 14 |
{ |
| 15 |
if (portType == PORT_TYPE_KEYBOARD) return GAME_PORT_KEYBOARD; |
| 16 |
if (portType == PORT_TYPE_MOUSE) return GAME_PORT_MOUSE; |
| 17 |
if (portType == PORT_TYPE_CONTROLLER) return GAME_PORT_CONTROLLER; |
| 18 |
|
| 19 |
return GAME_PORT_UNKNOWN; |
| 20 |
} |