|
|
@ -427,7 +427,7 @@ float Input::Analog(){ |
|
|
|
|
|
|
|
|
|
|
|
std::string Input::GetDisplayName()const{ |
|
|
|
std::string Input::GetDisplayName()const{ |
|
|
|
if(type==STEAM){ |
|
|
|
if(type==STEAM){ |
|
|
|
return std::format("STEAM:{}",key); |
|
|
|
return std::format("{}",enumToActionName[activeSteamControllerIndex][Steam::SteamInput(key)].first); |
|
|
|
} |
|
|
|
} |
|
|
|
if(!GenericKey::keyLiteral.count({type,key}))return ""; |
|
|
|
if(!GenericKey::keyLiteral.count({type,key}))return ""; |
|
|
|
return GenericKey::keyLiteral.at({type,key}).displayName; |
|
|
|
return GenericKey::keyLiteral.at({type,key}).displayName; |
|
|
@ -1083,17 +1083,27 @@ const bool Input::AxesActive(){ |
|
|
|
void Input::StartVibration(const bool override){ |
|
|
|
void Input::StartVibration(const bool override){ |
|
|
|
if(!GameSettings::RumbleEnabled(override))return; |
|
|
|
if(!GameSettings::RumbleEnabled(override))return; |
|
|
|
if(UsingGamepad()){ |
|
|
|
if(UsingGamepad()){ |
|
|
|
for(GamePad*gamepad:GamePad::getGamepads()){ |
|
|
|
if(SteamInput()){ |
|
|
|
if(gamepad->stillConnected){ |
|
|
|
SteamInput()->TriggerVibration(steamControllers[activeSteamControllerIndex],std::numeric_limits<unsigned short>::max(),std::numeric_limits<unsigned short>::max()); |
|
|
|
gamepad->startVibration(); |
|
|
|
}else{ |
|
|
|
|
|
|
|
for(GamePad*gamepad:GamePad::getGamepads()){ |
|
|
|
|
|
|
|
if(gamepad->stillConnected){ |
|
|
|
|
|
|
|
gamepad->startVibration(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
void Input::StopVibration(){ |
|
|
|
void Input::StopVibration(){ |
|
|
|
for(GamePad*gamepad:GamePad::getGamepads()){ |
|
|
|
if(SteamInput()){ |
|
|
|
if(gamepad->stillConnected){ |
|
|
|
for(int i=0;i<controllerCount;i++){ |
|
|
|
gamepad->stopVibration(); |
|
|
|
SteamInput()->TriggerVibration(steamControllers[i],0U,0U); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
for(GamePad*gamepad:GamePad::getGamepads()){ |
|
|
|
|
|
|
|
if(gamepad->stillConnected){ |
|
|
|
|
|
|
|
gamepad->stopVibration(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|