| 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 |
#pragma once |
| 9 |
|
| 10 |
#include <string> |
| 11 |
|
| 12 |
#define DEFAULT_CONTROLLER_ID "game.controller.default" |
| 13 |
|
| 14 |
namespace LIBRETRO |
| 15 |
{ |
| 16 |
class CDefaultControllerTranslator |
| 17 |
{ |
| 18 |
public: |
| 19 |
/*! |
| 20 |
* \brief Translate from Kodi feature name to libretro index |
| 21 |
*/ |
| 22 |
static int GetLibretroIndex(const std::string &strFeatureName); |
| 23 |
|
| 24 |
/*! |
| 25 |
* \brief Translate from libretro feature (from libretro.h) to Kodi feature |
| 26 |
* |
| 27 |
* This is necessary because input doesn't just flow from Kodi to the |
| 28 |
* add-on. Rumble feedback going from the add-on to Kodi makes use of this |
| 29 |
* functionality. |
| 30 |
*/ |
| 31 |
static std::string GetControllerFeature(const std::string &strLibretroFeature); |
| 32 |
}; |
| 33 |
} |