From fedd857054fb33521ee8e887a88d54cfc69c71fd Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 5 Dec 2022 18:59:13 -0500 Subject: applets/controller: Use aliases for callbacks --- src/core/frontend/applets/controller.cpp | 2 +- src/core/frontend/applets/controller.h | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core/frontend') diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp index 6c230f619..52919484e 100644 --- a/src/core/frontend/applets/controller.cpp +++ b/src/core/frontend/applets/controller.cpp @@ -16,7 +16,7 @@ DefaultControllerApplet::DefaultControllerApplet(HID::HIDCore& hid_core_) : hid_ DefaultControllerApplet::~DefaultControllerApplet() = default; -void DefaultControllerApplet::ReconfigureControllers(std::function callback, +void DefaultControllerApplet::ReconfigureControllers(ReconfigureCallback callback, const ControllerParameters& parameters) const { LOG_INFO(Service_HID, "called, deducing the best configuration based on the given parameters!"); diff --git a/src/core/frontend/applets/controller.h b/src/core/frontend/applets/controller.h index 71698df74..adb2feefd 100644 --- a/src/core/frontend/applets/controller.h +++ b/src/core/frontend/applets/controller.h @@ -36,9 +36,11 @@ struct ControllerParameters { class ControllerApplet { public: + using ReconfigureCallback = std::function; + virtual ~ControllerApplet(); - virtual void ReconfigureControllers(std::function callback, + virtual void ReconfigureControllers(ReconfigureCallback callback, const ControllerParameters& parameters) const = 0; }; @@ -47,7 +49,7 @@ public: explicit DefaultControllerApplet(HID::HIDCore& hid_core_); ~DefaultControllerApplet() override; - void ReconfigureControllers(std::function callback, + void ReconfigureControllers(ReconfigureCallback callback, const ControllerParameters& parameters) const override; private: -- cgit v1.2.3