diff options
author | bunnei <bunneidev@gmail.com> | 2022-03-17 05:37:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-17 05:37:53 +0100 |
commit | f55af65e8214f50792d967e481ab612b33c7c3b2 (patch) | |
tree | 8ea92f7550f9e6ba5420b4b7d94827ae6724a4a3 /src/core/frontend | |
parent | Merge pull request #8013 from bunnei/kernel-slab-rework-v2 (diff) | |
parent | applet: mii: Simple implementation of mii applet (diff) | |
download | yuzu-f55af65e8214f50792d967e481ab612b33c7c3b2.tar yuzu-f55af65e8214f50792d967e481ab612b33c7c3b2.tar.gz yuzu-f55af65e8214f50792d967e481ab612b33c7c3b2.tar.bz2 yuzu-f55af65e8214f50792d967e481ab612b33c7c3b2.tar.lz yuzu-f55af65e8214f50792d967e481ab612b33c7c3b2.tar.xz yuzu-f55af65e8214f50792d967e481ab612b33c7c3b2.tar.zst yuzu-f55af65e8214f50792d967e481ab612b33c7c3b2.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/frontend/applets/mii.cpp | 19 | ||||
-rw-r--r-- | src/core/frontend/applets/mii.h | 35 |
2 files changed, 54 insertions, 0 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 |