summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/am')
-rw-r--r--src/core/hle/service/am/applets/applet_mii_edit.cpp (renamed from src/core/hle/service/am/applets/applet_mii.cpp)23
-rw-r--r--src/core/hle/service/am/applets/applet_mii_edit.h (renamed from src/core/hle/service/am/applets/applet_mii.h)10
-rw-r--r--src/core/hle/service/am/applets/applets.cpp28
-rw-r--r--src/core/hle/service/am/applets/applets.h8
4 files changed, 35 insertions, 34 deletions
diff --git a/src/core/hle/service/am/applets/applet_mii.cpp b/src/core/hle/service/am/applets/applet_mii_edit.cpp
index facede97e..ec57d98bd 100644
--- a/src/core/hle/service/am/applets/applet_mii.cpp
+++ b/src/core/hle/service/am/applets/applet_mii_edit.cpp
@@ -5,19 +5,20 @@
#include "common/assert.h"
#include "common/logging/log.h"
#include "core/core.h"
-#include "core/frontend/applets/mii.h"
+#include "core/frontend/applets/mii_edit.h"
#include "core/hle/service/am/am.h"
-#include "core/hle/service/am/applets/applet_mii.h"
+#include "core/hle/service/am/applets/applet_mii_edit.h"
+#include "core/reporter.h"
namespace Service::AM::Applets {
-Mii::Mii(Core::System& system_, LibraryAppletMode applet_mode_,
- const Core::Frontend::MiiApplet& frontend_)
+MiiEdit::MiiEdit(Core::System& system_, LibraryAppletMode applet_mode_,
+ const Core::Frontend::MiiEditApplet& frontend_)
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
-Mii::~Mii() = default;
+MiiEdit::~MiiEdit() = default;
-void Mii::Initialize() {
+void MiiEdit::Initialize() {
is_complete = false;
const auto storage = broker.PopNormalDataToApplet();
@@ -29,19 +30,19 @@ void Mii::Initialize() {
std::memcpy(&input_data, data.data(), sizeof(MiiAppletInput));
}
-bool Mii::TransactionComplete() const {
+bool MiiEdit::TransactionComplete() const {
return is_complete;
}
-ResultCode Mii::GetStatus() const {
+ResultCode MiiEdit::GetStatus() const {
return ResultSuccess;
}
-void Mii::ExecuteInteractive() {
+void MiiEdit::ExecuteInteractive() {
UNREACHABLE_MSG("Unexpected interactive applet data!");
}
-void Mii::Execute() {
+void MiiEdit::Execute() {
if (is_complete) {
return;
}
@@ -83,7 +84,7 @@ void Mii::Execute() {
}
}
-void Mii::DisplayCompleted(const Core::Frontend::MiiParameters& parameters) {
+void MiiEdit::DisplayCompleted(const Core::Frontend::MiiParameters& parameters) {
is_complete = true;
std::vector<u8> reply(sizeof(AppletOutputForCharInfoEditing));
diff --git a/src/core/hle/service/am/applets/applet_mii.h b/src/core/hle/service/am/applets/applet_mii_edit.h
index 42326bfc2..828f28da4 100644
--- a/src/core/hle/service/am/applets/applet_mii.h
+++ b/src/core/hle/service/am/applets/applet_mii_edit.h
@@ -63,11 +63,11 @@ struct AppletOutputForCharInfoEditing {
static_assert(sizeof(AppletOutputForCharInfoEditing) == 0x80,
"AppletOutputForCharInfoEditing has incorrect size.");
-class Mii final : public Applet {
+class MiiEdit final : public Applet {
public:
- explicit Mii(Core::System& system_, LibraryAppletMode applet_mode_,
- const Core::Frontend::MiiApplet& frontend_);
- ~Mii() override;
+ explicit MiiEdit(Core::System& system_, LibraryAppletMode applet_mode_,
+ const Core::Frontend::MiiEditApplet& frontend_);
+ ~MiiEdit() override;
void Initialize() override;
@@ -79,7 +79,7 @@ public:
void DisplayCompleted(const Core::Frontend::MiiParameters& parameters);
private:
- const Core::Frontend::MiiApplet& frontend;
+ const Core::Frontend::MiiEditApplet& frontend;
MiiAppletInput input_data{};
AppletOutputForCharInfoEditing output_data{};
diff --git a/src/core/hle/service/am/applets/applets.cpp b/src/core/hle/service/am/applets/applets.cpp
index 79e62679d..1f4c9786a 100644
--- a/src/core/hle/service/am/applets/applets.cpp
+++ b/src/core/hle/service/am/applets/applets.cpp
@@ -9,7 +9,7 @@
#include "core/frontend/applets/controller.h"
#include "core/frontend/applets/error.h"
#include "core/frontend/applets/general_frontend.h"
-#include "core/frontend/applets/mii.h"
+#include "core/frontend/applets/mii_edit.h"
#include "core/frontend/applets/profile_select.h"
#include "core/frontend/applets/software_keyboard.h"
#include "core/frontend/applets/web_browser.h"
@@ -20,7 +20,7 @@
#include "core/hle/service/am/applets/applet_controller.h"
#include "core/hle/service/am/applets/applet_error.h"
#include "core/hle/service/am/applets/applet_general_backend.h"
-#include "core/hle/service/am/applets/applet_mii.h"
+#include "core/hle/service/am/applets/applet_mii_edit.h"
#include "core/hle/service/am/applets/applet_profile_select.h"
#include "core/hle/service/am/applets/applet_software_keyboard.h"
#include "core/hle/service/am/applets/applet_web_browser.h"
@@ -173,12 +173,12 @@ void Applet::Initialize() {
AppletFrontendSet::AppletFrontendSet() = default;
AppletFrontendSet::AppletFrontendSet(ControllerApplet controller_applet, ErrorApplet error_applet,
+ MiiEdit mii_edit_,
ParentalControlsApplet parental_controls_applet,
- MiiApplet mii_applet, PhotoViewer photo_viewer_,
- ProfileSelect profile_select_,
+ PhotoViewer photo_viewer_, ProfileSelect profile_select_,
SoftwareKeyboard software_keyboard_, WebBrowser web_browser_)
: controller{std::move(controller_applet)}, error{std::move(error_applet)},
- parental_controls{std::move(parental_controls_applet)}, mii{std::move(mii_applet)},
+ mii_edit{std::move(mii_edit_)}, parental_controls{std::move(parental_controls_applet)},
photo_viewer{std::move(photo_viewer_)}, profile_select{std::move(profile_select_)},
software_keyboard{std::move(software_keyboard_)}, web_browser{std::move(web_browser_)} {}
@@ -205,12 +205,12 @@ void AppletManager::SetAppletFrontendSet(AppletFrontendSet set) {
frontend.error = std::move(set.error);
}
- if (set.parental_controls != nullptr) {
- frontend.parental_controls = std::move(set.parental_controls);
+ if (set.mii_edit != nullptr) {
+ frontend.mii_edit = std::move(set.mii_edit);
}
- if (set.mii != nullptr) {
- frontend.mii = std::move(set.mii);
+ if (set.parental_controls != nullptr) {
+ frontend.parental_controls = std::move(set.parental_controls);
}
if (set.photo_viewer != nullptr) {
@@ -245,15 +245,15 @@ void AppletManager::SetDefaultAppletsIfMissing() {
frontend.error = std::make_unique<Core::Frontend::DefaultErrorApplet>();
}
+ if (frontend.mii_edit == nullptr) {
+ frontend.mii_edit = std::make_unique<Core::Frontend::DefaultMiiEditApplet>();
+ }
+
if (frontend.parental_controls == nullptr) {
frontend.parental_controls =
std::make_unique<Core::Frontend::DefaultParentalControlsApplet>();
}
- if (frontend.mii == nullptr) {
- frontend.mii = std::make_unique<Core::Frontend::DefaultMiiApplet>();
- }
-
if (frontend.photo_viewer == nullptr) {
frontend.photo_viewer = std::make_unique<Core::Frontend::DefaultPhotoViewerApplet>();
}
@@ -289,7 +289,7 @@ std::shared_ptr<Applet> AppletManager::GetApplet(AppletId id, LibraryAppletMode
case AppletId::SoftwareKeyboard:
return std::make_shared<SoftwareKeyboard>(system, mode, *frontend.software_keyboard);
case AppletId::MiiEdit:
- return std::make_shared<Mii>(system, mode, *frontend.mii);
+ return std::make_shared<MiiEdit>(system, mode, *frontend.mii_edit);
case AppletId::Web:
case AppletId::Shop:
case AppletId::OfflineWeb:
diff --git a/src/core/hle/service/am/applets/applets.h b/src/core/hle/service/am/applets/applets.h
index 0c44aec79..50a7bdceb 100644
--- a/src/core/hle/service/am/applets/applets.h
+++ b/src/core/hle/service/am/applets/applets.h
@@ -20,8 +20,8 @@ namespace Core::Frontend {
class ControllerApplet;
class ECommerceApplet;
class ErrorApplet;
+class MiiEditApplet;
class ParentalControlsApplet;
-class MiiApplet;
class PhotoViewerApplet;
class ProfileSelectApplet;
class SoftwareKeyboardApplet;
@@ -179,8 +179,8 @@ protected:
struct AppletFrontendSet {
using ControllerApplet = std::unique_ptr<Core::Frontend::ControllerApplet>;
using ErrorApplet = std::unique_ptr<Core::Frontend::ErrorApplet>;
+ using MiiEdit = std::unique_ptr<Core::Frontend::MiiEditApplet>;
using ParentalControlsApplet = std::unique_ptr<Core::Frontend::ParentalControlsApplet>;
- using MiiApplet = std::unique_ptr<Core::Frontend::MiiApplet>;
using PhotoViewer = std::unique_ptr<Core::Frontend::PhotoViewerApplet>;
using ProfileSelect = std::unique_ptr<Core::Frontend::ProfileSelectApplet>;
using SoftwareKeyboard = std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet>;
@@ -188,7 +188,7 @@ struct AppletFrontendSet {
AppletFrontendSet();
AppletFrontendSet(ControllerApplet controller_applet, ErrorApplet error_applet,
- ParentalControlsApplet parental_controls_applet, MiiApplet mii_applet,
+ MiiEdit mii_edit_, ParentalControlsApplet parental_controls_applet,
PhotoViewer photo_viewer_, ProfileSelect profile_select_,
SoftwareKeyboard software_keyboard_, WebBrowser web_browser_);
~AppletFrontendSet();
@@ -201,8 +201,8 @@ struct AppletFrontendSet {
ControllerApplet controller;
ErrorApplet error;
+ MiiEdit mii_edit;
ParentalControlsApplet parental_controls;
- MiiApplet mii;
PhotoViewer photo_viewer;
ProfileSelect profile_select;
SoftwareKeyboard software_keyboard;