diff options
Diffstat (limited to 'src/core/frontend')
-rw-r--r-- | src/core/frontend/applets/controller.cpp | 2 | ||||
-rw-r--r-- | src/core/frontend/applets/controller.h | 2 | ||||
-rw-r--r-- | src/core/frontend/applets/profile_select.cpp | 3 | ||||
-rw-r--r-- | src/core/frontend/applets/profile_select.h | 16 |
4 files changed, 17 insertions, 6 deletions
diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp index 8e586e938..3300d4f79 100644 --- a/src/core/frontend/applets/controller.cpp +++ b/src/core/frontend/applets/controller.cpp @@ -71,7 +71,7 @@ void DefaultControllerApplet::ReconfigureControllers(ReconfigureCallback callbac } } - callback(); + callback(true); } } // namespace Core::Frontend diff --git a/src/core/frontend/applets/controller.h b/src/core/frontend/applets/controller.h index 5c488387d..19a2db6bf 100644 --- a/src/core/frontend/applets/controller.h +++ b/src/core/frontend/applets/controller.h @@ -37,7 +37,7 @@ struct ControllerParameters { class ControllerApplet : public Applet { public: - using ReconfigureCallback = std::function<void()>; + using ReconfigureCallback = std::function<void(bool)>; virtual ~ControllerApplet(); diff --git a/src/core/frontend/applets/profile_select.cpp b/src/core/frontend/applets/profile_select.cpp index 910d20c0d..c18f17a36 100644 --- a/src/core/frontend/applets/profile_select.cpp +++ b/src/core/frontend/applets/profile_select.cpp @@ -11,7 +11,8 @@ ProfileSelectApplet::~ProfileSelectApplet() = default; void DefaultProfileSelectApplet::Close() const {} -void DefaultProfileSelectApplet::SelectProfile(SelectProfileCallback callback) const { +void DefaultProfileSelectApplet::SelectProfile(SelectProfileCallback callback, + const ProfileSelectParameters& parameters) const { Service::Account::ProfileManager manager; callback(manager.GetUser(Settings::values.current_user.GetValue()).value_or(Common::UUID{})); LOG_INFO(Service_ACC, "called, selecting current user instead of prompting..."); diff --git a/src/core/frontend/applets/profile_select.h b/src/core/frontend/applets/profile_select.h index 76e963535..92e2737ea 100644 --- a/src/core/frontend/applets/profile_select.h +++ b/src/core/frontend/applets/profile_select.h @@ -5,25 +5,35 @@ #include <functional> #include <optional> -#include "common/uuid.h" +#include "common/uuid.h" #include "core/frontend/applets/applet.h" +#include "core/hle/service/am/applets/applet_profile_select.h" namespace Core::Frontend { +struct ProfileSelectParameters { + Service::AM::Applets::UiMode mode; + std::array<Common::UUID, 8> invalid_uid_list; + Service::AM::Applets::UiSettingsDisplayOptions display_options; + Service::AM::Applets::UserSelectionPurpose purpose; +}; + class ProfileSelectApplet : public Applet { public: using SelectProfileCallback = std::function<void(std::optional<Common::UUID>)>; virtual ~ProfileSelectApplet(); - virtual void SelectProfile(SelectProfileCallback callback) const = 0; + virtual void SelectProfile(SelectProfileCallback callback, + const ProfileSelectParameters& parameters) const = 0; }; class DefaultProfileSelectApplet final : public ProfileSelectApplet { public: void Close() const override; - void SelectProfile(SelectProfileCallback callback) const override; + void SelectProfile(SelectProfileCallback callback, + const ProfileSelectParameters& parameters) const override; }; } // namespace Core::Frontend |