mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
configure_motion_touch: Prevent use after move in ApplyConfiguration()
touch_engine was being compared against after being moved into the setter for the engine, so this comparison wouldn't behave properly.
This commit is contained in:
parent
5e35c69f35
commit
45aee996c1
1 changed files with 1 additions and 2 deletions
|
@ -328,14 +328,13 @@ void ConfigureMotionTouch::ApplyConfiguration() {
|
||||||
std::string touch_engine = ui->touch_provider->currentData().toString().toStdString();
|
std::string touch_engine = ui->touch_provider->currentData().toString().toStdString();
|
||||||
|
|
||||||
Common::ParamPackage touch_param{};
|
Common::ParamPackage touch_param{};
|
||||||
touch_param.Set("engine", std::move(touch_engine));
|
|
||||||
|
|
||||||
if (touch_engine == "cemuhookudp") {
|
if (touch_engine == "cemuhookudp") {
|
||||||
touch_param.Set("min_x", min_x);
|
touch_param.Set("min_x", min_x);
|
||||||
touch_param.Set("min_y", min_y);
|
touch_param.Set("min_y", min_y);
|
||||||
touch_param.Set("max_x", max_x);
|
touch_param.Set("max_x", max_x);
|
||||||
touch_param.Set("max_y", max_y);
|
touch_param.Set("max_y", max_y);
|
||||||
}
|
}
|
||||||
|
touch_param.Set("engine", std::move(touch_engine));
|
||||||
|
|
||||||
Settings::values.touch_device = touch_param.Serialize();
|
Settings::values.touch_device = touch_param.Serialize();
|
||||||
Settings::values.use_touch_from_button = ui->touch_from_button_checkbox->isChecked();
|
Settings::values.use_touch_from_button = ui->touch_from_button_checkbox->isChecked();
|
||||||
|
|
Loading…
Reference in a new issue