mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-23 19:25:35 +08:00
Fixed game that uses the digital handle function to get analog handles.
This commit is contained in:
parent
1a411405e6
commit
120aa968b2
@ -563,7 +563,11 @@ ControllerDigitalActionHandle_t GetDigitalActionHandle( const char *pszActionNam
|
|||||||
std::transform(upper_action_name.begin(), upper_action_name.end(), upper_action_name.begin(),[](unsigned char c){ return std::toupper(c); });
|
std::transform(upper_action_name.begin(), upper_action_name.end(), upper_action_name.begin(),[](unsigned char c){ return std::toupper(c); });
|
||||||
|
|
||||||
auto handle = digital_action_handles.find(upper_action_name);
|
auto handle = digital_action_handles.find(upper_action_name);
|
||||||
if (handle == digital_action_handles.end()) return 0;
|
if (handle == digital_action_handles.end()) {
|
||||||
|
//apparently GetDigitalActionHandle also works with analog handles
|
||||||
|
handle = analog_action_handles.find(upper_action_name);
|
||||||
|
if (handle == analog_action_handles.end()) return 0;
|
||||||
|
}
|
||||||
|
|
||||||
PRINT_DEBUG("Steam_Controller::GetDigitalActionHandle %s ret %llu\n", pszActionName, handle->second);
|
PRINT_DEBUG("Steam_Controller::GetDigitalActionHandle %s ret %llu\n", pszActionName, handle->second);
|
||||||
return handle->second;
|
return handle->second;
|
||||||
|
Loading…
Reference in New Issue
Block a user