mirror of
https://github.com/OpenMW/openmw.git
synced 2025-12-08 23:04:30 +00:00
Remove SDL_VERSION_ATLEAST references
This commit is contained in:
parent
3600a5c716
commit
622cbd5288
1 changed files with 8 additions and 22 deletions
|
|
@ -467,29 +467,20 @@ namespace MWInput
|
||||||
|
|
||||||
int ControllerManager::getControllerType()
|
int ControllerManager::getControllerType()
|
||||||
{
|
{
|
||||||
int type = 0;
|
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 12)
|
|
||||||
SDL_GameController* cntrl = mBindingsManager->getControllerOrNull();
|
SDL_GameController* cntrl = mBindingsManager->getControllerOrNull();
|
||||||
if (cntrl)
|
if (cntrl)
|
||||||
type = SDL_GameControllerGetType(cntrl);
|
return SDL_GameControllerGetType(cntrl);
|
||||||
#endif
|
return 0;
|
||||||
return type;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string ControllerManager::getControllerButtonIcon(int button)
|
std::string ControllerManager::getControllerButtonIcon(int button)
|
||||||
{
|
{
|
||||||
int controllerType = ControllerManager::getControllerType();
|
int controllerType = ControllerManager::getControllerType();
|
||||||
|
|
||||||
bool isXbox = false;
|
bool isXbox = controllerType == SDL_CONTROLLER_TYPE_XBOX360 || controllerType == SDL_CONTROLLER_TYPE_XBOXONE;
|
||||||
bool isPsx = false;
|
bool isPsx = controllerType == SDL_CONTROLLER_TYPE_PS3 || controllerType == SDL_CONTROLLER_TYPE_PS4
|
||||||
bool isSwitch = false;
|
|| controllerType == SDL_CONTROLLER_TYPE_PS5;;
|
||||||
|
bool isSwitch = controllerType == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO;
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 12)
|
|
||||||
isXbox = controllerType == SDL_CONTROLLER_TYPE_XBOX360 || controllerType == SDL_CONTROLLER_TYPE_XBOXONE;
|
|
||||||
isPsx = controllerType == SDL_CONTROLLER_TYPE_PS3 || controllerType == SDL_CONTROLLER_TYPE_PS4
|
|
||||||
|| controllerType == SDL_CONTROLLER_TYPE_PS5;
|
|
||||||
isSwitch = controllerType == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (button)
|
switch (button)
|
||||||
{
|
{
|
||||||
|
|
@ -546,13 +537,8 @@ namespace MWInput
|
||||||
{
|
{
|
||||||
int controllerType = ControllerManager::getControllerType();
|
int controllerType = ControllerManager::getControllerType();
|
||||||
|
|
||||||
bool isXbox = false;
|
bool isXbox = controllerType == SDL_CONTROLLER_TYPE_XBOX360 || controllerType == SDL_CONTROLLER_TYPE_XBOXONE;
|
||||||
bool isSwitch = false;
|
bool isSwitch = controllerType == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO;
|
||||||
|
|
||||||
#if SDL_VERSION_ATLEAST(2, 0, 12)
|
|
||||||
isXbox = controllerType == SDL_CONTROLLER_TYPE_XBOX360 || controllerType == SDL_CONTROLLER_TYPE_XBOXONE;
|
|
||||||
isSwitch = controllerType == SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (axis)
|
switch (axis)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue