mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 16:31:28 +12:00
evdev: revert facepalm change
This commit is contained in:
parent
7df8258551
commit
2de6a9bc44
1 changed files with 7 additions and 4 deletions
|
@ -912,12 +912,15 @@ bool evdev_joystick_handler::bindPadToDevice(std::shared_ptr<Pad> pad, const std
|
||||||
return static_cast<u32>(key);
|
return static_cast<u32>(key);
|
||||||
};
|
};
|
||||||
|
|
||||||
auto evdevbutton = [&, idx = i](const cfg::string& name)
|
auto evdevbutton = [&](const cfg::string& name)
|
||||||
{
|
{
|
||||||
|
// This function calls find_key, which also determines last_type and axis_orientations[i].
|
||||||
|
// i is incremented at the end of find_key, so we need to back it up.
|
||||||
|
const int current_index = i;
|
||||||
EvdevButton button;
|
EvdevButton button;
|
||||||
button.code = find_key(name);
|
button.code = find_key(name);
|
||||||
button.type = last_type;
|
button.type = last_type;
|
||||||
button.dir = axis_orientations[idx];
|
button.dir = axis_orientations[current_index];
|
||||||
return button;
|
return button;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue