diff options
Diffstat (limited to 'src/core/frontend/applets')
-rw-r--r-- | src/core/frontend/applets/mii.cpp | 19 | ||||
-rw-r--r-- | src/core/frontend/applets/mii.h | 35 | ||||
-rw-r--r-- | src/core/frontend/applets/profile_select.cpp | 3 |
3 files changed, 55 insertions, 2 deletions
diff --git a/src/core/frontend/applets/mii.cpp b/src/core/frontend/applets/mii.cpp new file mode 100644 index 000000000..1c05ff412 --- /dev/null +++ b/src/core/frontend/applets/mii.cpp @@ -0,0 +1,19 @@ +// Copyright 2022 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "common/logging/log.h" +#include "core/frontend/applets/mii.h" + +namespace Core::Frontend { + +MiiApplet::~MiiApplet() = default; + +void DefaultMiiApplet::ShowMii( + const MiiParameters& parameters, + const std::function<void(const Core::Frontend::MiiParameters& parameters)> callback) const { + LOG_INFO(Service_HID, "(STUBBED) called"); + callback(parameters); +} + +} // namespace Core::Frontend diff --git a/src/core/frontend/applets/mii.h b/src/core/frontend/applets/mii.h new file mode 100644 index 000000000..1fc40a9c6 --- /dev/null +++ b/src/core/frontend/applets/mii.h @@ -0,0 +1,35 @@ +// Copyright 2022 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include <functional> + +#include "core/hle/result.h" +#include "core/hle/service/mii/mii_manager.h" + +namespace Core::Frontend { + +struct MiiParameters { + bool is_editable; + Service::Mii::MiiInfo mii_data{}; +}; + +class MiiApplet { +public: + virtual ~MiiApplet(); + + virtual void ShowMii(const MiiParameters& parameters, + const std::function<void(const Core::Frontend::MiiParameters& parameters)> + callback) const = 0; +}; + +class DefaultMiiApplet final : public MiiApplet { +public: + void ShowMii(const MiiParameters& parameters, + const std::function<void(const Core::Frontend::MiiParameters& parameters)> + callback) const override; +}; + +} // namespace Core::Frontend diff --git a/src/core/frontend/applets/profile_select.cpp b/src/core/frontend/applets/profile_select.cpp index 3e4f90be2..4c58c310f 100644 --- a/src/core/frontend/applets/profile_select.cpp +++ b/src/core/frontend/applets/profile_select.cpp @@ -13,8 +13,7 @@ ProfileSelectApplet::~ProfileSelectApplet() = default; void DefaultProfileSelectApplet::SelectProfile( std::function<void(std::optional<Common::UUID>)> callback) const { Service::Account::ProfileManager manager; - callback(manager.GetUser(Settings::values.current_user.GetValue()) - .value_or(Common::UUID{Common::INVALID_UUID})); + callback(manager.GetUser(Settings::values.current_user.GetValue()).value_or(Common::UUID{})); LOG_INFO(Service_ACC, "called, selecting current user instead of prompting..."); } |