summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-03-17 08:01:03 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2022-03-22 04:57:31 +0100
commite05e6853faf8563702963f384fb1486cda77c841 (patch)
tree6e18e446b74c4068e93428b09a604e204bb8043d /src
parentMerge pull request #8067 from ameerj/qt-browser-include (diff)
downloadyuzu-e05e6853faf8563702963f384fb1486cda77c841.tar
yuzu-e05e6853faf8563702963f384fb1486cda77c841.tar.gz
yuzu-e05e6853faf8563702963f384fb1486cda77c841.tar.bz2
yuzu-e05e6853faf8563702963f384fb1486cda77c841.tar.lz
yuzu-e05e6853faf8563702963f384fb1486cda77c841.tar.xz
yuzu-e05e6853faf8563702963f384fb1486cda77c841.tar.zst
yuzu-e05e6853faf8563702963f384fb1486cda77c841.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt8
-rw-r--r--src/core/frontend/applets/mii_edit.cpp (renamed from src/core/frontend/applets/mii.cpp)9
-rw-r--r--src/core/frontend/applets/mii_edit.h (renamed from src/core/frontend/applets/mii.h)6
-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
-rw-r--r--src/yuzu/main.cpp4
8 files changed, 49 insertions, 47 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 1d4e92edb..f7dd4294f 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -122,8 +122,8 @@ add_library(core STATIC
frontend/applets/error.h
frontend/applets/general_frontend.cpp
frontend/applets/general_frontend.h
- frontend/applets/mii.cpp
- frontend/applets/mii.h
+ frontend/applets/mii_edit.cpp
+ frontend/applets/mii_edit.h
frontend/applets/profile_select.cpp
frontend/applets/profile_select.h
frontend/applets/software_keyboard.cpp
@@ -306,8 +306,8 @@ add_library(core STATIC
hle/service/am/applets/applet_error.h
hle/service/am/applets/applet_general_backend.cpp
hle/service/am/applets/applet_general_backend.h
- hle/service/am/applets/applet_mii.cpp
- hle/service/am/applets/applet_mii.h
+ hle/service/am/applets/applet_mii_edit.cpp
+ hle/service/am/applets/applet_mii_edit.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/frontend/applets/mii.cpp b/src/core/frontend/applets/mii_edit.cpp
index 1c05ff412..948d66f3d 100644
--- a/src/core/frontend/applets/mii.cpp
+++ b/src/core/frontend/applets/mii_edit.cpp
@@ -3,16 +3,17 @@
// Refer to the license.txt file included.
#include "common/logging/log.h"
-#include "core/frontend/applets/mii.h"
+#include "core/frontend/applets/mii_edit.h"
namespace Core::Frontend {
-MiiApplet::~MiiApplet() = default;
+MiiEditApplet::~MiiEditApplet() = default;
-void DefaultMiiApplet::ShowMii(
+void DefaultMiiEditApplet::ShowMii(
const MiiParameters& parameters,
const std::function<void(const Core::Frontend::MiiParameters& parameters)> callback) const {
- LOG_INFO(Service_HID, "(STUBBED) called");
+ LOG_WARNING(Service_AM, "(STUBBED) called");
+
callback(parameters);
}
diff --git a/src/core/frontend/applets/mii.h b/src/core/frontend/applets/mii_edit.h
index 11ba8a359..0d5bb69a2 100644
--- a/src/core/frontend/applets/mii.h
+++ b/src/core/frontend/applets/mii_edit.h
@@ -15,16 +15,16 @@ struct MiiParameters {
Service::Mii::MiiInfo mii_data{};
};
-class MiiApplet {
+class MiiEditApplet {
public:
- virtual ~MiiApplet();
+ virtual ~MiiEditApplet();
virtual void ShowMii(const MiiParameters& parameters,
const std::function<void(const Core::Frontend::MiiParameters& parameters)>
callback) const = 0;
};
-class DefaultMiiApplet final : public MiiApplet {
+class DefaultMiiEditApplet final : public MiiEditApplet {
public:
void ShowMii(const MiiParameters& parameters,
const std::function<void(const Core::Frontend::MiiParameters& parameters)>
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;
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index ecd2f9f24..f2182d901 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -24,7 +24,7 @@
#include "core/file_sys/vfs_real.h"
#include "core/frontend/applets/controller.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/software_keyboard.h"
#include "core/hid/emulated_controller.h"
#include "core/hid/hid_core.h"
@@ -1280,8 +1280,8 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p
system->SetAppletFrontendSet({
std::make_unique<QtControllerSelector>(*this), // Controller Selector
std::make_unique<QtErrorDisplay>(*this), // Error Display
+ nullptr, // Mii Editor
nullptr, // Parental Controls
- nullptr, // Mii editor
nullptr, // Photo Viewer
std::make_unique<QtProfileSelector>(*this), // Profile Selector
std::make_unique<QtSoftwareKeyboard>(*this), // Software Keyboard