diff options
Diffstat (limited to 'src/core/frontend')
| -rw-r--r-- | src/core/frontend/applets/profile_select.cpp | 3 | ||||
| -rw-r--r-- | src/core/frontend/applets/profile_select.h | 16 |
2 files changed, 15 insertions, 4 deletions
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; | |||
| 11 | 11 | ||
| 12 | void DefaultProfileSelectApplet::Close() const {} | 12 | void DefaultProfileSelectApplet::Close() const {} |
| 13 | 13 | ||
| 14 | void DefaultProfileSelectApplet::SelectProfile(SelectProfileCallback callback) const { | 14 | void DefaultProfileSelectApplet::SelectProfile(SelectProfileCallback callback, |
| 15 | const ProfileSelectParameters& parameters) const { | ||
| 15 | Service::Account::ProfileManager manager; | 16 | Service::Account::ProfileManager manager; |
| 16 | callback(manager.GetUser(Settings::values.current_user.GetValue()).value_or(Common::UUID{})); | 17 | callback(manager.GetUser(Settings::values.current_user.GetValue()).value_or(Common::UUID{})); |
| 17 | LOG_INFO(Service_ACC, "called, selecting current user instead of prompting..."); | 18 | 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 @@ | |||
| 5 | 5 | ||
| 6 | #include <functional> | 6 | #include <functional> |
| 7 | #include <optional> | 7 | #include <optional> |
| 8 | #include "common/uuid.h" | ||
| 9 | 8 | ||
| 9 | #include "common/uuid.h" | ||
| 10 | #include "core/frontend/applets/applet.h" | 10 | #include "core/frontend/applets/applet.h" |
| 11 | #include "core/hle/service/am/applets/applet_profile_select.h" | ||
| 11 | 12 | ||
| 12 | namespace Core::Frontend { | 13 | namespace Core::Frontend { |
| 13 | 14 | ||
| 15 | struct ProfileSelectParameters { | ||
| 16 | Service::AM::Applets::UiMode mode; | ||
| 17 | std::array<Common::UUID, 8> invalid_uid_list; | ||
| 18 | Service::AM::Applets::UiSettingsDisplayOptions display_options; | ||
| 19 | Service::AM::Applets::UserSelectionPurpose purpose; | ||
| 20 | }; | ||
| 21 | |||
| 14 | class ProfileSelectApplet : public Applet { | 22 | class ProfileSelectApplet : public Applet { |
| 15 | public: | 23 | public: |
| 16 | using SelectProfileCallback = std::function<void(std::optional<Common::UUID>)>; | 24 | using SelectProfileCallback = std::function<void(std::optional<Common::UUID>)>; |
| 17 | 25 | ||
| 18 | virtual ~ProfileSelectApplet(); | 26 | virtual ~ProfileSelectApplet(); |
| 19 | 27 | ||
| 20 | virtual void SelectProfile(SelectProfileCallback callback) const = 0; | 28 | virtual void SelectProfile(SelectProfileCallback callback, |
| 29 | const ProfileSelectParameters& parameters) const = 0; | ||
| 21 | }; | 30 | }; |
| 22 | 31 | ||
| 23 | class DefaultProfileSelectApplet final : public ProfileSelectApplet { | 32 | class DefaultProfileSelectApplet final : public ProfileSelectApplet { |
| 24 | public: | 33 | public: |
| 25 | void Close() const override; | 34 | void Close() const override; |
| 26 | void SelectProfile(SelectProfileCallback callback) const override; | 35 | void SelectProfile(SelectProfileCallback callback, |
| 36 | const ProfileSelectParameters& parameters) const override; | ||
| 27 | }; | 37 | }; |
| 28 | 38 | ||
| 29 | } // namespace Core::Frontend | 39 | } // namespace Core::Frontend |