summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/hle/service/hid/controllers/touchscreen.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp
index 07244fe4e..8b9763de6 100644
--- a/src/core/hle/service/hid/controllers/touchscreen.cpp
+++ b/src/core/hle/service/hid/controllers/touchscreen.cpp
@@ -42,19 +42,19 @@ void Controller_Touchscreen::OnUpdate(u8* data, std::size_t size) {
42 const auto [x, y, pressed] = touch_device->GetStatus(); 42 const auto [x, y, pressed] = touch_device->GetStatus();
43 auto& touch_entry = cur_entry.states[0]; 43 auto& touch_entry = cur_entry.states[0];
44 touch_entry.attribute.raw = 0; 44 touch_entry.attribute.raw = 0;
45 if (pressed) { 45 if (pressed && Settings::values.touchscreen.enabled) {
46 if (cur_entry.entry_count == 0) { 46 if (cur_entry.entry_count == 0) {
47 touch_entry.attribute.start_touch.Assign(1); 47 touch_entry.attribute.start_touch.Assign(1);
48 } 48 }
49 touch_entry.x = static_cast<u16>(x * Layout::ScreenUndocked::Width); 49 touch_entry.x = static_cast<u16>(x * Layout::ScreenUndocked::Width);
50 touch_entry.y = static_cast<u16>(y * Layout::ScreenUndocked::Height); 50 touch_entry.y = static_cast<u16>(y * Layout::ScreenUndocked::Height);
51 touch_entry.diameter_x = 15; 51 touch_entry.diameter_x = Settings::values.touchscreen.diameter_x;
52 touch_entry.diameter_y = 15; 52 touch_entry.diameter_y = Settings::values.touchscreen.diameter_y;
53 touch_entry.rotation_angle = 0; 53 touch_entry.rotation_angle = Settings::values.touchscreen.rotation_angle;
54 const u64 tick = CoreTiming::GetTicks(); 54 const u64 tick = CoreTiming::GetTicks();
55 touch_entry.delta_time = tick - last_touch; 55 touch_entry.delta_time = tick - last_touch;
56 last_touch = tick; 56 last_touch = tick;
57 touch_entry.finger = 0; 57 touch_entry.finger = Settings::values.touchscreen.finger;
58 cur_entry.entry_count = 1; 58 cur_entry.entry_count = 1;
59 } else { 59 } else {
60 if (cur_entry.entry_count == 1) { 60 if (cur_entry.entry_count == 1) {
@@ -67,6 +67,6 @@ void Controller_Touchscreen::OnUpdate(u8* data, std::size_t size) {
67} 67}
68 68
69void Controller_Touchscreen::OnLoadInputDevices() { 69void Controller_Touchscreen::OnLoadInputDevices() {
70 touch_device = Input::CreateDevice<Input::TouchDevice>(Settings::values.touch_device); 70 touch_device = Input::CreateDevice<Input::TouchDevice>(Settings::values.touchscreen.device);
71} 71}
72} // namespace Service::HID 72} // namespace Service::HID