Clang-format

This commit is contained in:
anirudhb
2020-05-02 15:31:53 -07:00
parent 79e5d0e96b
commit b777f00628
3 changed files with 28 additions and 28 deletions

View File

@@ -438,7 +438,8 @@ void Controller_NPad::OnUpdate(const Core::Timing::CoreTiming& core_timing, u8*
if (motion_sensors[i][0] && motion_sensors[i][1]) {
npad.left_dual.sixaxis[npad.left_dual.common.last_entry_index].accelerometer =
accel1;
npad.left_dual.sixaxis[npad.left_dual.common.last_entry_index].gyroscope = gyro1;
npad.left_dual.sixaxis[npad.left_dual.common.last_entry_index].gyroscope =
gyro1;
npad.right_dual.sixaxis[npad.right_dual.common.last_entry_index].accelerometer =
accel2;
npad.right_dual.sixaxis[npad.right_dual.common.last_entry_index].gyroscope =

View File

@@ -307,7 +307,8 @@ void Config::ReadPlayerValues() {
.toStdString();
player_motion.enabled =
qt_config
->value(QStringLiteral("player_%1_motion_device%2/enabled").arg(p).arg(i), false)
->value(QStringLiteral("player_%1_motion_device%2/enabled").arg(p).arg(i),
false)
.toBool();
if (player_motion.device.empty()) {
player_motion.device = default_param;

View File

@@ -315,25 +315,24 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
button->setContextMenuPolicy(Qt::CustomContextMenu);
connect(button, &QPushButton::clicked, [=] {
HandleClick(
button_map[button_id],
[=](Common::ParamPackage params) {
// Workaround for ZL & ZR for analog triggers like on XBOX controllors.
// Analog triggers (from controllers like the XBOX controller) would not
// work due to a different range of their signals (from 0 to 255 on
// analog triggers instead of -32768 to 32768 on analog joysticks). The
// SDL driver misinterprets analog triggers as analog joysticks.
// TODO: reinterpret the signal range for analog triggers to map the
// values correctly. This is required for the correct emulation of the
// analog triggers of the GameCube controller.
if (button_id == Settings::NativeButton::ZL ||
button_id == Settings::NativeButton::ZR) {
params.Set("direction", "+");
params.Set("threshold", "0.5");
}
buttons_param[button_id] = std::move(params);
},
InputCommon::Polling::DeviceType::Button);
HandleClick(button_map[button_id],
[=](Common::ParamPackage params) {
// Workaround for ZL & ZR for analog triggers like on XBOX controllors.
// Analog triggers (from controllers like the XBOX controller) would not
// work due to a different range of their signals (from 0 to 255 on
// analog triggers instead of -32768 to 32768 on analog joysticks). The
// SDL driver misinterprets analog triggers as analog joysticks.
// TODO: reinterpret the signal range for analog triggers to map the
// values correctly. This is required for the correct emulation of the
// analog triggers of the GameCube controller.
if (button_id == Settings::NativeButton::ZL ||
button_id == Settings::NativeButton::ZR) {
params.Set("direction", "+");
params.Set("threshold", "0.5");
}
buttons_param[button_id] = std::move(params);
},
InputCommon::Polling::DeviceType::Button);
});
connect(button, &QPushButton::customContextMenuRequested, [=](const QPoint& menu_location) {
QMenu context_menu;
@@ -359,13 +358,12 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
analog_button->setContextMenuPolicy(Qt::CustomContextMenu);
connect(analog_button, &QPushButton::clicked, [=]() {
HandleClick(
analog_map_buttons[analog_id][sub_button_id],
[=](const Common::ParamPackage& params) {
SetAnalogButton(params, analogs_param[analog_id],
analog_sub_buttons[sub_button_id]);
},
InputCommon::Polling::DeviceType::Button);
HandleClick(analog_map_buttons[analog_id][sub_button_id],
[=](const Common::ParamPackage& params) {
SetAnalogButton(params, analogs_param[analog_id],
analog_sub_buttons[sub_button_id]);
},
InputCommon::Polling::DeviceType::Button);
});
connect(analog_button, &QPushButton::customContextMenuRequested,
[=](const QPoint& menu_location) {