Qt/Input: use 1-n in the GUI instead of 1-(n-1)

I didn't look into evdev
This commit is contained in:
Megamouse 2018-12-22 12:49:56 +01:00
parent 91d834ce73
commit 6e323622a5
4 changed files with 6 additions and 6 deletions

View file

@ -262,7 +262,7 @@ std::shared_ptr<ds4_pad_handler::DS4Device> ds4_pad_handler::GetDevice(const std
std::string pad_serial = padId.substr(pos + 9);
std::shared_ptr<DS4Device> device = nullptr;
int i = 0;
int i = 1; // Controllers 1-n in GUI
for (auto& cur_control : controllers)
{
if (pad_serial == std::to_string(i++) || pad_serial == cur_control.first)
@ -770,7 +770,7 @@ std::vector<std::string> ds4_pad_handler::ListDevices()
if (!Init())
return ds4_pads_list;
for (size_t i = 0; i < controllers.size(); ++i)
for (size_t i = 1; i <= controllers.size(); ++i) // Controllers 1-n in GUI
{
ds4_pads_list.emplace_back(m_name_string + std::to_string(i));
}