diff options
| author | 2018-10-19 22:52:31 -0400 | |
|---|---|---|
| committer | 2018-10-19 22:52:31 -0400 | |
| commit | 298ebf444f2999e0e8b6b893e61674567d607cfd (patch) | |
| tree | c8ef1efce73ec68740f9ea3c4b1257c34e086307 | |
| parent | Merge pull request #1529 from DarkLordZach/key-derivation-crash (diff) | |
| parent | hid/controller: Remove unused header inclusions (diff) | |
| download | yuzu-298ebf444f2999e0e8b6b893e61674567d607cfd.tar.gz yuzu-298ebf444f2999e0e8b6b893e61674567d607cfd.tar.xz yuzu-298ebf444f2999e0e8b6b893e61674567d607cfd.zip | |
Merge pull request #1516 from lioncash/hid
hid: Minor cleanup-related changes
18 files changed, 33 insertions, 19 deletions
diff --git a/src/core/hle/service/hid/controllers/controller_base.cpp b/src/core/hle/service/hid/controllers/controller_base.cpp index 1625e9c3d..0993a7815 100644 --- a/src/core/hle/service/hid/controllers/controller_base.cpp +++ b/src/core/hle/service/hid/controllers/controller_base.cpp | |||
| @@ -5,6 +5,8 @@ | |||
| 5 | #include "core/hle/service/hid/controllers/controller_base.h" | 5 | #include "core/hle/service/hid/controllers/controller_base.h" |
| 6 | 6 | ||
| 7 | namespace Service::HID { | 7 | namespace Service::HID { |
| 8 | |||
| 9 | ControllerBase::ControllerBase() = default; | ||
| 8 | ControllerBase::~ControllerBase() = default; | 10 | ControllerBase::~ControllerBase() = default; |
| 9 | 11 | ||
| 10 | void ControllerBase::ActivateController() { | 12 | void ControllerBase::ActivateController() { |
diff --git a/src/core/hle/service/hid/controllers/controller_base.h b/src/core/hle/service/hid/controllers/controller_base.h index fa98e2354..f0e092b1b 100644 --- a/src/core/hle/service/hid/controllers/controller_base.h +++ b/src/core/hle/service/hid/controllers/controller_base.h | |||
| @@ -10,8 +10,8 @@ | |||
| 10 | namespace Service::HID { | 10 | namespace Service::HID { |
| 11 | class ControllerBase { | 11 | class ControllerBase { |
| 12 | public: | 12 | public: |
| 13 | ControllerBase() = default; | 13 | ControllerBase(); |
| 14 | virtual ~ControllerBase() = 0; | 14 | virtual ~ControllerBase(); |
| 15 | 15 | ||
| 16 | // Called when the controller is initialized | 16 | // Called when the controller is initialized |
| 17 | virtual void OnInit() = 0; | 17 | virtual void OnInit() = 0; |
diff --git a/src/core/hle/service/hid/controllers/debug_pad.cpp b/src/core/hle/service/hid/controllers/debug_pad.cpp index 6f8ef6e3f..3d100763f 100644 --- a/src/core/hle/service/hid/controllers/debug_pad.cpp +++ b/src/core/hle/service/hid/controllers/debug_pad.cpp | |||
| @@ -4,13 +4,13 @@ | |||
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/swap.h" | ||
| 8 | #include "core/core_timing.h" | 7 | #include "core/core_timing.h" |
| 9 | #include "core/hle/service/hid/controllers/debug_pad.h" | 8 | #include "core/hle/service/hid/controllers/debug_pad.h" |
| 10 | 9 | ||
| 11 | namespace Service::HID { | 10 | namespace Service::HID { |
| 12 | 11 | ||
| 13 | Controller_DebugPad::Controller_DebugPad() = default; | 12 | Controller_DebugPad::Controller_DebugPad() = default; |
| 13 | Controller_DebugPad::~Controller_DebugPad() = default; | ||
| 14 | 14 | ||
| 15 | void Controller_DebugPad::OnInit() {} | 15 | void Controller_DebugPad::OnInit() {} |
| 16 | 16 | ||
diff --git a/src/core/hle/service/hid/controllers/debug_pad.h b/src/core/hle/service/hid/controllers/debug_pad.h index e35675fa1..62b4f2682 100644 --- a/src/core/hle/service/hid/controllers/debug_pad.h +++ b/src/core/hle/service/hid/controllers/debug_pad.h | |||
| @@ -14,6 +14,7 @@ namespace Service::HID { | |||
| 14 | class Controller_DebugPad final : public ControllerBase { | 14 | class Controller_DebugPad final : public ControllerBase { |
| 15 | public: | 15 | public: |
| 16 | Controller_DebugPad(); | 16 | Controller_DebugPad(); |
| 17 | ~Controller_DebugPad() override; | ||
| 17 | 18 | ||
| 18 | // Called when the controller is initialized | 19 | // Called when the controller is initialized |
| 19 | void OnInit() override; | 20 | void OnInit() override; |
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/core/hle/service/hid/controllers/gesture.cpp index b473b9e2b..898572277 100644 --- a/src/core/hle/service/hid/controllers/gesture.cpp +++ b/src/core/hle/service/hid/controllers/gesture.cpp | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/swap.h" | ||
| 8 | #include "core/core_timing.h" | 7 | #include "core/core_timing.h" |
| 9 | #include "core/hle/service/hid/controllers/gesture.h" | 8 | #include "core/hle/service/hid/controllers/gesture.h" |
| 10 | 9 | ||
| @@ -12,6 +11,7 @@ namespace Service::HID { | |||
| 12 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3BA00; | 11 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3BA00; |
| 13 | 12 | ||
| 14 | Controller_Gesture::Controller_Gesture() = default; | 13 | Controller_Gesture::Controller_Gesture() = default; |
| 14 | Controller_Gesture::~Controller_Gesture() = default; | ||
| 15 | 15 | ||
| 16 | void Controller_Gesture::OnInit() {} | 16 | void Controller_Gesture::OnInit() {} |
| 17 | 17 | ||
diff --git a/src/core/hle/service/hid/controllers/gesture.h b/src/core/hle/service/hid/controllers/gesture.h index 0ced50dfd..1056ffbcd 100644 --- a/src/core/hle/service/hid/controllers/gesture.h +++ b/src/core/hle/service/hid/controllers/gesture.h | |||
| @@ -13,6 +13,7 @@ namespace Service::HID { | |||
| 13 | class Controller_Gesture final : public ControllerBase { | 13 | class Controller_Gesture final : public ControllerBase { |
| 14 | public: | 14 | public: |
| 15 | Controller_Gesture(); | 15 | Controller_Gesture(); |
| 16 | ~Controller_Gesture() override; | ||
| 16 | 17 | ||
| 17 | // Called when the controller is initialized | 18 | // Called when the controller is initialized |
| 18 | void OnInit() override; | 19 | void OnInit() override; |
diff --git a/src/core/hle/service/hid/controllers/keyboard.cpp b/src/core/hle/service/hid/controllers/keyboard.cpp index 089c02ac4..ccfbce9ac 100644 --- a/src/core/hle/service/hid/controllers/keyboard.cpp +++ b/src/core/hle/service/hid/controllers/keyboard.cpp | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/swap.h" | ||
| 8 | #include "core/core_timing.h" | 7 | #include "core/core_timing.h" |
| 9 | #include "core/hle/service/hid/controllers/keyboard.h" | 8 | #include "core/hle/service/hid/controllers/keyboard.h" |
| 10 | 9 | ||
| @@ -12,6 +11,7 @@ namespace Service::HID { | |||
| 12 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800; | 11 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800; |
| 13 | 12 | ||
| 14 | Controller_Keyboard::Controller_Keyboard() = default; | 13 | Controller_Keyboard::Controller_Keyboard() = default; |
| 14 | Controller_Keyboard::~Controller_Keyboard() = default; | ||
| 15 | 15 | ||
| 16 | void Controller_Keyboard::OnInit() {} | 16 | void Controller_Keyboard::OnInit() {} |
| 17 | 17 | ||
diff --git a/src/core/hle/service/hid/controllers/keyboard.h b/src/core/hle/service/hid/controllers/keyboard.h index 778e14f7e..493e68fce 100644 --- a/src/core/hle/service/hid/controllers/keyboard.h +++ b/src/core/hle/service/hid/controllers/keyboard.h | |||
| @@ -14,6 +14,7 @@ namespace Service::HID { | |||
| 14 | class Controller_Keyboard final : public ControllerBase { | 14 | class Controller_Keyboard final : public ControllerBase { |
| 15 | public: | 15 | public: |
| 16 | Controller_Keyboard(); | 16 | Controller_Keyboard(); |
| 17 | ~Controller_Keyboard() override; | ||
| 17 | 18 | ||
| 18 | // Called when the controller is initialized | 19 | // Called when the controller is initialized |
| 19 | void OnInit() override; | 20 | void OnInit() override; |
diff --git a/src/core/hle/service/hid/controllers/mouse.cpp b/src/core/hle/service/hid/controllers/mouse.cpp index 78e9b5e9e..4e246a57d 100644 --- a/src/core/hle/service/hid/controllers/mouse.cpp +++ b/src/core/hle/service/hid/controllers/mouse.cpp | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/swap.h" | ||
| 8 | #include "core/core_timing.h" | 7 | #include "core/core_timing.h" |
| 9 | #include "core/hle/service/hid/controllers/mouse.h" | 8 | #include "core/hle/service/hid/controllers/mouse.h" |
| 10 | 9 | ||
| @@ -12,6 +11,7 @@ namespace Service::HID { | |||
| 12 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3400; | 11 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3400; |
| 13 | 12 | ||
| 14 | Controller_Mouse::Controller_Mouse() = default; | 13 | Controller_Mouse::Controller_Mouse() = default; |
| 14 | Controller_Mouse::~Controller_Mouse() = default; | ||
| 15 | 15 | ||
| 16 | void Controller_Mouse::OnInit() {} | 16 | void Controller_Mouse::OnInit() {} |
| 17 | 17 | ||
diff --git a/src/core/hle/service/hid/controllers/mouse.h b/src/core/hle/service/hid/controllers/mouse.h index 05358a4f5..543b0b71f 100644 --- a/src/core/hle/service/hid/controllers/mouse.h +++ b/src/core/hle/service/hid/controllers/mouse.h | |||
| @@ -13,6 +13,7 @@ namespace Service::HID { | |||
| 13 | class Controller_Mouse final : public ControllerBase { | 13 | class Controller_Mouse final : public ControllerBase { |
| 14 | public: | 14 | public: |
| 15 | Controller_Mouse(); | 15 | Controller_Mouse(); |
| 16 | ~Controller_Mouse() override; | ||
| 16 | 17 | ||
| 17 | // Called when the controller is initialized | 18 | // Called when the controller is initialized |
| 18 | void OnInit() override; | 19 | void OnInit() override; |
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index d17e64b2a..b26593b4f 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp | |||
| @@ -2,8 +2,6 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <algorithm> | 5 | #include <algorithm> |
| 8 | #include <array> | 6 | #include <array> |
| 9 | #include <cstring> | 7 | #include <cstring> |
| @@ -11,7 +9,6 @@ | |||
| 11 | #include "common/bit_field.h" | 9 | #include "common/bit_field.h" |
| 12 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 13 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 14 | #include "common/swap.h" | ||
| 15 | #include "core/core.h" | 12 | #include "core/core.h" |
| 16 | #include "core/core_timing.h" | 13 | #include "core/core_timing.h" |
| 17 | #include "core/frontend/input.h" | 14 | #include "core/frontend/input.h" |
| @@ -20,6 +17,7 @@ | |||
| 20 | #include "core/settings.h" | 17 | #include "core/settings.h" |
| 21 | 18 | ||
| 22 | namespace Service::HID { | 19 | namespace Service::HID { |
| 20 | |||
| 23 | constexpr u32 JOYCON_BODY_NEON_RED = 0xFF3C28; | 21 | constexpr u32 JOYCON_BODY_NEON_RED = 0xFF3C28; |
| 24 | constexpr u32 JOYCON_BUTTONS_NEON_RED = 0x1E0A0A; | 22 | constexpr u32 JOYCON_BUTTONS_NEON_RED = 0x1E0A0A; |
| 25 | constexpr u32 JOYCON_BODY_NEON_BLUE = 0x0AB9E6; | 23 | constexpr u32 JOYCON_BODY_NEON_BLUE = 0x0AB9E6; |
| @@ -28,9 +26,18 @@ constexpr s32 HID_JOYSTICK_MAX = 0x7fff; | |||
| 28 | constexpr s32 HID_JOYSTICK_MIN = -0x7fff; | 26 | constexpr s32 HID_JOYSTICK_MIN = -0x7fff; |
| 29 | constexpr std::size_t NPAD_OFFSET = 0x9A00; | 27 | constexpr std::size_t NPAD_OFFSET = 0x9A00; |
| 30 | constexpr u32 BATTERY_FULL = 2; | 28 | constexpr u32 BATTERY_FULL = 2; |
| 31 | enum class JoystickId : std::size_t { Joystick_Left, Joystick_Right }; | 29 | |
| 30 | constexpr std::array<u32, 10> npad_id_list{ | ||
| 31 | 0, 1, 2, 3, 4, 5, 6, 7, 32, 16, | ||
| 32 | }; | ||
| 33 | |||
| 34 | enum class JoystickId : std::size_t { | ||
| 35 | Joystick_Left, | ||
| 36 | Joystick_Right, | ||
| 37 | }; | ||
| 32 | 38 | ||
| 33 | Controller_NPad::Controller_NPad() = default; | 39 | Controller_NPad::Controller_NPad() = default; |
| 40 | Controller_NPad::~Controller_NPad() = default; | ||
| 34 | 41 | ||
| 35 | void Controller_NPad::InitNewlyAddedControler(std::size_t controller_idx) { | 42 | void Controller_NPad::InitNewlyAddedControler(std::size_t controller_idx) { |
| 36 | const auto controller_type = connected_controllers[controller_idx].type; | 43 | const auto controller_type = connected_controllers[controller_idx].type; |
| @@ -315,7 +322,7 @@ void Controller_NPad::SetSupportedNPadIdTypes(u8* data, std::size_t length) { | |||
| 315 | std::memcpy(supported_npad_id_types.data(), data, length); | 322 | std::memcpy(supported_npad_id_types.data(), data, length); |
| 316 | } | 323 | } |
| 317 | 324 | ||
| 318 | const void Controller_NPad::GetSupportedNpadIdTypes(u32* data, std::size_t max_length) { | 325 | void Controller_NPad::GetSupportedNpadIdTypes(u32* data, std::size_t max_length) { |
| 319 | ASSERT(max_length < supported_npad_id_types.size()); | 326 | ASSERT(max_length < supported_npad_id_types.size()); |
| 320 | std::memcpy(data, supported_npad_id_types.data(), supported_npad_id_types.size()); | 327 | std::memcpy(data, supported_npad_id_types.data(), supported_npad_id_types.size()); |
| 321 | } | 328 | } |
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index 9d07d258d..7c0f93acf 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h | |||
| @@ -15,6 +15,7 @@ namespace Service::HID { | |||
| 15 | class Controller_NPad final : public ControllerBase { | 15 | class Controller_NPad final : public ControllerBase { |
| 16 | public: | 16 | public: |
| 17 | Controller_NPad(); | 17 | Controller_NPad(); |
| 18 | ~Controller_NPad() override; | ||
| 18 | 19 | ||
| 19 | // Called when the controller is initialized | 20 | // Called when the controller is initialized |
| 20 | void OnInit() override; | 21 | void OnInit() override; |
| @@ -77,7 +78,7 @@ public: | |||
| 77 | position1.Assign(light2); | 78 | position1.Assign(light2); |
| 78 | position1.Assign(light3); | 79 | position1.Assign(light3); |
| 79 | position1.Assign(light4); | 80 | position1.Assign(light4); |
| 80 | }; | 81 | } |
| 81 | union { | 82 | union { |
| 82 | u64 raw{}; | 83 | u64 raw{}; |
| 83 | BitField<0, 1, u64> position1; | 84 | BitField<0, 1, u64> position1; |
| @@ -91,7 +92,7 @@ public: | |||
| 91 | NPadType GetSupportedStyleSet() const; | 92 | NPadType GetSupportedStyleSet() const; |
| 92 | 93 | ||
| 93 | void SetSupportedNPadIdTypes(u8* data, std::size_t length); | 94 | void SetSupportedNPadIdTypes(u8* data, std::size_t length); |
| 94 | const void GetSupportedNpadIdTypes(u32* data, std::size_t max_length); | 95 | void GetSupportedNpadIdTypes(u32* data, std::size_t max_length); |
| 95 | std::size_t GetSupportedNPadIdTypesSize() const; | 96 | std::size_t GetSupportedNPadIdTypesSize() const; |
| 96 | 97 | ||
| 97 | void SetHoldType(NpadHoldType joy_hold_type); | 98 | void SetHoldType(NpadHoldType joy_hold_type); |
| @@ -277,9 +278,7 @@ private: | |||
| 277 | std::vector<u32> supported_npad_id_types{}; | 278 | std::vector<u32> supported_npad_id_types{}; |
| 278 | NpadHoldType hold_type{NpadHoldType::Vertical}; | 279 | NpadHoldType hold_type{NpadHoldType::Vertical}; |
| 279 | Kernel::SharedPtr<Kernel::Event> styleset_changed_event; | 280 | Kernel::SharedPtr<Kernel::Event> styleset_changed_event; |
| 280 | std::size_t dump_idx{}; | ||
| 281 | Vibration last_processed_vibration{}; | 281 | Vibration last_processed_vibration{}; |
| 282 | static constexpr std::array<u32, 10> npad_id_list{0, 1, 2, 3, 4, 5, 6, 7, 32, 16}; | ||
| 283 | std::array<ControllerHolder, 10> connected_controllers{}; | 282 | std::array<ControllerHolder, 10> connected_controllers{}; |
| 284 | bool can_controllers_vibrate{true}; | 283 | bool can_controllers_vibrate{true}; |
| 285 | 284 | ||
diff --git a/src/core/hle/service/hid/controllers/stubbed.cpp b/src/core/hle/service/hid/controllers/stubbed.cpp index 3a13d5991..02fcfadd9 100644 --- a/src/core/hle/service/hid/controllers/stubbed.cpp +++ b/src/core/hle/service/hid/controllers/stubbed.cpp | |||
| @@ -4,13 +4,13 @@ | |||
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/swap.h" | ||
| 8 | #include "core/core_timing.h" | 7 | #include "core/core_timing.h" |
| 9 | #include "core/hle/service/hid/controllers/stubbed.h" | 8 | #include "core/hle/service/hid/controllers/stubbed.h" |
| 10 | 9 | ||
| 11 | namespace Service::HID { | 10 | namespace Service::HID { |
| 12 | 11 | ||
| 13 | Controller_Stubbed::Controller_Stubbed() = default; | 12 | Controller_Stubbed::Controller_Stubbed() = default; |
| 13 | Controller_Stubbed::~Controller_Stubbed() = default; | ||
| 14 | 14 | ||
| 15 | void Controller_Stubbed::OnInit() {} | 15 | void Controller_Stubbed::OnInit() {} |
| 16 | 16 | ||
diff --git a/src/core/hle/service/hid/controllers/stubbed.h b/src/core/hle/service/hid/controllers/stubbed.h index 9c1b57f83..4a21c643e 100644 --- a/src/core/hle/service/hid/controllers/stubbed.h +++ b/src/core/hle/service/hid/controllers/stubbed.h | |||
| @@ -11,6 +11,7 @@ namespace Service::HID { | |||
| 11 | class Controller_Stubbed final : public ControllerBase { | 11 | class Controller_Stubbed final : public ControllerBase { |
| 12 | public: | 12 | public: |
| 13 | Controller_Stubbed(); | 13 | Controller_Stubbed(); |
| 14 | ~Controller_Stubbed() override; | ||
| 14 | 15 | ||
| 15 | // Called when the controller is initialized | 16 | // Called when the controller is initialized |
| 16 | void OnInit() override; | 17 | void OnInit() override; |
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp index e97f84ea1..43efef803 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.cpp +++ b/src/core/hle/service/hid/controllers/touchscreen.cpp | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/swap.h" | ||
| 8 | #include "core/core_timing.h" | 7 | #include "core/core_timing.h" |
| 9 | #include "core/frontend/emu_window.h" | 8 | #include "core/frontend/emu_window.h" |
| 10 | #include "core/frontend/input.h" | 9 | #include "core/frontend/input.h" |
| @@ -15,6 +14,7 @@ namespace Service::HID { | |||
| 15 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x400; | 14 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x400; |
| 16 | 15 | ||
| 17 | Controller_Touchscreen::Controller_Touchscreen() = default; | 16 | Controller_Touchscreen::Controller_Touchscreen() = default; |
| 17 | Controller_Touchscreen::~Controller_Touchscreen() = default; | ||
| 18 | 18 | ||
| 19 | void Controller_Touchscreen::OnInit() {} | 19 | void Controller_Touchscreen::OnInit() {} |
| 20 | 20 | ||
diff --git a/src/core/hle/service/hid/controllers/touchscreen.h b/src/core/hle/service/hid/controllers/touchscreen.h index 1d97b6c2a..e5db6e6ba 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.h +++ b/src/core/hle/service/hid/controllers/touchscreen.h | |||
| @@ -14,6 +14,7 @@ namespace Service::HID { | |||
| 14 | class Controller_Touchscreen final : public ControllerBase { | 14 | class Controller_Touchscreen final : public ControllerBase { |
| 15 | public: | 15 | public: |
| 16 | Controller_Touchscreen(); | 16 | Controller_Touchscreen(); |
| 17 | ~Controller_Touchscreen() override; | ||
| 17 | 18 | ||
| 18 | // Called when the controller is initialized | 19 | // Called when the controller is initialized |
| 19 | void OnInit() override; | 20 | void OnInit() override; |
diff --git a/src/core/hle/service/hid/controllers/xpad.cpp b/src/core/hle/service/hid/controllers/xpad.cpp index df0b48451..cd397c70b 100644 --- a/src/core/hle/service/hid/controllers/xpad.cpp +++ b/src/core/hle/service/hid/controllers/xpad.cpp | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/swap.h" | ||
| 8 | #include "core/core_timing.h" | 7 | #include "core/core_timing.h" |
| 9 | #include "core/hle/service/hid/controllers/xpad.h" | 8 | #include "core/hle/service/hid/controllers/xpad.h" |
| 10 | 9 | ||
| @@ -12,6 +11,7 @@ namespace Service::HID { | |||
| 12 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3C00; | 11 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3C00; |
| 13 | 12 | ||
| 14 | Controller_XPad::Controller_XPad() = default; | 13 | Controller_XPad::Controller_XPad() = default; |
| 14 | Controller_XPad::~Controller_XPad() = default; | ||
| 15 | 15 | ||
| 16 | void Controller_XPad::OnInit() {} | 16 | void Controller_XPad::OnInit() {} |
| 17 | 17 | ||
diff --git a/src/core/hle/service/hid/controllers/xpad.h b/src/core/hle/service/hid/controllers/xpad.h index e2007183d..ff836989f 100644 --- a/src/core/hle/service/hid/controllers/xpad.h +++ b/src/core/hle/service/hid/controllers/xpad.h | |||
| @@ -7,13 +7,13 @@ | |||
| 7 | #include "common/common_funcs.h" | 7 | #include "common/common_funcs.h" |
| 8 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 9 | #include "common/swap.h" | 9 | #include "common/swap.h" |
| 10 | #include "core/frontend/input.h" | ||
| 11 | #include "core/hle/service/hid/controllers/controller_base.h" | 10 | #include "core/hle/service/hid/controllers/controller_base.h" |
| 12 | 11 | ||
| 13 | namespace Service::HID { | 12 | namespace Service::HID { |
| 14 | class Controller_XPad final : public ControllerBase { | 13 | class Controller_XPad final : public ControllerBase { |
| 15 | public: | 14 | public: |
| 16 | Controller_XPad(); | 15 | Controller_XPad(); |
| 16 | ~Controller_XPad() override; | ||
| 17 | 17 | ||
| 18 | // Called when the controller is initialized | 18 | // Called when the controller is initialized |
| 19 | void OnInit() override; | 19 | void OnInit() override; |