-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request xbmc#24604 from garbear/android-joysticks
Android joystick fixes
- Loading branch information
Showing
27 changed files
with
946 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
set(SOURCES Controller.cpp | ||
ControllerLayout.cpp | ||
ControllerManager.cpp | ||
ControllerTranslator.cpp) | ||
ControllerTranslator.cpp | ||
DefaultController.cpp | ||
) | ||
|
||
set(HEADERS Controller.h | ||
ControllerDefinitions.h | ||
ControllerIDs.h | ||
ControllerLayout.h | ||
ControllerManager.h | ||
ControllerTranslator.h | ||
ControllerTypes.h) | ||
ControllerTypes.h | ||
DefaultController.h | ||
) | ||
|
||
core_add_library(games_controller) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright (C) 2024 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 "DefaultController.h" | ||
|
||
using namespace KODI; | ||
using namespace GAME; | ||
|
||
const char* CDefaultController::FEATURE_A = "a"; | ||
const char* CDefaultController::FEATURE_B = "b"; | ||
const char* CDefaultController::FEATURE_X = "x"; | ||
const char* CDefaultController::FEATURE_Y = "y"; | ||
const char* CDefaultController::FEATURE_START = "start"; | ||
const char* CDefaultController::FEATURE_BACK = "back"; | ||
const char* CDefaultController::FEATURE_GUIDE = "guide"; | ||
const char* CDefaultController::FEATURE_UP = "up"; | ||
const char* CDefaultController::FEATURE_RIGHT = "right"; | ||
const char* CDefaultController::FEATURE_DOWN = "down"; | ||
const char* CDefaultController::FEATURE_LEFT = "left"; | ||
const char* CDefaultController::FEATURE_LEFT_THUMB = "leftthumb"; | ||
const char* CDefaultController::FEATURE_RIGHT_THUMB = "rightthumb"; | ||
const char* CDefaultController::FEATURE_LEFT_BUMPER = "leftbumper"; | ||
const char* CDefaultController::FEATURE_RIGHT_BUMPER = "rightbumper"; | ||
const char* CDefaultController::FEATURE_LEFT_TRIGGER = "lefttrigger"; | ||
const char* CDefaultController::FEATURE_RIGHT_TRIGGER = "righttrigger"; | ||
const char* CDefaultController::FEATURE_LEFT_STICK = "leftstick"; | ||
const char* CDefaultController::FEATURE_RIGHT_STICK = "rightstick"; | ||
const char* CDefaultController::FEATURE_LEFT_MOTOR = "leftmotor"; | ||
const char* CDefaultController::FEATURE_RIGHT_MOTOR = "rightmotor"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (C) 2024 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. | ||
*/ | ||
|
||
#pragma once | ||
|
||
namespace KODI | ||
{ | ||
namespace GAME | ||
{ | ||
class CDefaultController | ||
{ | ||
public: | ||
// Face buttons | ||
static const char* FEATURE_A; | ||
static const char* FEATURE_B; | ||
static const char* FEATURE_X; | ||
static const char* FEATURE_Y; | ||
static const char* FEATURE_START; | ||
static const char* FEATURE_BACK; | ||
static const char* FEATURE_GUIDE; | ||
static const char* FEATURE_UP; | ||
static const char* FEATURE_RIGHT; | ||
static const char* FEATURE_DOWN; | ||
static const char* FEATURE_LEFT; | ||
static const char* FEATURE_LEFT_THUMB; | ||
static const char* FEATURE_RIGHT_THUMB; | ||
|
||
// Shoulder buttons | ||
static const char* FEATURE_LEFT_BUMPER; | ||
static const char* FEATURE_RIGHT_BUMPER; | ||
|
||
// Triggers | ||
static const char* FEATURE_LEFT_TRIGGER; | ||
static const char* FEATURE_RIGHT_TRIGGER; | ||
|
||
// Analog sticks | ||
static const char* FEATURE_LEFT_STICK; | ||
static const char* FEATURE_RIGHT_STICK; | ||
|
||
// Haptics | ||
static const char* FEATURE_LEFT_MOTOR; | ||
static const char* FEATURE_RIGHT_MOTOR; | ||
}; | ||
} // namespace GAME | ||
} // namespace KODI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -457,5 +457,5 @@ const char* CKeyboardTranslator::TranslateKeycode(XBMCKey keycode) | |
break; | ||
} | ||
|
||
return ""; | ||
return "unknown"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.