|
|
@ -763,11 +763,9 @@ void EmulatedController::StartMotionCalibration() {
|
|
|
|
void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, Common::UUID uuid) {
|
|
|
|
void EmulatedController::SetButton(const Common::Input::CallbackStatus& callback, std::size_t index, Common::UUID uuid) {
|
|
|
|
const auto player_index = Service::HID::NpadIdTypeToIndex(npad_id_type);
|
|
|
|
const auto player_index = Service::HID::NpadIdTypeToIndex(npad_id_type);
|
|
|
|
const auto& player = Settings::values.players.GetValue()[player_index];
|
|
|
|
const auto& player = Settings::values.players.GetValue()[player_index];
|
|
|
|
|
|
|
|
|
|
|
|
if (index >= controller.button_values.size()) {
|
|
|
|
if (index >= controller.button_values.size()) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::unique_lock lock{mutex};
|
|
|
|
std::unique_lock lock{mutex};
|
|
|
|
bool value_changed = false;
|
|
|
|
bool value_changed = false;
|
|
|
|
const auto new_status = TransformToButton(callback);
|
|
|
|
const auto new_status = TransformToButton(callback);
|
|
|
|