mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 15:22:45 +01:00
hid/controller: Default the destructors of all controller types in the cpp file
These classes are non-trivial and are definitely going to be changed in the future, so we default these to prevent issues with forward declarations, and to keep the compiler from inlining tear-down code.
This commit is contained in:
parent
119b47f366
commit
46202e984e
16 changed files with 16 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
namespace Service::HID {
|
namespace Service::HID {
|
||||||
|
|
||||||
Controller_DebugPad::Controller_DebugPad() = default;
|
Controller_DebugPad::Controller_DebugPad() = default;
|
||||||
|
Controller_DebugPad::~Controller_DebugPad() = default;
|
||||||
|
|
||||||
void Controller_DebugPad::OnInit() {}
|
void Controller_DebugPad::OnInit() {}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Service::HID {
|
||||||
class Controller_DebugPad final : public ControllerBase {
|
class Controller_DebugPad final : public ControllerBase {
|
||||||
public:
|
public:
|
||||||
Controller_DebugPad();
|
Controller_DebugPad();
|
||||||
|
~Controller_DebugPad() override;
|
||||||
|
|
||||||
// Called when the controller is initialized
|
// Called when the controller is initialized
|
||||||
void OnInit() override;
|
void OnInit() override;
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Service::HID {
|
||||||
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3BA00;
|
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3BA00;
|
||||||
|
|
||||||
Controller_Gesture::Controller_Gesture() = default;
|
Controller_Gesture::Controller_Gesture() = default;
|
||||||
|
Controller_Gesture::~Controller_Gesture() = default;
|
||||||
|
|
||||||
void Controller_Gesture::OnInit() {}
|
void Controller_Gesture::OnInit() {}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Service::HID {
|
||||||
class Controller_Gesture final : public ControllerBase {
|
class Controller_Gesture final : public ControllerBase {
|
||||||
public:
|
public:
|
||||||
Controller_Gesture();
|
Controller_Gesture();
|
||||||
|
~Controller_Gesture() override;
|
||||||
|
|
||||||
// Called when the controller is initialized
|
// Called when the controller is initialized
|
||||||
void OnInit() override;
|
void OnInit() override;
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Service::HID {
|
||||||
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800;
|
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800;
|
||||||
|
|
||||||
Controller_Keyboard::Controller_Keyboard() = default;
|
Controller_Keyboard::Controller_Keyboard() = default;
|
||||||
|
Controller_Keyboard::~Controller_Keyboard() = default;
|
||||||
|
|
||||||
void Controller_Keyboard::OnInit() {}
|
void Controller_Keyboard::OnInit() {}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Service::HID {
|
||||||
class Controller_Keyboard final : public ControllerBase {
|
class Controller_Keyboard final : public ControllerBase {
|
||||||
public:
|
public:
|
||||||
Controller_Keyboard();
|
Controller_Keyboard();
|
||||||
|
~Controller_Keyboard() override;
|
||||||
|
|
||||||
// Called when the controller is initialized
|
// Called when the controller is initialized
|
||||||
void OnInit() override;
|
void OnInit() override;
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Service::HID {
|
||||||
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3400;
|
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3400;
|
||||||
|
|
||||||
Controller_Mouse::Controller_Mouse() = default;
|
Controller_Mouse::Controller_Mouse() = default;
|
||||||
|
Controller_Mouse::~Controller_Mouse() = default;
|
||||||
|
|
||||||
void Controller_Mouse::OnInit() {}
|
void Controller_Mouse::OnInit() {}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ namespace Service::HID {
|
||||||
class Controller_Mouse final : public ControllerBase {
|
class Controller_Mouse final : public ControllerBase {
|
||||||
public:
|
public:
|
||||||
Controller_Mouse();
|
Controller_Mouse();
|
||||||
|
~Controller_Mouse() override;
|
||||||
|
|
||||||
// Called when the controller is initialized
|
// Called when the controller is initialized
|
||||||
void OnInit() override;
|
void OnInit() override;
|
||||||
|
|
|
@ -31,6 +31,7 @@ constexpr u32 BATTERY_FULL = 2;
|
||||||
enum class JoystickId : std::size_t { Joystick_Left, Joystick_Right };
|
enum class JoystickId : std::size_t { Joystick_Left, Joystick_Right };
|
||||||
|
|
||||||
Controller_NPad::Controller_NPad() = default;
|
Controller_NPad::Controller_NPad() = default;
|
||||||
|
Controller_NPad::~Controller_NPad() = default;
|
||||||
|
|
||||||
void Controller_NPad::InitNewlyAddedControler(std::size_t controller_idx) {
|
void Controller_NPad::InitNewlyAddedControler(std::size_t controller_idx) {
|
||||||
const auto controller_type = connected_controllers[controller_idx].type;
|
const auto controller_type = connected_controllers[controller_idx].type;
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace Service::HID {
|
||||||
class Controller_NPad final : public ControllerBase {
|
class Controller_NPad final : public ControllerBase {
|
||||||
public:
|
public:
|
||||||
Controller_NPad();
|
Controller_NPad();
|
||||||
|
~Controller_NPad() override;
|
||||||
|
|
||||||
// Called when the controller is initialized
|
// Called when the controller is initialized
|
||||||
void OnInit() override;
|
void OnInit() override;
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
namespace Service::HID {
|
namespace Service::HID {
|
||||||
|
|
||||||
Controller_Stubbed::Controller_Stubbed() = default;
|
Controller_Stubbed::Controller_Stubbed() = default;
|
||||||
|
Controller_Stubbed::~Controller_Stubbed() = default;
|
||||||
|
|
||||||
void Controller_Stubbed::OnInit() {}
|
void Controller_Stubbed::OnInit() {}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ namespace Service::HID {
|
||||||
class Controller_Stubbed final : public ControllerBase {
|
class Controller_Stubbed final : public ControllerBase {
|
||||||
public:
|
public:
|
||||||
Controller_Stubbed();
|
Controller_Stubbed();
|
||||||
|
~Controller_Stubbed() override;
|
||||||
|
|
||||||
// Called when the controller is initialized
|
// Called when the controller is initialized
|
||||||
void OnInit() override;
|
void OnInit() override;
|
||||||
|
|
|
@ -15,6 +15,7 @@ namespace Service::HID {
|
||||||
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x400;
|
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x400;
|
||||||
|
|
||||||
Controller_Touchscreen::Controller_Touchscreen() = default;
|
Controller_Touchscreen::Controller_Touchscreen() = default;
|
||||||
|
Controller_Touchscreen::~Controller_Touchscreen() = default;
|
||||||
|
|
||||||
void Controller_Touchscreen::OnInit() {}
|
void Controller_Touchscreen::OnInit() {}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Service::HID {
|
||||||
class Controller_Touchscreen final : public ControllerBase {
|
class Controller_Touchscreen final : public ControllerBase {
|
||||||
public:
|
public:
|
||||||
Controller_Touchscreen();
|
Controller_Touchscreen();
|
||||||
|
~Controller_Touchscreen() override;
|
||||||
|
|
||||||
// Called when the controller is initialized
|
// Called when the controller is initialized
|
||||||
void OnInit() override;
|
void OnInit() override;
|
||||||
|
|
|
@ -12,6 +12,7 @@ namespace Service::HID {
|
||||||
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3C00;
|
constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3C00;
|
||||||
|
|
||||||
Controller_XPad::Controller_XPad() = default;
|
Controller_XPad::Controller_XPad() = default;
|
||||||
|
Controller_XPad::~Controller_XPad() = default;
|
||||||
|
|
||||||
void Controller_XPad::OnInit() {}
|
void Controller_XPad::OnInit() {}
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ namespace Service::HID {
|
||||||
class Controller_XPad final : public ControllerBase {
|
class Controller_XPad final : public ControllerBase {
|
||||||
public:
|
public:
|
||||||
Controller_XPad();
|
Controller_XPad();
|
||||||
|
~Controller_XPad() override;
|
||||||
|
|
||||||
// Called when the controller is initialized
|
// Called when the controller is initialized
|
||||||
void OnInit() override;
|
void OnInit() override;
|
||||||
|
|
Loading…
Reference in a new issue