mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
applets: Rename Mii to MiiEdit
This commit is contained in:
parent
f83cd2e8b9
commit
e05e6853fa
8 changed files with 49 additions and 47 deletions
|
@ -122,8 +122,8 @@ add_library(core STATIC
|
||||||
frontend/applets/error.h
|
frontend/applets/error.h
|
||||||
frontend/applets/general_frontend.cpp
|
frontend/applets/general_frontend.cpp
|
||||||
frontend/applets/general_frontend.h
|
frontend/applets/general_frontend.h
|
||||||
frontend/applets/mii.cpp
|
frontend/applets/mii_edit.cpp
|
||||||
frontend/applets/mii.h
|
frontend/applets/mii_edit.h
|
||||||
frontend/applets/profile_select.cpp
|
frontend/applets/profile_select.cpp
|
||||||
frontend/applets/profile_select.h
|
frontend/applets/profile_select.h
|
||||||
frontend/applets/software_keyboard.cpp
|
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_error.h
|
||||||
hle/service/am/applets/applet_general_backend.cpp
|
hle/service/am/applets/applet_general_backend.cpp
|
||||||
hle/service/am/applets/applet_general_backend.h
|
hle/service/am/applets/applet_general_backend.h
|
||||||
hle/service/am/applets/applet_mii.cpp
|
hle/service/am/applets/applet_mii_edit.cpp
|
||||||
hle/service/am/applets/applet_mii.h
|
hle/service/am/applets/applet_mii_edit.h
|
||||||
hle/service/am/applets/applet_profile_select.cpp
|
hle/service/am/applets/applet_profile_select.cpp
|
||||||
hle/service/am/applets/applet_profile_select.h
|
hle/service/am/applets/applet_profile_select.h
|
||||||
hle/service/am/applets/applet_software_keyboard.cpp
|
hle/service/am/applets/applet_software_keyboard.cpp
|
||||||
|
|
|
@ -3,16 +3,17 @@
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/frontend/applets/mii.h"
|
#include "core/frontend/applets/mii_edit.h"
|
||||||
|
|
||||||
namespace Core::Frontend {
|
namespace Core::Frontend {
|
||||||
|
|
||||||
MiiApplet::~MiiApplet() = default;
|
MiiEditApplet::~MiiEditApplet() = default;
|
||||||
|
|
||||||
void DefaultMiiApplet::ShowMii(
|
void DefaultMiiEditApplet::ShowMii(
|
||||||
const MiiParameters& parameters,
|
const MiiParameters& parameters,
|
||||||
const std::function<void(const Core::Frontend::MiiParameters& parameters)> callback) const {
|
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);
|
callback(parameters);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,16 +15,16 @@ struct MiiParameters {
|
||||||
Service::Mii::MiiInfo mii_data{};
|
Service::Mii::MiiInfo mii_data{};
|
||||||
};
|
};
|
||||||
|
|
||||||
class MiiApplet {
|
class MiiEditApplet {
|
||||||
public:
|
public:
|
||||||
virtual ~MiiApplet();
|
virtual ~MiiEditApplet();
|
||||||
|
|
||||||
virtual void ShowMii(const MiiParameters& parameters,
|
virtual void ShowMii(const MiiParameters& parameters,
|
||||||
const std::function<void(const Core::Frontend::MiiParameters& parameters)>
|
const std::function<void(const Core::Frontend::MiiParameters& parameters)>
|
||||||
callback) const = 0;
|
callback) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DefaultMiiApplet final : public MiiApplet {
|
class DefaultMiiEditApplet final : public MiiEditApplet {
|
||||||
public:
|
public:
|
||||||
void ShowMii(const MiiParameters& parameters,
|
void ShowMii(const MiiParameters& parameters,
|
||||||
const std::function<void(const Core::Frontend::MiiParameters& parameters)>
|
const std::function<void(const Core::Frontend::MiiParameters& parameters)>
|
|
@ -5,19 +5,20 @@
|
||||||
#include "common/assert.h"
|
#include "common/assert.h"
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/core.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/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 {
|
namespace Service::AM::Applets {
|
||||||
|
|
||||||
Mii::Mii(Core::System& system_, LibraryAppletMode applet_mode_,
|
MiiEdit::MiiEdit(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||||
const Core::Frontend::MiiApplet& frontend_)
|
const Core::Frontend::MiiEditApplet& frontend_)
|
||||||
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||||
|
|
||||||
Mii::~Mii() = default;
|
MiiEdit::~MiiEdit() = default;
|
||||||
|
|
||||||
void Mii::Initialize() {
|
void MiiEdit::Initialize() {
|
||||||
is_complete = false;
|
is_complete = false;
|
||||||
|
|
||||||
const auto storage = broker.PopNormalDataToApplet();
|
const auto storage = broker.PopNormalDataToApplet();
|
||||||
|
@ -29,19 +30,19 @@ void Mii::Initialize() {
|
||||||
std::memcpy(&input_data, data.data(), sizeof(MiiAppletInput));
|
std::memcpy(&input_data, data.data(), sizeof(MiiAppletInput));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Mii::TransactionComplete() const {
|
bool MiiEdit::TransactionComplete() const {
|
||||||
return is_complete;
|
return is_complete;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultCode Mii::GetStatus() const {
|
ResultCode MiiEdit::GetStatus() const {
|
||||||
return ResultSuccess;
|
return ResultSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mii::ExecuteInteractive() {
|
void MiiEdit::ExecuteInteractive() {
|
||||||
UNREACHABLE_MSG("Unexpected interactive applet data!");
|
UNREACHABLE_MSG("Unexpected interactive applet data!");
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mii::Execute() {
|
void MiiEdit::Execute() {
|
||||||
if (is_complete) {
|
if (is_complete) {
|
||||||
return;
|
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;
|
is_complete = true;
|
||||||
|
|
||||||
std::vector<u8> reply(sizeof(AppletOutputForCharInfoEditing));
|
std::vector<u8> reply(sizeof(AppletOutputForCharInfoEditing));
|
|
@ -63,11 +63,11 @@ struct AppletOutputForCharInfoEditing {
|
||||||
static_assert(sizeof(AppletOutputForCharInfoEditing) == 0x80,
|
static_assert(sizeof(AppletOutputForCharInfoEditing) == 0x80,
|
||||||
"AppletOutputForCharInfoEditing has incorrect size.");
|
"AppletOutputForCharInfoEditing has incorrect size.");
|
||||||
|
|
||||||
class Mii final : public Applet {
|
class MiiEdit final : public Applet {
|
||||||
public:
|
public:
|
||||||
explicit Mii(Core::System& system_, LibraryAppletMode applet_mode_,
|
explicit MiiEdit(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||||
const Core::Frontend::MiiApplet& frontend_);
|
const Core::Frontend::MiiEditApplet& frontend_);
|
||||||
~Mii() override;
|
~MiiEdit() override;
|
||||||
|
|
||||||
void Initialize() override;
|
void Initialize() override;
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@ public:
|
||||||
void DisplayCompleted(const Core::Frontend::MiiParameters& parameters);
|
void DisplayCompleted(const Core::Frontend::MiiParameters& parameters);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const Core::Frontend::MiiApplet& frontend;
|
const Core::Frontend::MiiEditApplet& frontend;
|
||||||
MiiAppletInput input_data{};
|
MiiAppletInput input_data{};
|
||||||
AppletOutputForCharInfoEditing output_data{};
|
AppletOutputForCharInfoEditing output_data{};
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "core/frontend/applets/controller.h"
|
#include "core/frontend/applets/controller.h"
|
||||||
#include "core/frontend/applets/error.h"
|
#include "core/frontend/applets/error.h"
|
||||||
#include "core/frontend/applets/general_frontend.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/profile_select.h"
|
||||||
#include "core/frontend/applets/software_keyboard.h"
|
#include "core/frontend/applets/software_keyboard.h"
|
||||||
#include "core/frontend/applets/web_browser.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_controller.h"
|
||||||
#include "core/hle/service/am/applets/applet_error.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_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_profile_select.h"
|
||||||
#include "core/hle/service/am/applets/applet_software_keyboard.h"
|
#include "core/hle/service/am/applets/applet_software_keyboard.h"
|
||||||
#include "core/hle/service/am/applets/applet_web_browser.h"
|
#include "core/hle/service/am/applets/applet_web_browser.h"
|
||||||
|
@ -173,12 +173,12 @@ void Applet::Initialize() {
|
||||||
AppletFrontendSet::AppletFrontendSet() = default;
|
AppletFrontendSet::AppletFrontendSet() = default;
|
||||||
|
|
||||||
AppletFrontendSet::AppletFrontendSet(ControllerApplet controller_applet, ErrorApplet error_applet,
|
AppletFrontendSet::AppletFrontendSet(ControllerApplet controller_applet, ErrorApplet error_applet,
|
||||||
|
MiiEdit mii_edit_,
|
||||||
ParentalControlsApplet parental_controls_applet,
|
ParentalControlsApplet parental_controls_applet,
|
||||||
MiiApplet mii_applet, PhotoViewer photo_viewer_,
|
PhotoViewer photo_viewer_, ProfileSelect profile_select_,
|
||||||
ProfileSelect profile_select_,
|
|
||||||
SoftwareKeyboard software_keyboard_, WebBrowser web_browser_)
|
SoftwareKeyboard software_keyboard_, WebBrowser web_browser_)
|
||||||
: controller{std::move(controller_applet)}, error{std::move(error_applet)},
|
: 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_)},
|
photo_viewer{std::move(photo_viewer_)}, profile_select{std::move(profile_select_)},
|
||||||
software_keyboard{std::move(software_keyboard_)}, web_browser{std::move(web_browser_)} {}
|
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);
|
frontend.error = std::move(set.error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (set.parental_controls != nullptr) {
|
if (set.mii_edit != nullptr) {
|
||||||
frontend.parental_controls = std::move(set.parental_controls);
|
frontend.mii_edit = std::move(set.mii_edit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (set.mii != nullptr) {
|
if (set.parental_controls != nullptr) {
|
||||||
frontend.mii = std::move(set.mii);
|
frontend.parental_controls = std::move(set.parental_controls);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (set.photo_viewer != nullptr) {
|
if (set.photo_viewer != nullptr) {
|
||||||
|
@ -245,15 +245,15 @@ void AppletManager::SetDefaultAppletsIfMissing() {
|
||||||
frontend.error = std::make_unique<Core::Frontend::DefaultErrorApplet>();
|
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) {
|
if (frontend.parental_controls == nullptr) {
|
||||||
frontend.parental_controls =
|
frontend.parental_controls =
|
||||||
std::make_unique<Core::Frontend::DefaultParentalControlsApplet>();
|
std::make_unique<Core::Frontend::DefaultParentalControlsApplet>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frontend.mii == nullptr) {
|
|
||||||
frontend.mii = std::make_unique<Core::Frontend::DefaultMiiApplet>();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (frontend.photo_viewer == nullptr) {
|
if (frontend.photo_viewer == nullptr) {
|
||||||
frontend.photo_viewer = std::make_unique<Core::Frontend::DefaultPhotoViewerApplet>();
|
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:
|
case AppletId::SoftwareKeyboard:
|
||||||
return std::make_shared<SoftwareKeyboard>(system, mode, *frontend.software_keyboard);
|
return std::make_shared<SoftwareKeyboard>(system, mode, *frontend.software_keyboard);
|
||||||
case AppletId::MiiEdit:
|
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::Web:
|
||||||
case AppletId::Shop:
|
case AppletId::Shop:
|
||||||
case AppletId::OfflineWeb:
|
case AppletId::OfflineWeb:
|
||||||
|
|
|
@ -20,8 +20,8 @@ namespace Core::Frontend {
|
||||||
class ControllerApplet;
|
class ControllerApplet;
|
||||||
class ECommerceApplet;
|
class ECommerceApplet;
|
||||||
class ErrorApplet;
|
class ErrorApplet;
|
||||||
|
class MiiEditApplet;
|
||||||
class ParentalControlsApplet;
|
class ParentalControlsApplet;
|
||||||
class MiiApplet;
|
|
||||||
class PhotoViewerApplet;
|
class PhotoViewerApplet;
|
||||||
class ProfileSelectApplet;
|
class ProfileSelectApplet;
|
||||||
class SoftwareKeyboardApplet;
|
class SoftwareKeyboardApplet;
|
||||||
|
@ -179,8 +179,8 @@ protected:
|
||||||
struct AppletFrontendSet {
|
struct AppletFrontendSet {
|
||||||
using ControllerApplet = std::unique_ptr<Core::Frontend::ControllerApplet>;
|
using ControllerApplet = std::unique_ptr<Core::Frontend::ControllerApplet>;
|
||||||
using ErrorApplet = std::unique_ptr<Core::Frontend::ErrorApplet>;
|
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 ParentalControlsApplet = std::unique_ptr<Core::Frontend::ParentalControlsApplet>;
|
||||||
using MiiApplet = std::unique_ptr<Core::Frontend::MiiApplet>;
|
|
||||||
using PhotoViewer = std::unique_ptr<Core::Frontend::PhotoViewerApplet>;
|
using PhotoViewer = std::unique_ptr<Core::Frontend::PhotoViewerApplet>;
|
||||||
using ProfileSelect = std::unique_ptr<Core::Frontend::ProfileSelectApplet>;
|
using ProfileSelect = std::unique_ptr<Core::Frontend::ProfileSelectApplet>;
|
||||||
using SoftwareKeyboard = std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet>;
|
using SoftwareKeyboard = std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet>;
|
||||||
|
@ -188,7 +188,7 @@ struct AppletFrontendSet {
|
||||||
|
|
||||||
AppletFrontendSet();
|
AppletFrontendSet();
|
||||||
AppletFrontendSet(ControllerApplet controller_applet, ErrorApplet error_applet,
|
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_,
|
PhotoViewer photo_viewer_, ProfileSelect profile_select_,
|
||||||
SoftwareKeyboard software_keyboard_, WebBrowser web_browser_);
|
SoftwareKeyboard software_keyboard_, WebBrowser web_browser_);
|
||||||
~AppletFrontendSet();
|
~AppletFrontendSet();
|
||||||
|
@ -201,8 +201,8 @@ struct AppletFrontendSet {
|
||||||
|
|
||||||
ControllerApplet controller;
|
ControllerApplet controller;
|
||||||
ErrorApplet error;
|
ErrorApplet error;
|
||||||
|
MiiEdit mii_edit;
|
||||||
ParentalControlsApplet parental_controls;
|
ParentalControlsApplet parental_controls;
|
||||||
MiiApplet mii;
|
|
||||||
PhotoViewer photo_viewer;
|
PhotoViewer photo_viewer;
|
||||||
ProfileSelect profile_select;
|
ProfileSelect profile_select;
|
||||||
SoftwareKeyboard software_keyboard;
|
SoftwareKeyboard software_keyboard;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "core/file_sys/vfs_real.h"
|
#include "core/file_sys/vfs_real.h"
|
||||||
#include "core/frontend/applets/controller.h"
|
#include "core/frontend/applets/controller.h"
|
||||||
#include "core/frontend/applets/general_frontend.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/frontend/applets/software_keyboard.h"
|
||||||
#include "core/hid/emulated_controller.h"
|
#include "core/hid/emulated_controller.h"
|
||||||
#include "core/hid/hid_core.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({
|
system->SetAppletFrontendSet({
|
||||||
std::make_unique<QtControllerSelector>(*this), // Controller Selector
|
std::make_unique<QtControllerSelector>(*this), // Controller Selector
|
||||||
std::make_unique<QtErrorDisplay>(*this), // Error Display
|
std::make_unique<QtErrorDisplay>(*this), // Error Display
|
||||||
|
nullptr, // Mii Editor
|
||||||
nullptr, // Parental Controls
|
nullptr, // Parental Controls
|
||||||
nullptr, // Mii editor
|
|
||||||
nullptr, // Photo Viewer
|
nullptr, // Photo Viewer
|
||||||
std::make_unique<QtProfileSelector>(*this), // Profile Selector
|
std::make_unique<QtProfileSelector>(*this), // Profile Selector
|
||||||
std::make_unique<QtSoftwareKeyboard>(*this), // Software Keyboard
|
std::make_unique<QtSoftwareKeyboard>(*this), // Software Keyboard
|
||||||
|
|
Loading…
Reference in a new issue