Make "available" a valid parameter to query with tdControllerValue
This commit is contained in:
parent
5e49cfffe4
commit
8170629f48
2 changed files with 3 additions and 1 deletions
|
@ -727,7 +727,7 @@ int WINAPI tdController(int *controllerId, int *controllerType, char *name, int
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function gets a parameter on a controller.
|
* This function gets a parameter on a controller.
|
||||||
* Valid parameters are: \c serial, \c name and \c firmware
|
* Valid parameters are: \c serial, \c name, \c available and \c firmware
|
||||||
*
|
*
|
||||||
* Added in version 2.1.2.
|
* Added in version 2.1.2.
|
||||||
* @param controllerId The controller to change
|
* @param controllerId The controller to change
|
||||||
|
|
|
@ -279,6 +279,8 @@ std::wstring ControllerManager::getControllerValue(int id, const std::wstring &n
|
||||||
return it->second.serial;
|
return it->second.serial;
|
||||||
} else if (name == L"name") {
|
} else if (name == L"name") {
|
||||||
return it->second.name;
|
return it->second.name;
|
||||||
|
} else if (name == L"available") {
|
||||||
|
return it->second.controller ? L"1" : L"0";
|
||||||
} else if (name == L"firmware") {
|
} else if (name == L"firmware") {
|
||||||
if (!it->second.controller) {
|
if (!it->second.controller) {
|
||||||
return L"-1";
|
return L"-1";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue