diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/hid/controllers/touchscreen.cpp | 16 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/touchscreen.h | 15 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 9 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_motion_touch.cpp | 43 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_motion_touch.ui | 16 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_touchscreen_advanced.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_touchscreen_advanced.ui | 29 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 4 |
8 files changed, 36 insertions, 99 deletions
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp index de8315ce4..13f75b48a 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.cpp +++ b/src/core/hle/service/hid/controllers/touchscreen.cpp | |||
| @@ -40,11 +40,12 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin | |||
| 40 | cur_entry.sampling_number = last_entry.sampling_number + 1; | 40 | cur_entry.sampling_number = last_entry.sampling_number + 1; |
| 41 | cur_entry.sampling_number2 = cur_entry.sampling_number; | 41 | cur_entry.sampling_number2 = cur_entry.sampling_number; |
| 42 | 42 | ||
| 43 | updateTouchInputEvent(touch_device->GetStatus(), mouse_finger_id); | 43 | updateTouchInputEvent(touch_mouse_device->GetStatus(), mouse_finger_id); |
| 44 | updateTouchInputEvent(touch_btn_device->GetStatus(), keyboar_finger_id); | 44 | updateTouchInputEvent(touch_btn_device->GetStatus(), keyboard_finger_id); |
| 45 | updateTouchInputEvent(touch_udp_device->GetStatus(), udp_finger_id); | ||
| 45 | 46 | ||
| 46 | std::array<Finger, 16> sorted_fingers; | 47 | std::array<Finger, 16> sorted_fingers; |
| 47 | s32_le active_fingers = 0; | 48 | size_t active_fingers = 0; |
| 48 | for (Finger finger : fingers) { | 49 | for (Finger finger : fingers) { |
| 49 | if (finger.pressed) { | 50 | if (finger.pressed) { |
| 50 | sorted_fingers[active_fingers++] = finger; | 51 | sorted_fingers[active_fingers++] = finger; |
| @@ -52,7 +53,7 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin | |||
| 52 | } | 53 | } |
| 53 | 54 | ||
| 54 | const u64 tick = core_timing.GetCPUTicks(); | 55 | const u64 tick = core_timing.GetCPUTicks(); |
| 55 | cur_entry.entry_count = active_fingers; | 56 | cur_entry.entry_count = static_cast<s32_le>(active_fingers); |
| 56 | for (size_t id = 0; id < MAX_FINGERS; id++) { | 57 | for (size_t id = 0; id < MAX_FINGERS; id++) { |
| 57 | auto& touch_entry = cur_entry.states[id]; | 58 | auto& touch_entry = cur_entry.states[id]; |
| 58 | if (id < active_fingers) { | 59 | if (id < active_fingers) { |
| @@ -81,7 +82,8 @@ void Controller_Touchscreen::OnUpdate(const Core::Timing::CoreTiming& core_timin | |||
| 81 | } | 82 | } |
| 82 | 83 | ||
| 83 | void Controller_Touchscreen::OnLoadInputDevices() { | 84 | void Controller_Touchscreen::OnLoadInputDevices() { |
| 84 | touch_device = Input::CreateDevice<Input::TouchDevice>(Settings::values.touchscreen.device); | 85 | touch_mouse_device = Input::CreateDevice<Input::TouchDevice>("engine:emu_window"); |
| 86 | touch_udp_device = Input::CreateDevice<Input::TouchDevice>("engine:cemuhookudp"); | ||
| 85 | if (Settings::values.use_touch_from_button) { | 87 | if (Settings::values.use_touch_from_button) { |
| 86 | touch_btn_device = Input::CreateDevice<Input::TouchDevice>("engine:touch_from_button"); | 88 | touch_btn_device = Input::CreateDevice<Input::TouchDevice>("engine:touch_from_button"); |
| 87 | } else { | 89 | } else { |
| @@ -90,7 +92,7 @@ void Controller_Touchscreen::OnLoadInputDevices() { | |||
| 90 | } | 92 | } |
| 91 | 93 | ||
| 92 | void Controller_Touchscreen::updateTouchInputEvent( | 94 | void Controller_Touchscreen::updateTouchInputEvent( |
| 93 | const std::tuple<float, float, bool>& touch_input, int& finger_id) { | 95 | const std::tuple<float, float, bool>& touch_input, size_t& finger_id) { |
| 94 | bool pressed = false; | 96 | bool pressed = false; |
| 95 | float x, y; | 97 | float x, y; |
| 96 | std::tie(x, y, pressed) = touch_input; | 98 | std::tie(x, y, pressed) = touch_input; |
| @@ -110,7 +112,7 @@ void Controller_Touchscreen::updateTouchInputEvent( | |||
| 110 | fingers[finger_id].x = x; | 112 | fingers[finger_id].x = x; |
| 111 | fingers[finger_id].y = y; | 113 | fingers[finger_id].y = y; |
| 112 | fingers[finger_id].pressed = true; | 114 | fingers[finger_id].pressed = true; |
| 113 | fingers[finger_id].id = finger_id; | 115 | fingers[finger_id].id = static_cast<u32_le>(finger_id); |
| 114 | fingers[finger_id].attribute.start_touch.Assign(1); | 116 | fingers[finger_id].attribute.start_touch.Assign(1); |
| 115 | } | 117 | } |
| 116 | } else { | 118 | } else { |
diff --git a/src/core/hle/service/hid/controllers/touchscreen.h b/src/core/hle/service/hid/controllers/touchscreen.h index 6c7620420..03f399344 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.h +++ b/src/core/hle/service/hid/controllers/touchscreen.h | |||
| @@ -30,7 +30,12 @@ public: | |||
| 30 | void OnLoadInputDevices() override; | 30 | void OnLoadInputDevices() override; |
| 31 | 31 | ||
| 32 | private: | 32 | private: |
| 33 | void updateTouchInputEvent(const std::tuple<float, float, bool>& touch_input, int& finger_id); | 33 | // If the touch is new it tries to assing a new finger id, if there is no fingers avaliable no |
| 34 | // changes will be made. Updates the coordinates if the finger id it's already set. If the touch | ||
| 35 | // ends delays the output by one frame to set the end_touch flag before finally freeing the | ||
| 36 | // finger id | ||
| 37 | void updateTouchInputEvent(const std::tuple<float, float, bool>& touch_input, | ||
| 38 | size_t& finger_id); | ||
| 34 | static const size_t MAX_FINGERS = 16; | 39 | static const size_t MAX_FINGERS = 16; |
| 35 | 40 | ||
| 36 | struct Attributes { | 41 | struct Attributes { |
| @@ -80,10 +85,12 @@ private: | |||
| 80 | }; | 85 | }; |
| 81 | 86 | ||
| 82 | TouchScreenSharedMemory shared_memory{}; | 87 | TouchScreenSharedMemory shared_memory{}; |
| 83 | std::unique_ptr<Input::TouchDevice> touch_device; | 88 | std::unique_ptr<Input::TouchDevice> touch_mouse_device; |
| 89 | std::unique_ptr<Input::TouchDevice> touch_udp_device; | ||
| 84 | std::unique_ptr<Input::TouchDevice> touch_btn_device; | 90 | std::unique_ptr<Input::TouchDevice> touch_btn_device; |
| 85 | int mouse_finger_id{-1}; | 91 | size_t mouse_finger_id{-1}; |
| 86 | int keyboar_finger_id{-1}; | 92 | size_t keyboard_finger_id{-1}; |
| 93 | size_t udp_finger_id{-1}; | ||
| 87 | std::array<Finger, MAX_FINGERS> fingers; | 94 | std::array<Finger, MAX_FINGERS> fingers; |
| 88 | }; | 95 | }; |
| 89 | } // namespace Service::HID | 96 | } // namespace Service::HID |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index cda448718..0ec358225 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -464,13 +464,7 @@ void Config::ReadMouseValues() { | |||
| 464 | void Config::ReadTouchscreenValues() { | 464 | void Config::ReadTouchscreenValues() { |
| 465 | Settings::values.touchscreen.enabled = | 465 | Settings::values.touchscreen.enabled = |
| 466 | ReadSetting(QStringLiteral("touchscreen_enabled"), true).toBool(); | 466 | ReadSetting(QStringLiteral("touchscreen_enabled"), true).toBool(); |
| 467 | Settings::values.touchscreen.device = | ||
| 468 | ReadSetting(QStringLiteral("touchscreen_device"), QStringLiteral("engine:emu_window")) | ||
| 469 | .toString() | ||
| 470 | .toStdString(); | ||
| 471 | 467 | ||
| 472 | Settings::values.touchscreen.finger = | ||
| 473 | ReadSetting(QStringLiteral("touchscreen_finger"), 0).toUInt(); | ||
| 474 | Settings::values.touchscreen.rotation_angle = | 468 | Settings::values.touchscreen.rotation_angle = |
| 475 | ReadSetting(QStringLiteral("touchscreen_angle"), 0).toUInt(); | 469 | ReadSetting(QStringLiteral("touchscreen_angle"), 0).toUInt(); |
| 476 | Settings::values.touchscreen.diameter_x = | 470 | Settings::values.touchscreen.diameter_x = |
| @@ -1087,10 +1081,7 @@ void Config::SaveTouchscreenValues() { | |||
| 1087 | const auto& touchscreen = Settings::values.touchscreen; | 1081 | const auto& touchscreen = Settings::values.touchscreen; |
| 1088 | 1082 | ||
| 1089 | WriteSetting(QStringLiteral("touchscreen_enabled"), touchscreen.enabled, true); | 1083 | WriteSetting(QStringLiteral("touchscreen_enabled"), touchscreen.enabled, true); |
| 1090 | WriteSetting(QStringLiteral("touchscreen_device"), QString::fromStdString(touchscreen.device), | ||
| 1091 | QStringLiteral("engine:emu_window")); | ||
| 1092 | 1084 | ||
| 1093 | WriteSetting(QStringLiteral("touchscreen_finger"), touchscreen.finger, 0); | ||
| 1094 | WriteSetting(QStringLiteral("touchscreen_angle"), touchscreen.rotation_angle, 0); | 1085 | WriteSetting(QStringLiteral("touchscreen_angle"), touchscreen.rotation_angle, 0); |
| 1095 | WriteSetting(QStringLiteral("touchscreen_diameter_x"), touchscreen.diameter_x, 15); | 1086 | WriteSetting(QStringLiteral("touchscreen_diameter_x"), touchscreen.diameter_x, 15); |
| 1096 | WriteSetting(QStringLiteral("touchscreen_diameter_y"), touchscreen.diameter_y, 15); | 1087 | WriteSetting(QStringLiteral("touchscreen_diameter_y"), touchscreen.diameter_y, 15); |
diff --git a/src/yuzu/configuration/configure_motion_touch.cpp b/src/yuzu/configuration/configure_motion_touch.cpp index caaa85930..1f2b792e4 100644 --- a/src/yuzu/configuration/configure_motion_touch.cpp +++ b/src/yuzu/configuration/configure_motion_touch.cpp | |||
| @@ -81,19 +81,11 @@ void CalibrationConfigurationDialog::UpdateButtonText(const QString& text) { | |||
| 81 | cancel_button->setText(text); | 81 | cancel_button->setText(text); |
| 82 | } | 82 | } |
| 83 | 83 | ||
| 84 | constexpr std::array<std::pair<const char*, const char*>, 2> TouchProviders = {{ | ||
| 85 | {"emu_window", QT_TRANSLATE_NOOP("ConfigureMotionTouch", "Emulator Window")}, | ||
| 86 | {"cemuhookudp", QT_TRANSLATE_NOOP("ConfigureMotionTouch", "CemuhookUDP")}, | ||
| 87 | }}; | ||
| 88 | |||
| 89 | ConfigureMotionTouch::ConfigureMotionTouch(QWidget* parent, | 84 | ConfigureMotionTouch::ConfigureMotionTouch(QWidget* parent, |
| 90 | InputCommon::InputSubsystem* input_subsystem_) | 85 | InputCommon::InputSubsystem* input_subsystem_) |
| 91 | : QDialog(parent), input_subsystem{input_subsystem_}, | 86 | : QDialog(parent), input_subsystem{input_subsystem_}, |
| 92 | ui(std::make_unique<Ui::ConfigureMotionTouch>()) { | 87 | ui(std::make_unique<Ui::ConfigureMotionTouch>()) { |
| 93 | ui->setupUi(this); | 88 | ui->setupUi(this); |
| 94 | for (const auto& [provider, name] : TouchProviders) { | ||
| 95 | ui->touch_provider->addItem(tr(name), QString::fromUtf8(provider)); | ||
| 96 | } | ||
| 97 | 89 | ||
| 98 | ui->udp_learn_more->setOpenExternalLinks(true); | 90 | ui->udp_learn_more->setOpenExternalLinks(true); |
| 99 | ui->udp_learn_more->setText( | 91 | ui->udp_learn_more->setText( |
| @@ -112,10 +104,7 @@ ConfigureMotionTouch::~ConfigureMotionTouch() = default; | |||
| 112 | void ConfigureMotionTouch::SetConfiguration() { | 104 | void ConfigureMotionTouch::SetConfiguration() { |
| 113 | const Common::ParamPackage motion_param(Settings::values.motion_device); | 105 | const Common::ParamPackage motion_param(Settings::values.motion_device); |
| 114 | const Common::ParamPackage touch_param(Settings::values.touch_device); | 106 | const Common::ParamPackage touch_param(Settings::values.touch_device); |
| 115 | const std::string touch_engine = touch_param.Get("engine", "emu_window"); | ||
| 116 | 107 | ||
| 117 | ui->touch_provider->setCurrentIndex( | ||
| 118 | ui->touch_provider->findData(QString::fromStdString(touch_engine))); | ||
| 119 | ui->touch_from_button_checkbox->setChecked(Settings::values.use_touch_from_button); | 108 | ui->touch_from_button_checkbox->setChecked(Settings::values.use_touch_from_button); |
| 120 | touch_from_button_maps = Settings::values.touch_from_button_maps; | 109 | touch_from_button_maps = Settings::values.touch_from_button_maps; |
| 121 | for (const auto& touch_map : touch_from_button_maps) { | 110 | for (const auto& touch_map : touch_from_button_maps) { |
| @@ -148,30 +137,21 @@ void ConfigureMotionTouch::SetConfiguration() { | |||
| 148 | } | 137 | } |
| 149 | 138 | ||
| 150 | void ConfigureMotionTouch::UpdateUiDisplay() { | 139 | void ConfigureMotionTouch::UpdateUiDisplay() { |
| 151 | const QString touch_engine = ui->touch_provider->currentData().toString(); | ||
| 152 | const QString cemuhook_udp = QStringLiteral("cemuhookudp"); | 140 | const QString cemuhook_udp = QStringLiteral("cemuhookudp"); |
| 153 | 141 | ||
| 154 | ui->motion_sensitivity_label->setVisible(true); | 142 | ui->motion_sensitivity_label->setVisible(true); |
| 155 | ui->motion_sensitivity->setVisible(true); | 143 | ui->motion_sensitivity->setVisible(true); |
| 156 | 144 | ||
| 157 | if (touch_engine == cemuhook_udp) { | 145 | ui->touch_calibration->setVisible(true); |
| 158 | ui->touch_calibration->setVisible(true); | 146 | ui->touch_calibration_config->setVisible(true); |
| 159 | ui->touch_calibration_config->setVisible(true); | 147 | ui->touch_calibration_label->setVisible(true); |
| 160 | ui->touch_calibration_label->setVisible(true); | 148 | ui->touch_calibration->setText( |
| 161 | ui->touch_calibration->setText( | 149 | QStringLiteral("(%1, %2) - (%3, %4)").arg(min_x).arg(min_y).arg(max_x).arg(max_y)); |
| 162 | QStringLiteral("(%1, %2) - (%3, %4)").arg(min_x).arg(min_y).arg(max_x).arg(max_y)); | ||
| 163 | } else { | ||
| 164 | ui->touch_calibration->setVisible(false); | ||
| 165 | ui->touch_calibration_config->setVisible(false); | ||
| 166 | ui->touch_calibration_label->setVisible(false); | ||
| 167 | } | ||
| 168 | 150 | ||
| 169 | ui->udp_config_group_box->setVisible(true); | 151 | ui->udp_config_group_box->setVisible(true); |
| 170 | } | 152 | } |
| 171 | 153 | ||
| 172 | void ConfigureMotionTouch::ConnectEvents() { | 154 | void ConfigureMotionTouch::ConnectEvents() { |
| 173 | connect(ui->touch_provider, qOverload<int>(&QComboBox::currentIndexChanged), this, | ||
| 174 | [this](int index) { UpdateUiDisplay(); }); | ||
| 175 | connect(ui->udp_test, &QPushButton::clicked, this, &ConfigureMotionTouch::OnCemuhookUDPTest); | 155 | connect(ui->udp_test, &QPushButton::clicked, this, &ConfigureMotionTouch::OnCemuhookUDPTest); |
| 176 | connect(ui->udp_add, &QPushButton::clicked, this, &ConfigureMotionTouch::OnUDPAddServer); | 156 | connect(ui->udp_add, &QPushButton::clicked, this, &ConfigureMotionTouch::OnUDPAddServer); |
| 177 | connect(ui->udp_remove, &QPushButton::clicked, this, &ConfigureMotionTouch::OnUDPDeleteServer); | 157 | connect(ui->udp_remove, &QPushButton::clicked, this, &ConfigureMotionTouch::OnUDPDeleteServer); |
| @@ -327,16 +307,11 @@ void ConfigureMotionTouch::ApplyConfiguration() { | |||
| 327 | return; | 307 | return; |
| 328 | } | 308 | } |
| 329 | 309 | ||
| 330 | std::string touch_engine = ui->touch_provider->currentData().toString().toStdString(); | ||
| 331 | |||
| 332 | Common::ParamPackage touch_param{}; | 310 | Common::ParamPackage touch_param{}; |
| 333 | if (touch_engine == "cemuhookudp") { | 311 | touch_param.Set("min_x", min_x); |
| 334 | touch_param.Set("min_x", min_x); | 312 | touch_param.Set("min_y", min_y); |
| 335 | touch_param.Set("min_y", min_y); | 313 | touch_param.Set("max_x", max_x); |
| 336 | touch_param.Set("max_x", max_x); | 314 | touch_param.Set("max_y", max_y); |
| 337 | touch_param.Set("max_y", max_y); | ||
| 338 | } | ||
| 339 | touch_param.Set("engine", std::move(touch_engine)); | ||
| 340 | 315 | ||
| 341 | Settings::values.touch_device = touch_param.Serialize(); | 316 | Settings::values.touch_device = touch_param.Serialize(); |
| 342 | Settings::values.use_touch_from_button = ui->touch_from_button_checkbox->isChecked(); | 317 | Settings::values.use_touch_from_button = ui->touch_from_button_checkbox->isChecked(); |
diff --git a/src/yuzu/configuration/configure_motion_touch.ui b/src/yuzu/configuration/configure_motion_touch.ui index ebca835ac..1e35ea946 100644 --- a/src/yuzu/configuration/configure_motion_touch.ui +++ b/src/yuzu/configuration/configure_motion_touch.ui | |||
| @@ -68,23 +68,9 @@ | |||
| 68 | <item> | 68 | <item> |
| 69 | <layout class="QHBoxLayout"> | 69 | <layout class="QHBoxLayout"> |
| 70 | <item> | 70 | <item> |
| 71 | <widget class="QLabel" name="touch_provider_label"> | ||
| 72 | <property name="text"> | ||
| 73 | <string>Touch Provider:</string> | ||
| 74 | </property> | ||
| 75 | </widget> | ||
| 76 | </item> | ||
| 77 | <item> | ||
| 78 | <widget class="QComboBox" name="touch_provider"/> | ||
| 79 | </item> | ||
| 80 | </layout> | ||
| 81 | </item> | ||
| 82 | <item> | ||
| 83 | <layout class="QHBoxLayout"> | ||
| 84 | <item> | ||
| 85 | <widget class="QLabel" name="touch_calibration_label"> | 71 | <widget class="QLabel" name="touch_calibration_label"> |
| 86 | <property name="text"> | 72 | <property name="text"> |
| 87 | <string>Calibration:</string> | 73 | <string>UDP Calibration:</string> |
| 88 | </property> | 74 | </property> |
| 89 | </widget> | 75 | </widget> |
| 90 | </item> | 76 | </item> |
diff --git a/src/yuzu/configuration/configure_touchscreen_advanced.cpp b/src/yuzu/configuration/configure_touchscreen_advanced.cpp index 7d7cc00b7..29c86c7bc 100644 --- a/src/yuzu/configuration/configure_touchscreen_advanced.cpp +++ b/src/yuzu/configuration/configure_touchscreen_advanced.cpp | |||
| @@ -33,21 +33,18 @@ void ConfigureTouchscreenAdvanced::RetranslateUI() { | |||
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | void ConfigureTouchscreenAdvanced::ApplyConfiguration() { | 35 | void ConfigureTouchscreenAdvanced::ApplyConfiguration() { |
| 36 | Settings::values.touchscreen.finger = ui->finger_box->value(); | ||
| 37 | Settings::values.touchscreen.diameter_x = ui->diameter_x_box->value(); | 36 | Settings::values.touchscreen.diameter_x = ui->diameter_x_box->value(); |
| 38 | Settings::values.touchscreen.diameter_y = ui->diameter_y_box->value(); | 37 | Settings::values.touchscreen.diameter_y = ui->diameter_y_box->value(); |
| 39 | Settings::values.touchscreen.rotation_angle = ui->angle_box->value(); | 38 | Settings::values.touchscreen.rotation_angle = ui->angle_box->value(); |
| 40 | } | 39 | } |
| 41 | 40 | ||
| 42 | void ConfigureTouchscreenAdvanced::LoadConfiguration() { | 41 | void ConfigureTouchscreenAdvanced::LoadConfiguration() { |
| 43 | ui->finger_box->setValue(Settings::values.touchscreen.finger); | ||
| 44 | ui->diameter_x_box->setValue(Settings::values.touchscreen.diameter_x); | 42 | ui->diameter_x_box->setValue(Settings::values.touchscreen.diameter_x); |
| 45 | ui->diameter_y_box->setValue(Settings::values.touchscreen.diameter_y); | 43 | ui->diameter_y_box->setValue(Settings::values.touchscreen.diameter_y); |
| 46 | ui->angle_box->setValue(Settings::values.touchscreen.rotation_angle); | 44 | ui->angle_box->setValue(Settings::values.touchscreen.rotation_angle); |
| 47 | } | 45 | } |
| 48 | 46 | ||
| 49 | void ConfigureTouchscreenAdvanced::RestoreDefaults() { | 47 | void ConfigureTouchscreenAdvanced::RestoreDefaults() { |
| 50 | ui->finger_box->setValue(0); | ||
| 51 | ui->diameter_x_box->setValue(15); | 48 | ui->diameter_x_box->setValue(15); |
| 52 | ui->diameter_y_box->setValue(15); | 49 | ui->diameter_y_box->setValue(15); |
| 53 | ui->angle_box->setValue(0); | 50 | ui->angle_box->setValue(0); |
diff --git a/src/yuzu/configuration/configure_touchscreen_advanced.ui b/src/yuzu/configuration/configure_touchscreen_advanced.ui index 30ceccddb..88e7cf050 100644 --- a/src/yuzu/configuration/configure_touchscreen_advanced.ui +++ b/src/yuzu/configuration/configure_touchscreen_advanced.ui | |||
| @@ -65,20 +65,13 @@ | |||
| 65 | </property> | 65 | </property> |
| 66 | </spacer> | 66 | </spacer> |
| 67 | </item> | 67 | </item> |
| 68 | <item row="2" column="1"> | 68 | <item row="1" column="1"> |
| 69 | <widget class="QLabel" name="label_4"> | 69 | <widget class="QLabel" name="label_4"> |
| 70 | <property name="text"> | 70 | <property name="text"> |
| 71 | <string>Touch Diameter Y</string> | 71 | <string>Touch Diameter Y</string> |
| 72 | </property> | 72 | </property> |
| 73 | </widget> | 73 | </widget> |
| 74 | </item> | 74 | </item> |
| 75 | <item row="0" column="1"> | ||
| 76 | <widget class="QLabel" name="label"> | ||
| 77 | <property name="text"> | ||
| 78 | <string>Finger</string> | ||
| 79 | </property> | ||
| 80 | </widget> | ||
| 81 | </item> | ||
| 82 | <item row="0" column="3"> | 75 | <item row="0" column="3"> |
| 83 | <spacer name="horizontalSpacer_2"> | 76 | <spacer name="horizontalSpacer_2"> |
| 84 | <property name="orientation"> | 77 | <property name="orientation"> |
| @@ -92,37 +85,27 @@ | |||
| 92 | </property> | 85 | </property> |
| 93 | </spacer> | 86 | </spacer> |
| 94 | </item> | 87 | </item> |
| 95 | <item row="1" column="1"> | 88 | <item row="0" column="1"> |
| 96 | <widget class="QLabel" name="label_3"> | 89 | <widget class="QLabel" name="label_3"> |
| 97 | <property name="text"> | 90 | <property name="text"> |
| 98 | <string>Touch Diameter X</string> | 91 | <string>Touch Diameter X</string> |
| 99 | </property> | 92 | </property> |
| 100 | </widget> | 93 | </widget> |
| 101 | </item> | 94 | </item> |
| 102 | <item row="0" column="2"> | 95 | <item row="2" column="1"> |
| 103 | <widget class="QSpinBox" name="finger_box"> | ||
| 104 | <property name="minimumSize"> | ||
| 105 | <size> | ||
| 106 | <width>80</width> | ||
| 107 | <height>0</height> | ||
| 108 | </size> | ||
| 109 | </property> | ||
| 110 | </widget> | ||
| 111 | </item> | ||
| 112 | <item row="3" column="1"> | ||
| 113 | <widget class="QLabel" name="label_5"> | 96 | <widget class="QLabel" name="label_5"> |
| 114 | <property name="text"> | 97 | <property name="text"> |
| 115 | <string>Rotational Angle</string> | 98 | <string>Rotational Angle</string> |
| 116 | </property> | 99 | </property> |
| 117 | </widget> | 100 | </widget> |
| 118 | </item> | 101 | </item> |
| 119 | <item row="1" column="2"> | 102 | <item row="0" column="2"> |
| 120 | <widget class="QSpinBox" name="diameter_x_box"/> | 103 | <widget class="QSpinBox" name="diameter_x_box"/> |
| 121 | </item> | 104 | </item> |
| 122 | <item row="2" column="2"> | 105 | <item row="1" column="2"> |
| 123 | <widget class="QSpinBox" name="diameter_y_box"/> | 106 | <widget class="QSpinBox" name="diameter_y_box"/> |
| 124 | </item> | 107 | </item> |
| 125 | <item row="3" column="2"> | 108 | <item row="2" column="2"> |
| 126 | <widget class="QSpinBox" name="angle_box"/> | 109 | <widget class="QSpinBox" name="angle_box"/> |
| 127 | </item> | 110 | </item> |
| 128 | </layout> | 111 | </layout> |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 41ef6f6b8..f76102459 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -296,10 +296,6 @@ void Config::ReadValues() { | |||
| 296 | sdl2_config->GetBoolean("ControlsGeneral", "motion_enabled", true)); | 296 | sdl2_config->GetBoolean("ControlsGeneral", "motion_enabled", true)); |
| 297 | Settings::values.touchscreen.enabled = | 297 | Settings::values.touchscreen.enabled = |
| 298 | sdl2_config->GetBoolean("ControlsGeneral", "touch_enabled", true); | 298 | sdl2_config->GetBoolean("ControlsGeneral", "touch_enabled", true); |
| 299 | Settings::values.touchscreen.device = | ||
| 300 | sdl2_config->Get("ControlsGeneral", "touch_device", "engine:emu_window"); | ||
| 301 | Settings::values.touchscreen.finger = | ||
| 302 | sdl2_config->GetInteger("ControlsGeneral", "touch_finger", 0); | ||
| 303 | Settings::values.touchscreen.rotation_angle = | 299 | Settings::values.touchscreen.rotation_angle = |
| 304 | sdl2_config->GetInteger("ControlsGeneral", "touch_angle", 0); | 300 | sdl2_config->GetInteger("ControlsGeneral", "touch_angle", 0); |
| 305 | Settings::values.touchscreen.diameter_x = | 301 | Settings::values.touchscreen.diameter_x = |