input: add pressure intensity toggle mode

This commit is contained in:
Megamouse 2023-06-05 21:56:01 +02:00
parent 6f834e99d2
commit 8f66c50721
10 changed files with 59 additions and 17 deletions

View file

@ -655,13 +655,13 @@ void PadHandlerBase::get_mapping(const pad_ensemble& binding)
if (!device || !pad)
return;
auto cfg = device->config;
const auto cfg = device->config;
auto button_values = get_button_values(device);
// Find out if special buttons are pressed (introduced by RPCS3).
// These buttons will have a delay of one cycle, but whatever.
const bool adjust_pressure = pad->m_pressure_intensity_button_index >= 0 && pad->m_buttons[pad->m_pressure_intensity_button_index].m_pressed;
const bool adjust_pressure = pad->get_pressure_intensity_enabled(cfg->pressure_intensity_toggle_mode.get());
// Translate any corresponding keycodes to our normal DS3 buttons and triggers
for (auto& btn : pad->m_buttons)