summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CMakeLists.txt1
-rw-r--r--src/core/hle/service/am/applets/applet_mii_edit.cpp3
-rw-r--r--src/core/hle/service/am/applets/applet_mii_edit.h58
-rw-r--r--src/core/hle/service/am/applets/applet_mii_edit_types.h62
4 files changed, 70 insertions, 54 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index f7dd4294f..a6f442316 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -308,6 +308,7 @@ add_library(core STATIC
hle/service/am/applets/applet_general_backend.h
hle/service/am/applets/applet_mii_edit.cpp
hle/service/am/applets/applet_mii_edit.h
+ hle/service/am/applets/applet_mii_edit_types.h
hle/service/am/applets/applet_profile_select.cpp
hle/service/am/applets/applet_profile_select.h
hle/service/am/applets/applet_software_keyboard.cpp
diff --git a/src/core/hle/service/am/applets/applet_mii_edit.cpp b/src/core/hle/service/am/applets/applet_mii_edit.cpp
index ec57d98bd..769c3c3eb 100644
--- a/src/core/hle/service/am/applets/applet_mii_edit.cpp
+++ b/src/core/hle/service/am/applets/applet_mii_edit.cpp
@@ -8,6 +8,7 @@
#include "core/frontend/applets/mii_edit.h"
#include "core/hle/service/am/am.h"
#include "core/hle/service/am/applets/applet_mii_edit.h"
+#include "core/hle/service/mii/mii_manager.h"
#include "core/reporter.h"
namespace Service::AM::Applets {
@@ -89,7 +90,7 @@ void MiiEdit::DisplayCompleted(const Core::Frontend::MiiParameters& parameters)
std::vector<u8> reply(sizeof(AppletOutputForCharInfoEditing));
output_data = {
- .result = ResultSuccess,
+ .result = 0,
.mii_data = parameters.mii_data,
};
diff --git a/src/core/hle/service/am/applets/applet_mii_edit.h b/src/core/hle/service/am/applets/applet_mii_edit.h
index 828f28da4..2b4b27c8f 100644
--- a/src/core/hle/service/am/applets/applet_mii_edit.h
+++ b/src/core/hle/service/am/applets/applet_mii_edit.h
@@ -4,65 +4,16 @@
#pragma once
-#include <array>
-
#include "core/hle/result.h"
+#include "core/hle/service/am/applets/applet_mii_edit_types.h"
#include "core/hle/service/am/applets/applets.h"
-#include "core/hle/service/mii/mii_manager.h"
namespace Core {
class System;
-}
+} // namespace Core
namespace Service::AM::Applets {
-// This is nn::mii::AppletMode
-enum class MiiAppletMode : u32 {
- ShowMiiEdit = 0,
- AppendMii = 1,
- AppendMiiImage = 2,
- UpdateMiiImage = 3,
- CreateMii = 4,
- EditMii = 5,
-};
-
-struct MiiCharInfo {
- Service::Mii::MiiInfo mii_data{};
- INSERT_PADDING_BYTES(0x28);
-};
-static_assert(sizeof(MiiCharInfo) == 0x80, "MiiCharInfo has incorrect size.");
-
-// This is nn::mii::AppletInput
-struct MiiAppletInput {
- s32 version{};
- MiiAppletMode applet_mode{};
- u32 special_mii_key_code{};
- union {
- std::array<Common::UUID, 8> valid_uuid;
- MiiCharInfo mii_char_info;
- };
- Common::UUID used_uuid;
- INSERT_PADDING_BYTES(0x64);
-};
-static_assert(sizeof(MiiAppletInput) == 0x100, "MiiAppletInput has incorrect size.");
-
-// This is nn::mii::AppletOutput
-struct MiiAppletOutput {
- ResultCode result{ResultSuccess};
- s32 index{};
- INSERT_PADDING_BYTES(0x18);
-};
-static_assert(sizeof(MiiAppletOutput) == 0x20, "MiiAppletOutput has incorrect size.");
-
-// This is nn::mii::AppletOutputForCharInfoEditing
-struct AppletOutputForCharInfoEditing {
- ResultCode result{ResultSuccess};
- Service::Mii::MiiInfo mii_data{};
- INSERT_PADDING_BYTES(0x24);
-};
-static_assert(sizeof(AppletOutputForCharInfoEditing) == 0x80,
- "AppletOutputForCharInfoEditing has incorrect size.");
-
class MiiEdit final : public Applet {
public:
explicit MiiEdit(Core::System& system_, LibraryAppletMode applet_mode_,
@@ -80,11 +31,12 @@ public:
private:
const Core::Frontend::MiiEditApplet& frontend;
+ Core::System& system;
+
MiiAppletInput input_data{};
AppletOutputForCharInfoEditing output_data{};
- bool is_complete = false;
- Core::System& system;
+ bool is_complete{false};
};
} // namespace Service::AM::Applets
diff --git a/src/core/hle/service/am/applets/applet_mii_edit_types.h b/src/core/hle/service/am/applets/applet_mii_edit_types.h
new file mode 100644
index 000000000..7b8b35254
--- /dev/null
+++ b/src/core/hle/service/am/applets/applet_mii_edit_types.h
@@ -0,0 +1,62 @@
+// Copyright 2022 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <array>
+
+#include "common/common_funcs.h"
+#include "common/common_types.h"
+#include "core/hle/service/mii/types.h"
+
+namespace Service::AM::Applets {
+
+// This is nn::mii::AppletMode
+enum class MiiAppletMode : u32 {
+ ShowMiiEdit = 0,
+ AppendMii = 1,
+ AppendMiiImage = 2,
+ UpdateMiiImage = 3,
+ CreateMii = 4,
+ EditMii = 5,
+};
+
+struct MiiCharInfo {
+ Service::Mii::MiiInfo mii_data{};
+ INSERT_PADDING_BYTES(0x28);
+};
+static_assert(sizeof(MiiCharInfo) == 0x80, "MiiCharInfo has incorrect size.");
+
+// This is nn::mii::AppletInput
+struct MiiAppletInput {
+ s32 version{};
+ MiiAppletMode applet_mode{};
+ u32 special_mii_key_code{};
+ union {
+ std::array<Common::UUID, 8> valid_uuid;
+ MiiCharInfo mii_char_info;
+ };
+ Common::UUID used_uuid;
+ INSERT_PADDING_BYTES(0x64);
+};
+static_assert(sizeof(MiiAppletInput) == 0x100, "MiiAppletInput has incorrect size.");
+
+// This is nn::mii::AppletOutput
+struct MiiAppletOutput {
+ u32 result{};
+ s32 index{};
+ INSERT_PADDING_BYTES(0x18);
+};
+static_assert(sizeof(MiiAppletOutput) == 0x20, "MiiAppletOutput has incorrect size.");
+
+// This is nn::mii::AppletOutputForCharInfoEditing
+struct AppletOutputForCharInfoEditing {
+ u32 result{};
+ Service::Mii::MiiInfo mii_data{};
+ INSERT_PADDING_BYTES(0x24);
+};
+static_assert(sizeof(AppletOutputForCharInfoEditing) == 0x80,
+ "AppletOutputForCharInfoEditing has incorrect size.");
+
+} // namespace Service::AM::Applets