summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2021-01-13 22:37:37 -0500
committerGravatar Lioncash2021-01-13 22:37:40 -0500
commit45aee996c191afe377dffbe88612f5912b2e8cfb (patch)
tree30fe845a73cf24eec4a31d788839726d58924e2a /src
parentMerge pull request #5330 from german77/regexerror (diff)
downloadyuzu-45aee996c191afe377dffbe88612f5912b2e8cfb.tar.gz
yuzu-45aee996c191afe377dffbe88612f5912b2e8cfb.tar.xz
yuzu-45aee996c191afe377dffbe88612f5912b2e8cfb.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/configuration/configure_motion_touch.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/yuzu/configuration/configure_motion_touch.cpp b/src/yuzu/configuration/configure_motion_touch.cpp
index 9543f086d..68110c195 100644
--- a/src/yuzu/configuration/configure_motion_touch.cpp
+++ b/src/yuzu/configuration/configure_motion_touch.cpp
@@ -328,14 +328,13 @@ void ConfigureMotionTouch::ApplyConfiguration() {
328 std::string touch_engine = ui->touch_provider->currentData().toString().toStdString(); 328 std::string touch_engine = ui->touch_provider->currentData().toString().toStdString();
329 329
330 Common::ParamPackage touch_param{}; 330 Common::ParamPackage touch_param{};
331 touch_param.Set("engine", std::move(touch_engine));
332
333 if (touch_engine == "cemuhookudp") { 331 if (touch_engine == "cemuhookudp") {
334 touch_param.Set("min_x", min_x); 332 touch_param.Set("min_x", min_x);
335 touch_param.Set("min_y", min_y); 333 touch_param.Set("min_y", min_y);
336 touch_param.Set("max_x", max_x); 334 touch_param.Set("max_x", max_x);
337 touch_param.Set("max_y", max_y); 335 touch_param.Set("max_y", max_y);
338 } 336 }
337 touch_param.Set("engine", std::move(touch_engine));
339 338
340 Settings::values.touch_device = touch_param.Serialize(); 339 Settings::values.touch_device = touch_param.Serialize();
341 Settings::values.use_touch_from_button = ui->touch_from_button_checkbox->isChecked(); 340 Settings::values.use_touch_from_button = ui->touch_from_button_checkbox->isChecked();