summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-12-06 00:59:13 +0100
committerLioncash <mathew1800@gmail.com>2022-12-06 01:06:04 +0100
commitfedd857054fb33521ee8e887a88d54cfc69c71fd (patch)
tree1529b0be86ba497c61687f51b0c62957ff829343
parentapplets/error: Use aliases for callbacks (diff)
downloadyuzu-fedd857054fb33521ee8e887a88d54cfc69c71fd.tar
yuzu-fedd857054fb33521ee8e887a88d54cfc69c71fd.tar.gz
yuzu-fedd857054fb33521ee8e887a88d54cfc69c71fd.tar.bz2
yuzu-fedd857054fb33521ee8e887a88d54cfc69c71fd.tar.lz
yuzu-fedd857054fb33521ee8e887a88d54cfc69c71fd.tar.xz
yuzu-fedd857054fb33521ee8e887a88d54cfc69c71fd.tar.zst
yuzu-fedd857054fb33521ee8e887a88d54cfc69c71fd.zip
-rw-r--r--src/core/frontend/applets/controller.cpp2
-rw-r--r--src/core/frontend/applets/controller.h6
-rw-r--r--src/yuzu/applets/qt_controller.cpp2
-rw-r--r--src/yuzu/applets/qt_controller.h4
4 files changed, 8 insertions, 6 deletions
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<void()> 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<void()>;
+
virtual ~ControllerApplet();
- virtual void ReconfigureControllers(std::function<void()> 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<void()> callback,
+ void ReconfigureControllers(ReconfigureCallback callback,
const ControllerParameters& parameters) const override;
private:
diff --git a/src/yuzu/applets/qt_controller.cpp b/src/yuzu/applets/qt_controller.cpp
index 12efdc216..c30b54499 100644
--- a/src/yuzu/applets/qt_controller.cpp
+++ b/src/yuzu/applets/qt_controller.cpp
@@ -685,7 +685,7 @@ QtControllerSelector::QtControllerSelector(GMainWindow& parent) {
QtControllerSelector::~QtControllerSelector() = default;
void QtControllerSelector::ReconfigureControllers(
- std::function<void()> callback_, const Core::Frontend::ControllerParameters& parameters) const {
+ ReconfigureCallback callback_, const Core::Frontend::ControllerParameters& parameters) const {
callback = std::move(callback_);
emit MainWindowReconfigureControllers(parameters);
}
diff --git a/src/yuzu/applets/qt_controller.h b/src/yuzu/applets/qt_controller.h
index cf948d2b5..16e99f507 100644
--- a/src/yuzu/applets/qt_controller.h
+++ b/src/yuzu/applets/qt_controller.h
@@ -157,7 +157,7 @@ public:
~QtControllerSelector() override;
void ReconfigureControllers(
- std::function<void()> callback_,
+ ReconfigureCallback callback_,
const Core::Frontend::ControllerParameters& parameters) const override;
signals:
@@ -167,5 +167,5 @@ signals:
private:
void MainWindowReconfigureFinished();
- mutable std::function<void()> callback;
+ mutable ReconfigureCallback callback;
};