mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
Qt/Input: use 1-n in the GUI instead of 1-(n-1)
I didn't look into evdev
This commit is contained in:
parent
91d834ce73
commit
6e323622a5
4 changed files with 6 additions and 6 deletions
|
|
@ -197,7 +197,7 @@ int xinput_pad_handler::GetDeviceNumber(const std::string& padId)
|
|||
if (pos == std::string::npos)
|
||||
return -1;
|
||||
|
||||
int device_number = std::stoul(padId.substr(pos + 12));
|
||||
int device_number = std::stoul(padId.substr(pos + 12)) - 1; // Controllers 1-n in GUI
|
||||
if (device_number >= XUSER_MAX_COUNT)
|
||||
return -1;
|
||||
|
||||
|
|
@ -455,7 +455,7 @@ std::vector<std::string> xinput_pad_handler::ListDevices()
|
|||
XINPUT_STATE state;
|
||||
DWORD result = (*xinputGetState)(i, &state);
|
||||
if (result == ERROR_SUCCESS)
|
||||
xinput_pads_list.push_back(m_name_string + std::to_string(i));
|
||||
xinput_pads_list.push_back(m_name_string + std::to_string(i + 1)); // Controllers 1-n in GUI
|
||||
}
|
||||
return xinput_pads_list;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue