am: re-namespace frontend applets to frontend directory
This commit is contained in:
parent
a7e9d7842d
commit
dfb9fa0144
48 changed files with 394 additions and 473 deletions
|
@ -7,10 +7,10 @@
|
|||
#include "core/core_timing.h"
|
||||
#include "core/hle/service/acc/profile_manager.h"
|
||||
#include "core/hle/service/am/applet_manager.h"
|
||||
#include "core/hle/service/am/applets/applet_cabinet.h"
|
||||
#include "core/hle/service/am/applets/applet_controller.h"
|
||||
#include "core/hle/service/am/applets/applet_mii_edit_types.h"
|
||||
#include "core/hle/service/am/applets/applet_software_keyboard_types.h"
|
||||
#include "core/hle/service/am/frontend/applet_cabinet.h"
|
||||
#include "core/hle/service/am/frontend/applet_controller.h"
|
||||
#include "core/hle/service/am/frontend/applet_mii_edit_types.h"
|
||||
#include "core/hle/service/am/frontend/applet_software_keyboard_types.h"
|
||||
#include "hid_core/hid_types.h"
|
||||
|
||||
namespace Service::AM {
|
||||
|
@ -54,13 +54,13 @@ void PushInShowController(Core::System& system, AppletStorageChannel& channel) {
|
|||
const CommonArguments common_args = {
|
||||
.arguments_version = CommonArgumentVersion::Version3,
|
||||
.size = CommonArgumentSize::Version3,
|
||||
.library_version = static_cast<u32>(Applets::ControllerAppletVersion::Version8),
|
||||
.library_version = static_cast<u32>(Frontend::ControllerAppletVersion::Version8),
|
||||
.theme_color = ThemeColor::BasicBlack,
|
||||
.play_startup_sound = true,
|
||||
.system_tick = system.CoreTiming().GetClockTicks(),
|
||||
};
|
||||
|
||||
Applets::ControllerSupportArgNew user_args = {
|
||||
Frontend::ControllerSupportArgNew user_args = {
|
||||
.header = {.player_count_min = 1,
|
||||
.player_count_max = 4,
|
||||
.enable_take_over_connection = true,
|
||||
|
@ -73,13 +73,13 @@ void PushInShowController(Core::System& system, AppletStorageChannel& channel) {
|
|||
.explain_text = {},
|
||||
};
|
||||
|
||||
Applets::ControllerSupportArgPrivate private_args = {
|
||||
.arg_private_size = sizeof(Applets::ControllerSupportArgPrivate),
|
||||
.arg_size = sizeof(Applets::ControllerSupportArgNew),
|
||||
Frontend::ControllerSupportArgPrivate private_args = {
|
||||
.arg_private_size = sizeof(Frontend::ControllerSupportArgPrivate),
|
||||
.arg_size = sizeof(Frontend::ControllerSupportArgNew),
|
||||
.is_home_menu = true,
|
||||
.flag_1 = true,
|
||||
.mode = Applets::ControllerSupportMode::ShowControllerSupport,
|
||||
.caller = Applets::ControllerSupportCaller::
|
||||
.mode = Frontend::ControllerSupportMode::ShowControllerSupport,
|
||||
.caller = Frontend::ControllerSupportCaller::
|
||||
Application, // switchbrew: Always zero except with
|
||||
// ShowControllerFirmwareUpdateForSystem/ShowControllerKeyRemappingForSystem,
|
||||
// which sets this to the input param
|
||||
|
@ -103,16 +103,16 @@ void PushInShowCabinetData(Core::System& system, AppletStorageChannel& channel)
|
|||
const CommonArguments arguments{
|
||||
.arguments_version = CommonArgumentVersion::Version3,
|
||||
.size = CommonArgumentSize::Version3,
|
||||
.library_version = static_cast<u32>(Applets::CabinetAppletVersion::Version1),
|
||||
.library_version = static_cast<u32>(Frontend::CabinetAppletVersion::Version1),
|
||||
.theme_color = ThemeColor::BasicBlack,
|
||||
.play_startup_sound = true,
|
||||
.system_tick = system.CoreTiming().GetClockTicks(),
|
||||
};
|
||||
|
||||
const Applets::StartParamForAmiiboSettings amiibo_settings{
|
||||
const Frontend::StartParamForAmiiboSettings amiibo_settings{
|
||||
.param_1 = 0,
|
||||
.applet_mode = system.GetAppletManager().GetCabinetMode(),
|
||||
.flags = Applets::CabinetFlags::None,
|
||||
.applet_mode = system.GetFrontendAppletHolder().GetCabinetMode(),
|
||||
.flags = Frontend::CabinetFlags::None,
|
||||
.amiibo_settings_1 = 0,
|
||||
.device_handle = 0,
|
||||
.tag_info{},
|
||||
|
@ -130,16 +130,16 @@ void PushInShowCabinetData(Core::System& system, AppletStorageChannel& channel)
|
|||
|
||||
void PushInShowMiiEditData(Core::System& system, AppletStorageChannel& channel) {
|
||||
struct MiiEditV3 {
|
||||
Applets::MiiEditAppletInputCommon common;
|
||||
Applets::MiiEditAppletInputV3 input;
|
||||
Frontend::MiiEditAppletInputCommon common;
|
||||
Frontend::MiiEditAppletInputV3 input;
|
||||
};
|
||||
static_assert(sizeof(MiiEditV3) == 0x100, "MiiEditV3 has incorrect size.");
|
||||
|
||||
MiiEditV3 mii_arguments{
|
||||
.common =
|
||||
{
|
||||
.version = Applets::MiiEditAppletVersion::Version3,
|
||||
.applet_mode = Applets::MiiEditAppletMode::ShowMiiEdit,
|
||||
.version = Frontend::MiiEditAppletVersion::Version3,
|
||||
.applet_mode = Frontend::MiiEditAppletMode::ShowMiiEdit,
|
||||
},
|
||||
.input{},
|
||||
};
|
||||
|
@ -154,7 +154,7 @@ void PushInShowSoftwareKeyboard(Core::System& system, AppletStorageChannel& chan
|
|||
const CommonArguments arguments{
|
||||
.arguments_version = CommonArgumentVersion::Version3,
|
||||
.size = CommonArgumentSize::Version3,
|
||||
.library_version = static_cast<u32>(Applets::SwkbdAppletVersion::Version524301),
|
||||
.library_version = static_cast<u32>(Frontend::SwkbdAppletVersion::Version524301),
|
||||
.theme_color = ThemeColor::BasicBlack,
|
||||
.play_startup_sound = true,
|
||||
.system_tick = system.CoreTiming().GetClockTicks(),
|
||||
|
@ -162,21 +162,21 @@ void PushInShowSoftwareKeyboard(Core::System& system, AppletStorageChannel& chan
|
|||
|
||||
std::vector<char16_t> initial_string(0);
|
||||
|
||||
const Applets::SwkbdConfigCommon swkbd_config{
|
||||
.type = Applets::SwkbdType::Qwerty,
|
||||
const Frontend::SwkbdConfigCommon swkbd_config{
|
||||
.type = Frontend::SwkbdType::Qwerty,
|
||||
.ok_text{},
|
||||
.left_optional_symbol_key{},
|
||||
.right_optional_symbol_key{},
|
||||
.use_prediction = false,
|
||||
.key_disable_flags{},
|
||||
.initial_cursor_position = Applets::SwkbdInitialCursorPosition::Start,
|
||||
.initial_cursor_position = Frontend::SwkbdInitialCursorPosition::Start,
|
||||
.header_text{},
|
||||
.sub_text{},
|
||||
.guide_text{},
|
||||
.max_text_length = 500,
|
||||
.min_text_length = 0,
|
||||
.password_mode = Applets::SwkbdPasswordMode::Disabled,
|
||||
.text_draw_type = Applets::SwkbdTextDrawType::Box,
|
||||
.password_mode = Frontend::SwkbdPasswordMode::Disabled,
|
||||
.text_draw_type = Frontend::SwkbdTextDrawType::Box,
|
||||
.enable_return_button = true,
|
||||
.use_utf8 = false,
|
||||
.use_blur_background = true,
|
||||
|
@ -187,7 +187,7 @@ void PushInShowSoftwareKeyboard(Core::System& system, AppletStorageChannel& chan
|
|||
.use_text_check = false,
|
||||
};
|
||||
|
||||
Applets::SwkbdConfigNew swkbd_config_new{};
|
||||
Frontend::SwkbdConfigNew swkbd_config_new{};
|
||||
|
||||
std::vector<u8> argument_data(sizeof(arguments));
|
||||
std::vector<u8> swkbd_data(sizeof(swkbd_config) + sizeof(swkbd_config_new));
|
||||
|
@ -196,7 +196,7 @@ void PushInShowSoftwareKeyboard(Core::System& system, AppletStorageChannel& chan
|
|||
std::memcpy(argument_data.data(), &arguments, sizeof(arguments));
|
||||
std::memcpy(swkbd_data.data(), &swkbd_config, sizeof(swkbd_config));
|
||||
std::memcpy(swkbd_data.data() + sizeof(swkbd_config), &swkbd_config_new,
|
||||
sizeof(Applets::SwkbdConfigNew));
|
||||
sizeof(Frontend::SwkbdConfigNew));
|
||||
std::memcpy(work_buffer.data(), initial_string.data(),
|
||||
swkbd_config.initial_string_length * sizeof(char16_t));
|
||||
|
||||
|
|
|
@ -8,18 +8,18 @@
|
|||
#include "core/hle/kernel/k_event.h"
|
||||
#include "core/hle/kernel/k_readable_event.h"
|
||||
#include "core/hle/service/am/am.h"
|
||||
#include "core/hle/service/am/applets/applet_cabinet.h"
|
||||
#include "core/hle/service/am/frontend/applet_cabinet.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
#include "core/hle/service/mii/mii_manager.h"
|
||||
#include "core/hle/service/nfc/common/device.h"
|
||||
#include "hid_core/hid_core.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
Cabinet::Cabinet(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::CabinetApplet& frontend_)
|
||||
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_},
|
||||
service_context{system_, "CabinetApplet"} {
|
||||
: FrontendApplet{system_, applet_mode_}, frontend{frontend_},
|
||||
system{system_}, service_context{system_, "CabinetApplet"} {
|
||||
|
||||
availability_change_event =
|
||||
service_context.CreateEvent("CabinetApplet:AvailabilityChangeEvent");
|
||||
|
@ -30,7 +30,7 @@ Cabinet::~Cabinet() {
|
|||
};
|
||||
|
||||
void Cabinet::Initialize() {
|
||||
Applet::Initialize();
|
||||
FrontendApplet::Initialize();
|
||||
|
||||
LOG_INFO(Service_HID, "Initializing Cabinet Applet.");
|
||||
|
||||
|
@ -184,4 +184,4 @@ Result Cabinet::RequestExit() {
|
|||
R_SUCCEED();
|
||||
}
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -6,7 +6,7 @@
|
|||
#include <array>
|
||||
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/kernel_helpers.h"
|
||||
#include "core/hle/service/nfp/nfp_types.h"
|
||||
|
||||
|
@ -23,7 +23,7 @@ namespace Service::NFC {
|
|||
class NfcDevice;
|
||||
}
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
enum class CabinetAppletVersion : u32 {
|
||||
Version1 = 0x1,
|
||||
|
@ -84,7 +84,7 @@ static_assert(sizeof(ReturnValueForAmiiboSettings) == 0x188,
|
|||
"ReturnValueForAmiiboSettings is an invalid size");
|
||||
#pragma pack(pop)
|
||||
|
||||
class Cabinet final : public Applet {
|
||||
class Cabinet final : public FrontendApplet {
|
||||
public:
|
||||
explicit Cabinet(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::CabinetApplet& frontend_);
|
||||
|
@ -111,4 +111,4 @@ private:
|
|||
StartParamForAmiiboSettings applet_input_common{};
|
||||
};
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -11,14 +11,14 @@
|
|||
#include "core/frontend/applets/controller.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/am/am.h"
|
||||
#include "core/hle/service/am/applets/applet_controller.h"
|
||||
#include "core/hle/service/am/frontend/applet_controller.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
#include "hid_core/frontend/emulated_controller.h"
|
||||
#include "hid_core/hid_core.h"
|
||||
#include "hid_core/hid_types.h"
|
||||
#include "hid_core/resources/npad/npad.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
[[maybe_unused]] constexpr Result ResultControllerSupportCanceled{ErrorModule::HID, 3101};
|
||||
[[maybe_unused]] constexpr Result ResultControllerSupportNotSupportedNpadStyle{ErrorModule::HID,
|
||||
|
@ -49,12 +49,12 @@ static Core::Frontend::ControllerParameters ConvertToFrontendParameters(
|
|||
|
||||
Controller::Controller(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::ControllerApplet& frontend_)
|
||||
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
: FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
|
||||
Controller::~Controller() = default;
|
||||
|
||||
void Controller::Initialize() {
|
||||
Applet::Initialize();
|
||||
FrontendApplet::Initialize();
|
||||
|
||||
LOG_INFO(Service_HID, "Initializing Controller Applet.");
|
||||
|
||||
|
@ -270,4 +270,4 @@ Result Controller::RequestExit() {
|
|||
R_SUCCEED();
|
||||
}
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -9,7 +9,7 @@
|
|||
#include "common/common_funcs.h"
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
|
@ -19,7 +19,7 @@ namespace Core::HID {
|
|||
enum class NpadStyleSet : u32;
|
||||
}
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
using IdentificationColor = std::array<u8, 4>;
|
||||
using ExplainText = std::array<char, 0x81>;
|
||||
|
@ -122,7 +122,7 @@ struct ControllerSupportResultInfo {
|
|||
static_assert(sizeof(ControllerSupportResultInfo) == 0xC,
|
||||
"ControllerSupportResultInfo has incorrect size.");
|
||||
|
||||
class Controller final : public Applet {
|
||||
class Controller final : public FrontendApplet {
|
||||
public:
|
||||
explicit Controller(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::ControllerApplet& frontend_);
|
||||
|
@ -154,4 +154,4 @@ private:
|
|||
std::vector<u8> out_data;
|
||||
};
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -9,11 +9,11 @@
|
|||
#include "core/core.h"
|
||||
#include "core/frontend/applets/error.h"
|
||||
#include "core/hle/service/am/am.h"
|
||||
#include "core/hle/service/am/applets/applet_error.h"
|
||||
#include "core/hle/service/am/frontend/applet_error.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
#include "core/reporter.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
struct ErrorCode {
|
||||
u32 error_category{};
|
||||
|
@ -106,12 +106,12 @@ Result Decode64BitError(u64 error) {
|
|||
|
||||
Error::Error(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::ErrorApplet& frontend_)
|
||||
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
: FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
|
||||
Error::~Error() = default;
|
||||
|
||||
void Error::Initialize() {
|
||||
Applet::Initialize();
|
||||
FrontendApplet::Initialize();
|
||||
args = std::make_unique<ErrorArguments>();
|
||||
complete = false;
|
||||
|
||||
|
@ -220,4 +220,4 @@ Result Error::RequestExit() {
|
|||
R_SUCCEED();
|
||||
}
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -4,13 +4,13 @@
|
|||
#pragma once
|
||||
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
enum class ErrorAppletMode : u8 {
|
||||
ShowError = 0,
|
||||
|
@ -22,7 +22,7 @@ enum class ErrorAppletMode : u8 {
|
|||
ShowUpdateEula = 8,
|
||||
};
|
||||
|
||||
class Error final : public Applet {
|
||||
class Error final : public FrontendApplet {
|
||||
public:
|
||||
explicit Error(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::ErrorApplet& frontend_);
|
||||
|
@ -50,4 +50,4 @@ private:
|
|||
Core::System& system;
|
||||
};
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -5,14 +5,14 @@
|
|||
#include "common/hex_util.h"
|
||||
#include "common/logging/log.h"
|
||||
#include "core/core.h"
|
||||
#include "core/frontend/applets/general_frontend.h"
|
||||
#include "core/frontend/applets/general.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/am/am.h"
|
||||
#include "core/hle/service/am/applets/applet_general_backend.h"
|
||||
#include "core/hle/service/am/frontend/applet_general.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
#include "core/reporter.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
constexpr Result ERROR_INVALID_PIN{ErrorModule::PCTL, 221};
|
||||
|
||||
|
@ -36,12 +36,12 @@ static void LogCurrentStorage(AppletDataBroker& broker, std::string_view prefix)
|
|||
|
||||
Auth::Auth(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
Core::Frontend::ParentalControlsApplet& frontend_)
|
||||
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
: FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
|
||||
Auth::~Auth() = default;
|
||||
|
||||
void Auth::Initialize() {
|
||||
Applet::Initialize();
|
||||
FrontendApplet::Initialize();
|
||||
complete = false;
|
||||
|
||||
const auto storage = broker.PopNormalDataToApplet();
|
||||
|
@ -158,12 +158,12 @@ Result Auth::RequestExit() {
|
|||
|
||||
PhotoViewer::PhotoViewer(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::PhotoViewerApplet& frontend_)
|
||||
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
: FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
|
||||
PhotoViewer::~PhotoViewer() = default;
|
||||
|
||||
void PhotoViewer::Initialize() {
|
||||
Applet::Initialize();
|
||||
FrontendApplet::Initialize();
|
||||
complete = false;
|
||||
|
||||
const auto storage = broker.PopNormalDataToApplet();
|
||||
|
@ -214,13 +214,13 @@ Result PhotoViewer::RequestExit() {
|
|||
}
|
||||
|
||||
StubApplet::StubApplet(Core::System& system_, AppletId id_, LibraryAppletMode applet_mode_)
|
||||
: Applet{system_, applet_mode_}, id{id_}, system{system_} {}
|
||||
: FrontendApplet{system_, applet_mode_}, id{id_}, system{system_} {}
|
||||
|
||||
StubApplet::~StubApplet() = default;
|
||||
|
||||
void StubApplet::Initialize() {
|
||||
LOG_WARNING(Service_AM, "called (STUBBED)");
|
||||
Applet::Initialize();
|
||||
FrontendApplet::Initialize();
|
||||
|
||||
const auto data = broker.PeekDataToAppletForDebug();
|
||||
system.GetReporter().SaveUnimplementedAppletReport(
|
||||
|
@ -266,4 +266,4 @@ Result StubApplet::RequestExit() {
|
|||
R_SUCCEED();
|
||||
}
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
enum class AuthAppletType : u32 {
|
||||
ShowParentalAuthentication,
|
||||
|
@ -17,7 +17,7 @@ enum class AuthAppletType : u32 {
|
|||
ChangeParentalPasscode,
|
||||
};
|
||||
|
||||
class Auth final : public Applet {
|
||||
class Auth final : public FrontendApplet {
|
||||
public:
|
||||
explicit Auth(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
Core::Frontend::ParentalControlsApplet& frontend_);
|
||||
|
@ -49,7 +49,7 @@ enum class PhotoViewerAppletMode : u8 {
|
|||
AllApps = 1,
|
||||
};
|
||||
|
||||
class PhotoViewer final : public Applet {
|
||||
class PhotoViewer final : public FrontendApplet {
|
||||
public:
|
||||
explicit PhotoViewer(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::PhotoViewerApplet& frontend_);
|
||||
|
@ -71,7 +71,7 @@ private:
|
|||
Core::System& system;
|
||||
};
|
||||
|
||||
class StubApplet final : public Applet {
|
||||
class StubApplet final : public FrontendApplet {
|
||||
public:
|
||||
explicit StubApplet(Core::System& system_, AppletId id_, LibraryAppletMode applet_mode_);
|
||||
~StubApplet() override;
|
||||
|
@ -89,4 +89,4 @@ private:
|
|||
Core::System& system;
|
||||
};
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -6,17 +6,17 @@
|
|||
#include "core/core.h"
|
||||
#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/am/frontend/applet_mii_edit.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
#include "core/hle/service/mii/mii.h"
|
||||
#include "core/hle/service/mii/mii_manager.h"
|
||||
#include "core/hle/service/sm/sm.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
MiiEdit::MiiEdit(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::MiiEditApplet& frontend_)
|
||||
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
: FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
|
||||
MiiEdit::~MiiEdit() = default;
|
||||
|
||||
|
@ -178,4 +178,4 @@ Result MiiEdit::RequestExit() {
|
|||
R_SUCCEED();
|
||||
}
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -4,8 +4,8 @@
|
|||
#pragma once
|
||||
|
||||
#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/am/frontend/applet_mii_edit_types.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
|
@ -16,9 +16,9 @@ struct DatabaseSessionMetadata;
|
|||
class MiiManager;
|
||||
} // namespace Service::Mii
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
class MiiEdit final : public Applet {
|
||||
class MiiEdit final : public FrontendApplet {
|
||||
public:
|
||||
explicit MiiEdit(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::MiiEditApplet& frontend_);
|
||||
|
@ -49,4 +49,4 @@ private:
|
|||
Mii::DatabaseSessionMetadata metadata{};
|
||||
};
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -10,7 +10,7 @@
|
|||
#include "common/uuid.h"
|
||||
#include "core/hle/service/mii/types/char_info.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
enum class MiiEditAppletVersion : s32 {
|
||||
Version3 = 0x3, // 1.0.0 - 10.1.1
|
||||
|
@ -80,4 +80,4 @@ struct MiiEditAppletOutputForCharInfoEditing {
|
|||
static_assert(sizeof(MiiEditAppletOutputForCharInfoEditing) == 0x80,
|
||||
"MiiEditAppletOutputForCharInfoEditing has incorrect size.");
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -9,14 +9,14 @@
|
|||
#include "core/frontend/applets/profile_select.h"
|
||||
#include "core/hle/service/acc/errors.h"
|
||||
#include "core/hle/service/am/am.h"
|
||||
#include "core/hle/service/am/applets/applet_profile_select.h"
|
||||
#include "core/hle/service/am/frontend/applet_profile_select.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
ProfileSelect::ProfileSelect(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::ProfileSelectApplet& frontend_)
|
||||
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
: FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
|
||||
ProfileSelect::~ProfileSelect() = default;
|
||||
|
||||
|
@ -25,7 +25,7 @@ void ProfileSelect::Initialize() {
|
|||
status = ResultSuccess;
|
||||
final_data.clear();
|
||||
|
||||
Applet::Initialize();
|
||||
FrontendApplet::Initialize();
|
||||
profile_select_version = ProfileSelectAppletVersion{common_args.library_version};
|
||||
|
||||
const auto user_config_storage = broker.PopNormalDataToApplet();
|
||||
|
@ -121,4 +121,4 @@ Result ProfileSelect::RequestExit() {
|
|||
R_SUCCEED();
|
||||
}
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -8,13 +8,13 @@
|
|||
#include "common/common_funcs.h"
|
||||
#include "common/uuid.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
}
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
enum class ProfileSelectAppletVersion : u32 {
|
||||
Version1 = 0x1, // 1.0.0+
|
||||
|
@ -111,7 +111,7 @@ struct UiReturnArg {
|
|||
};
|
||||
static_assert(sizeof(UiReturnArg) == 0x18, "UiReturnArg has incorrect size.");
|
||||
|
||||
class ProfileSelect final : public Applet {
|
||||
class ProfileSelect final : public FrontendApplet {
|
||||
public:
|
||||
explicit ProfileSelect(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::ProfileSelectApplet& frontend_);
|
||||
|
@ -140,4 +140,4 @@ private:
|
|||
Core::System& system;
|
||||
};
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -5,10 +5,10 @@
|
|||
#include "core/core.h"
|
||||
#include "core/frontend/applets/software_keyboard.h"
|
||||
#include "core/hle/service/am/am.h"
|
||||
#include "core/hle/service/am/applets/applet_software_keyboard.h"
|
||||
#include "core/hle/service/am/frontend/applet_software_keyboard.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -44,12 +44,12 @@ void SetReplyBase(std::vector<u8>& reply, SwkbdState state, SwkbdReplyType reply
|
|||
|
||||
SoftwareKeyboard::SoftwareKeyboard(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
Core::Frontend::SoftwareKeyboardApplet& frontend_)
|
||||
: Applet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
: FrontendApplet{system_, applet_mode_}, frontend{frontend_}, system{system_} {}
|
||||
|
||||
SoftwareKeyboard::~SoftwareKeyboard() = default;
|
||||
|
||||
void SoftwareKeyboard::Initialize() {
|
||||
Applet::Initialize();
|
||||
FrontendApplet::Initialize();
|
||||
|
||||
LOG_INFO(Service_AM, "Initializing Software Keyboard Applet with LibraryAppletMode={}",
|
||||
applet_mode);
|
||||
|
@ -1274,4 +1274,4 @@ void SoftwareKeyboard::ReplyMovedCursorUtf8V2() {
|
|||
broker.PushInteractiveDataFromApplet(std::make_shared<IStorage>(system, std::move(reply)));
|
||||
}
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
#include "common/common_types.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/am/applets/applet_software_keyboard_types.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applet_software_keyboard_types.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
|
@ -17,9 +17,9 @@ struct KeyboardInitializeParameters;
|
|||
struct InlineAppearParameters;
|
||||
} // namespace Core::Frontend
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
class SoftwareKeyboard final : public Applet {
|
||||
class SoftwareKeyboard final : public FrontendApplet {
|
||||
public:
|
||||
explicit SoftwareKeyboard(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
Core::Frontend::SoftwareKeyboardApplet& frontend_);
|
||||
|
@ -184,4 +184,4 @@ private:
|
|||
Result status{ResultSuccess};
|
||||
};
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -11,7 +11,7 @@
|
|||
#include "common/swap.h"
|
||||
#include "common/uuid.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
constexpr std::size_t MAX_OK_TEXT_LENGTH = 8;
|
||||
constexpr std::size_t MAX_HEADER_TEXT_LENGTH = 64;
|
||||
|
@ -351,4 +351,4 @@ struct SwkbdDecidedEnterArg {
|
|||
};
|
||||
static_assert(sizeof(SwkbdDecidedEnterArg) == 0x4, "SwkbdDecidedEnterArg has incorrect size.");
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -19,13 +19,13 @@
|
|||
#include "core/frontend/applets/web_browser.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/am/am.h"
|
||||
#include "core/hle/service/am/applets/applet_web_browser.h"
|
||||
#include "core/hle/service/am/frontend/applet_web_browser.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
#include "core/hle/service/filesystem/filesystem.h"
|
||||
#include "core/hle/service/ns/iplatform_service_manager.h"
|
||||
#include "core/loader/loader.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -226,12 +226,12 @@ void ExtractSharedFonts(Core::System& system) {
|
|||
|
||||
WebBrowser::WebBrowser(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::WebBrowserApplet& frontend_)
|
||||
: Applet{system_, applet_mode_}, frontend(frontend_), system{system_} {}
|
||||
: FrontendApplet{system_, applet_mode_}, frontend(frontend_), system{system_} {}
|
||||
|
||||
WebBrowser::~WebBrowser() = default;
|
||||
|
||||
void WebBrowser::Initialize() {
|
||||
Applet::Initialize();
|
||||
FrontendApplet::Initialize();
|
||||
|
||||
LOG_INFO(Service_AM, "Initializing Web Browser Applet.");
|
||||
|
||||
|
@ -505,4 +505,4 @@ void WebBrowser::ExecuteLobby() {
|
|||
LOG_WARNING(Service_AM, "(STUBBED) called, Lobby Applet is not implemented");
|
||||
WebBrowserExit(WebExitReason::EndButtonPressed);
|
||||
}
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -9,8 +9,8 @@
|
|||
#include "common/common_types.h"
|
||||
#include "core/file_sys/vfs/vfs_types.h"
|
||||
#include "core/hle/result.h"
|
||||
#include "core/hle/service/am/applets/applet_web_browser_types.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applet_web_browser_types.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
|
||||
namespace Core {
|
||||
class System;
|
||||
|
@ -20,9 +20,9 @@ namespace FileSys {
|
|||
enum class ContentRecordType : u8;
|
||||
}
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
class WebBrowser final : public Applet {
|
||||
class WebBrowser final : public FrontendApplet {
|
||||
public:
|
||||
WebBrowser(Core::System& system_, LibraryAppletMode applet_mode_,
|
||||
const Core::Frontend::WebBrowserApplet& frontend_);
|
||||
|
@ -84,4 +84,4 @@ private:
|
|||
Core::System& system;
|
||||
};
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -11,7 +11,7 @@
|
|||
#include "common/common_types.h"
|
||||
#include "common/swap.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
enum class WebAppletVersion : u32_le {
|
||||
Version0 = 0x0, // Only used by WifiWebAuthApplet
|
||||
|
@ -174,4 +174,4 @@ static_assert(sizeof(WebCommonReturnValue) == 0x1010, "WebCommonReturnValue has
|
|||
|
||||
using WebArgInputTLVMap = std::unordered_map<WebArgInputTLVType, std::vector<u8>>;
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -8,7 +8,7 @@
|
|||
#include "core/frontend/applets/cabinet.h"
|
||||
#include "core/frontend/applets/controller.h"
|
||||
#include "core/frontend/applets/error.h"
|
||||
#include "core/frontend/applets/general_frontend.h"
|
||||
#include "core/frontend/applets/general.h"
|
||||
#include "core/frontend/applets/mii_edit.h"
|
||||
#include "core/frontend/applets/profile_select.h"
|
||||
#include "core/frontend/applets/software_keyboard.h"
|
||||
|
@ -18,19 +18,19 @@
|
|||
#include "core/hle/service/am/applet_ae.h"
|
||||
#include "core/hle/service/am/applet_message_queue.h"
|
||||
#include "core/hle/service/am/applet_oe.h"
|
||||
#include "core/hle/service/am/applets/applet_cabinet.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_general_backend.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"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applet_cabinet.h"
|
||||
#include "core/hle/service/am/frontend/applet_controller.h"
|
||||
#include "core/hle/service/am/frontend/applet_error.h"
|
||||
#include "core/hle/service/am/frontend/applet_general.h"
|
||||
#include "core/hle/service/am/frontend/applet_mii_edit.h"
|
||||
#include "core/hle/service/am/frontend/applet_profile_select.h"
|
||||
#include "core/hle/service/am/frontend/applet_software_keyboard.h"
|
||||
#include "core/hle/service/am/frontend/applet_web_browser.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
#include "core/hle/service/sm/sm.h"
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
|
||||
AppletDataBroker::AppletDataBroker(Core::System& system_, LibraryAppletMode applet_mode_)
|
||||
: system{system_}, applet_mode{applet_mode_},
|
||||
|
@ -156,12 +156,12 @@ Kernel::KReadableEvent& AppletDataBroker::GetStateChangedEvent() {
|
|||
return state_changed_event->GetReadableEvent();
|
||||
}
|
||||
|
||||
Applet::Applet(Core::System& system_, LibraryAppletMode applet_mode_)
|
||||
FrontendApplet::FrontendApplet(Core::System& system_, LibraryAppletMode applet_mode_)
|
||||
: broker{system_, applet_mode_}, applet_mode{applet_mode_} {}
|
||||
|
||||
Applet::~Applet() = default;
|
||||
FrontendApplet::~FrontendApplet() = default;
|
||||
|
||||
void Applet::Initialize() {
|
||||
void FrontendApplet::Initialize() {
|
||||
const auto common = broker.PopNormalDataToApplet();
|
||||
ASSERT(common != nullptr);
|
||||
|
||||
|
@ -173,9 +173,9 @@ void Applet::Initialize() {
|
|||
initialized = true;
|
||||
}
|
||||
|
||||
AppletFrontendSet::AppletFrontendSet() = default;
|
||||
FrontendAppletSet::FrontendAppletSet() = default;
|
||||
|
||||
AppletFrontendSet::AppletFrontendSet(CabinetApplet cabinet_applet,
|
||||
FrontendAppletSet::FrontendAppletSet(CabinetApplet cabinet_applet,
|
||||
ControllerApplet controller_applet, ErrorApplet error_applet,
|
||||
MiiEdit mii_edit_,
|
||||
ParentalControlsApplet parental_controls_applet,
|
||||
|
@ -187,29 +187,29 @@ AppletFrontendSet::AppletFrontendSet(CabinetApplet cabinet_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_)} {}
|
||||
|
||||
AppletFrontendSet::~AppletFrontendSet() = default;
|
||||
FrontendAppletSet::~FrontendAppletSet() = default;
|
||||
|
||||
AppletFrontendSet::AppletFrontendSet(AppletFrontendSet&&) noexcept = default;
|
||||
FrontendAppletSet::FrontendAppletSet(FrontendAppletSet&&) noexcept = default;
|
||||
|
||||
AppletFrontendSet& AppletFrontendSet::operator=(AppletFrontendSet&&) noexcept = default;
|
||||
FrontendAppletSet& FrontendAppletSet::operator=(FrontendAppletSet&&) noexcept = default;
|
||||
|
||||
AppletManager::AppletManager(Core::System& system_) : system{system_} {}
|
||||
FrontendAppletHolder::FrontendAppletHolder(Core::System& system_) : system{system_} {}
|
||||
|
||||
AppletManager::~AppletManager() = default;
|
||||
FrontendAppletHolder::~FrontendAppletHolder() = default;
|
||||
|
||||
const AppletFrontendSet& AppletManager::GetAppletFrontendSet() const {
|
||||
const FrontendAppletSet& FrontendAppletHolder::GetFrontendAppletSet() const {
|
||||
return frontend;
|
||||
}
|
||||
|
||||
NFP::CabinetMode AppletManager::GetCabinetMode() const {
|
||||
NFP::CabinetMode FrontendAppletHolder::GetCabinetMode() const {
|
||||
return cabinet_mode;
|
||||
}
|
||||
|
||||
AppletId AppletManager::GetCurrentAppletId() const {
|
||||
AppletId FrontendAppletHolder::GetCurrentAppletId() const {
|
||||
return current_applet_id;
|
||||
}
|
||||
|
||||
void AppletManager::SetAppletFrontendSet(AppletFrontendSet set) {
|
||||
void FrontendAppletHolder::SetFrontendAppletSet(FrontendAppletSet set) {
|
||||
if (set.cabinet != nullptr) {
|
||||
frontend.cabinet = std::move(set.cabinet);
|
||||
}
|
||||
|
@ -247,20 +247,20 @@ void AppletManager::SetAppletFrontendSet(AppletFrontendSet set) {
|
|||
}
|
||||
}
|
||||
|
||||
void AppletManager::SetCabinetMode(NFP::CabinetMode mode) {
|
||||
void FrontendAppletHolder::SetCabinetMode(NFP::CabinetMode mode) {
|
||||
cabinet_mode = mode;
|
||||
}
|
||||
|
||||
void AppletManager::SetCurrentAppletId(AppletId applet_id) {
|
||||
void FrontendAppletHolder::SetCurrentAppletId(AppletId applet_id) {
|
||||
current_applet_id = applet_id;
|
||||
}
|
||||
|
||||
void AppletManager::SetDefaultAppletFrontendSet() {
|
||||
void FrontendAppletHolder::SetDefaultAppletFrontendSet() {
|
||||
ClearAll();
|
||||
SetDefaultAppletsIfMissing();
|
||||
}
|
||||
|
||||
void AppletManager::SetDefaultAppletsIfMissing() {
|
||||
void FrontendAppletHolder::SetDefaultAppletsIfMissing() {
|
||||
if (frontend.cabinet == nullptr) {
|
||||
frontend.cabinet = std::make_unique<Core::Frontend::DefaultCabinetApplet>();
|
||||
}
|
||||
|
@ -301,11 +301,12 @@ void AppletManager::SetDefaultAppletsIfMissing() {
|
|||
}
|
||||
}
|
||||
|
||||
void AppletManager::ClearAll() {
|
||||
void FrontendAppletHolder::ClearAll() {
|
||||
frontend = {};
|
||||
}
|
||||
|
||||
std::shared_ptr<Applet> AppletManager::GetApplet(AppletId id, LibraryAppletMode mode) const {
|
||||
std::shared_ptr<FrontendApplet> FrontendAppletHolder::GetApplet(AppletId id,
|
||||
LibraryAppletMode mode) const {
|
||||
switch (id) {
|
||||
case AppletId::Auth:
|
||||
return std::make_shared<Auth>(system, mode, *frontend.parental_controls);
|
||||
|
@ -337,4 +338,4 @@ std::shared_ptr<Applet> AppletManager::GetApplet(AppletId id, LibraryAppletMode
|
|||
}
|
||||
}
|
||||
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
|
@ -7,7 +7,7 @@
|
|||
#include <queue>
|
||||
|
||||
#include "common/swap.h"
|
||||
#include "core/hle/service/kernel_helpers.h"
|
||||
#include "core/hle/service/am/applet.h"
|
||||
|
||||
union Result;
|
||||
|
||||
|
@ -42,90 +42,7 @@ namespace Service::AM {
|
|||
|
||||
class IStorage;
|
||||
|
||||
namespace Applets {
|
||||
|
||||
enum class AppletId : u32 {
|
||||
None = 0x00,
|
||||
Application = 0x01,
|
||||
OverlayDisplay = 0x02,
|
||||
QLaunch = 0x03,
|
||||
Starter = 0x04,
|
||||
Auth = 0x0A,
|
||||
Cabinet = 0x0B,
|
||||
Controller = 0x0C,
|
||||
DataErase = 0x0D,
|
||||
Error = 0x0E,
|
||||
NetConnect = 0x0F,
|
||||
ProfileSelect = 0x10,
|
||||
SoftwareKeyboard = 0x11,
|
||||
MiiEdit = 0x12,
|
||||
Web = 0x13,
|
||||
Shop = 0x14,
|
||||
PhotoViewer = 0x15,
|
||||
Settings = 0x16,
|
||||
OfflineWeb = 0x17,
|
||||
LoginShare = 0x18,
|
||||
WebAuth = 0x19,
|
||||
MyPage = 0x1A,
|
||||
};
|
||||
|
||||
enum class AppletProgramId : u64 {
|
||||
QLaunch = 0x0100000000001000ull,
|
||||
Auth = 0x0100000000001001ull,
|
||||
Cabinet = 0x0100000000001002ull,
|
||||
Controller = 0x0100000000001003ull,
|
||||
DataErase = 0x0100000000001004ull,
|
||||
Error = 0x0100000000001005ull,
|
||||
NetConnect = 0x0100000000001006ull,
|
||||
ProfileSelect = 0x0100000000001007ull,
|
||||
SoftwareKeyboard = 0x0100000000001008ull,
|
||||
MiiEdit = 0x0100000000001009ull,
|
||||
Web = 0x010000000000100Aull,
|
||||
Shop = 0x010000000000100Bull,
|
||||
OverlayDisplay = 0x010000000000100Cull,
|
||||
PhotoViewer = 0x010000000000100Dull,
|
||||
Settings = 0x010000000000100Eull,
|
||||
OfflineWeb = 0x010000000000100Full,
|
||||
LoginShare = 0x0100000000001010ull,
|
||||
WebAuth = 0x0100000000001011ull,
|
||||
Starter = 0x0100000000001012ull,
|
||||
MyPage = 0x0100000000001013ull,
|
||||
MaxProgramId = 0x0100000000001FFFull,
|
||||
};
|
||||
|
||||
enum class LibraryAppletMode : u32 {
|
||||
AllForeground = 0,
|
||||
Background = 1,
|
||||
NoUI = 2,
|
||||
BackgroundIndirectDisplay = 3,
|
||||
AllForegroundInitiallyHidden = 4,
|
||||
};
|
||||
|
||||
enum class CommonArgumentVersion : u32 {
|
||||
Version0,
|
||||
Version1,
|
||||
Version2,
|
||||
Version3,
|
||||
};
|
||||
|
||||
enum class CommonArgumentSize : u32 {
|
||||
Version3 = 0x20,
|
||||
};
|
||||
|
||||
enum class ThemeColor : u32 {
|
||||
BasicWhite = 0,
|
||||
BasicBlack = 3,
|
||||
};
|
||||
|
||||
struct CommonArguments {
|
||||
CommonArgumentVersion arguments_version;
|
||||
CommonArgumentSize size;
|
||||
u32 library_version;
|
||||
ThemeColor theme_color;
|
||||
bool play_startup_sound;
|
||||
u64_le system_tick;
|
||||
};
|
||||
static_assert(sizeof(CommonArguments) == 0x20, "CommonArguments has incorrect size.");
|
||||
namespace Frontend {
|
||||
|
||||
class AppletDataBroker final {
|
||||
public:
|
||||
|
@ -187,10 +104,10 @@ private:
|
|||
Kernel::KEvent* pop_interactive_out_data_event;
|
||||
};
|
||||
|
||||
class Applet {
|
||||
class FrontendApplet {
|
||||
public:
|
||||
explicit Applet(Core::System& system_, LibraryAppletMode applet_mode_);
|
||||
virtual ~Applet();
|
||||
explicit FrontendApplet(Core::System& system_, LibraryAppletMode applet_mode_);
|
||||
virtual ~FrontendApplet();
|
||||
|
||||
virtual void Initialize();
|
||||
|
||||
|
@ -223,7 +140,7 @@ protected:
|
|||
bool initialized = false;
|
||||
};
|
||||
|
||||
struct AppletFrontendSet {
|
||||
struct FrontendAppletSet {
|
||||
using CabinetApplet = std::unique_ptr<Core::Frontend::CabinetApplet>;
|
||||
using ControllerApplet = std::unique_ptr<Core::Frontend::ControllerApplet>;
|
||||
using ErrorApplet = std::unique_ptr<Core::Frontend::ErrorApplet>;
|
||||
|
@ -234,19 +151,19 @@ struct AppletFrontendSet {
|
|||
using SoftwareKeyboard = std::unique_ptr<Core::Frontend::SoftwareKeyboardApplet>;
|
||||
using WebBrowser = std::unique_ptr<Core::Frontend::WebBrowserApplet>;
|
||||
|
||||
AppletFrontendSet();
|
||||
AppletFrontendSet(CabinetApplet cabinet_applet, ControllerApplet controller_applet,
|
||||
FrontendAppletSet();
|
||||
FrontendAppletSet(CabinetApplet cabinet_applet, ControllerApplet controller_applet,
|
||||
ErrorApplet error_applet, MiiEdit mii_edit_,
|
||||
ParentalControlsApplet parental_controls_applet, PhotoViewer photo_viewer_,
|
||||
ProfileSelect profile_select_, SoftwareKeyboard software_keyboard_,
|
||||
WebBrowser web_browser_);
|
||||
~AppletFrontendSet();
|
||||
~FrontendAppletSet();
|
||||
|
||||
AppletFrontendSet(const AppletFrontendSet&) = delete;
|
||||
AppletFrontendSet& operator=(const AppletFrontendSet&) = delete;
|
||||
FrontendAppletSet(const FrontendAppletSet&) = delete;
|
||||
FrontendAppletSet& operator=(const FrontendAppletSet&) = delete;
|
||||
|
||||
AppletFrontendSet(AppletFrontendSet&&) noexcept;
|
||||
AppletFrontendSet& operator=(AppletFrontendSet&&) noexcept;
|
||||
FrontendAppletSet(FrontendAppletSet&&) noexcept;
|
||||
FrontendAppletSet& operator=(FrontendAppletSet&&) noexcept;
|
||||
|
||||
CabinetApplet cabinet;
|
||||
ControllerApplet controller;
|
||||
|
@ -259,31 +176,31 @@ struct AppletFrontendSet {
|
|||
WebBrowser web_browser;
|
||||
};
|
||||
|
||||
class AppletManager {
|
||||
class FrontendAppletHolder {
|
||||
public:
|
||||
explicit AppletManager(Core::System& system_);
|
||||
~AppletManager();
|
||||
explicit FrontendAppletHolder(Core::System& system_);
|
||||
~FrontendAppletHolder();
|
||||
|
||||
const AppletFrontendSet& GetAppletFrontendSet() const;
|
||||
const FrontendAppletSet& GetFrontendAppletSet() const;
|
||||
NFP::CabinetMode GetCabinetMode() const;
|
||||
AppletId GetCurrentAppletId() const;
|
||||
|
||||
void SetAppletFrontendSet(AppletFrontendSet set);
|
||||
void SetFrontendAppletSet(FrontendAppletSet set);
|
||||
void SetCabinetMode(NFP::CabinetMode mode);
|
||||
void SetCurrentAppletId(AppletId applet_id);
|
||||
void SetDefaultAppletFrontendSet();
|
||||
void SetDefaultAppletsIfMissing();
|
||||
void ClearAll();
|
||||
|
||||
std::shared_ptr<Applet> GetApplet(AppletId id, LibraryAppletMode mode) const;
|
||||
std::shared_ptr<FrontendApplet> GetApplet(AppletId id, LibraryAppletMode mode) const;
|
||||
|
||||
private:
|
||||
AppletId current_applet_id{};
|
||||
NFP::CabinetMode cabinet_mode{};
|
||||
|
||||
AppletFrontendSet frontend;
|
||||
FrontendAppletSet frontend;
|
||||
Core::System& system;
|
||||
};
|
||||
|
||||
} // namespace Applets
|
||||
} // namespace Frontend
|
||||
} // namespace Service::AM
|
|
@ -9,7 +9,7 @@
|
|||
namespace Service::AM {
|
||||
|
||||
ILibraryAppletAccessor::ILibraryAppletAccessor(Core::System& system_,
|
||||
std::shared_ptr<Applets::Applet> applet_)
|
||||
std::shared_ptr<Frontend::FrontendApplet> applet_)
|
||||
: ServiceFramework{system_, "ILibraryAppletAccessor"}, applet{std::move(applet_)} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/service.h"
|
||||
|
||||
namespace Service::AM {
|
||||
|
@ -11,7 +11,7 @@ namespace Service::AM {
|
|||
class ILibraryAppletAccessor final : public ServiceFramework<ILibraryAppletAccessor> {
|
||||
public:
|
||||
explicit ILibraryAppletAccessor(Core::System& system_,
|
||||
std::shared_ptr<Applets::Applet> applet_);
|
||||
std::shared_ptr<Frontend::FrontendApplet> applet_);
|
||||
|
||||
private:
|
||||
void GetAppletStateChangedEvent(HLERequestContext& ctx);
|
||||
|
@ -28,7 +28,7 @@ private:
|
|||
void GetPopInteractiveOutDataEvent(HLERequestContext& ctx);
|
||||
void GetIndirectLayerConsumerHandle(HLERequestContext& ctx);
|
||||
|
||||
std::shared_ptr<Applets::Applet> applet;
|
||||
std::shared_ptr<Frontend::FrontendApplet> applet;
|
||||
};
|
||||
|
||||
} // namespace Service::AM
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "core/hle/kernel/k_transfer_memory.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/am/library_applet_accessor.h"
|
||||
#include "core/hle/service/am/library_applet_creator.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
|
@ -28,14 +28,14 @@ ILibraryAppletCreator::~ILibraryAppletCreator() = default;
|
|||
void ILibraryAppletCreator::CreateLibraryApplet(HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp{ctx};
|
||||
|
||||
const auto applet_id = rp.PopRaw<Applets::AppletId>();
|
||||
const auto applet_mode = rp.PopRaw<Applets::LibraryAppletMode>();
|
||||
const auto applet_id = rp.PopRaw<AppletId>();
|
||||
const auto applet_mode = rp.PopRaw<LibraryAppletMode>();
|
||||
|
||||
LOG_DEBUG(Service_AM, "called with applet_id={:08X}, applet_mode={:08X}", applet_id,
|
||||
applet_mode);
|
||||
|
||||
const auto& applet_manager{system.GetAppletManager()};
|
||||
const auto applet = applet_manager.GetApplet(applet_id, applet_mode);
|
||||
const auto& holder{system.GetFrontendAppletHolder()};
|
||||
const auto applet = holder.GetApplet(applet_id, applet_mode);
|
||||
|
||||
if (applet == nullptr) {
|
||||
LOG_ERROR(Service_AM, "Applet doesn't exist! applet_id={}", applet_id);
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
#include "core/core_timing.h"
|
||||
#include "core/hle/service/acc/profile_manager.h"
|
||||
#include "core/hle/service/am/am_results.h"
|
||||
#include "core/hle/service/am/applets/applet_cabinet.h"
|
||||
#include "core/hle/service/am/applets/applet_controller.h"
|
||||
#include "core/hle/service/am/applets/applet_mii_edit_types.h"
|
||||
#include "core/hle/service/am/applets/applet_software_keyboard_types.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applet_cabinet.h"
|
||||
#include "core/hle/service/am/frontend/applet_controller.h"
|
||||
#include "core/hle/service/am/frontend/applet_mii_edit_types.h"
|
||||
#include "core/hle/service/am/frontend/applet_software_keyboard_types.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/am/library_applet_self_accessor.h"
|
||||
#include "core/hle/service/am/storage.h"
|
||||
#include "core/hle/service/ipc_helpers.h"
|
||||
|
@ -59,20 +59,20 @@ ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_)
|
|||
// clang-format on
|
||||
RegisterHandlers(functions);
|
||||
|
||||
switch (system.GetAppletManager().GetCurrentAppletId()) {
|
||||
case Applets::AppletId::Cabinet:
|
||||
switch (system.GetFrontendAppletHolder().GetCurrentAppletId()) {
|
||||
case AppletId::Cabinet:
|
||||
PushInShowCabinetData();
|
||||
break;
|
||||
case Applets::AppletId::MiiEdit:
|
||||
case AppletId::MiiEdit:
|
||||
PushInShowMiiEditData();
|
||||
break;
|
||||
case Applets::AppletId::PhotoViewer:
|
||||
case AppletId::PhotoViewer:
|
||||
PushInShowAlbum();
|
||||
break;
|
||||
case Applets::AppletId::SoftwareKeyboard:
|
||||
case AppletId::SoftwareKeyboard:
|
||||
PushInShowSoftwareKeyboard();
|
||||
break;
|
||||
case Applets::AppletId::Controller:
|
||||
case AppletId::Controller:
|
||||
PushInShowController();
|
||||
break;
|
||||
default:
|
||||
|
@ -117,15 +117,15 @@ void ILibraryAppletSelfAccessor::ExitProcessAndReturn(HLERequestContext& ctx) {
|
|||
|
||||
void ILibraryAppletSelfAccessor::GetLibraryAppletInfo(HLERequestContext& ctx) {
|
||||
struct LibraryAppletInfo {
|
||||
Applets::AppletId applet_id;
|
||||
Applets::LibraryAppletMode library_applet_mode;
|
||||
AppletId applet_id;
|
||||
LibraryAppletMode library_applet_mode;
|
||||
};
|
||||
|
||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||
|
||||
const LibraryAppletInfo applet_info{
|
||||
.applet_id = system.GetAppletManager().GetCurrentAppletId(),
|
||||
.library_applet_mode = Applets::LibraryAppletMode::AllForeground,
|
||||
.applet_id = system.GetFrontendAppletHolder().GetCurrentAppletId(),
|
||||
.library_applet_mode = LibraryAppletMode::AllForeground,
|
||||
};
|
||||
|
||||
IPC::ResponseBuilder rb{ctx, 4};
|
||||
|
@ -135,7 +135,7 @@ void ILibraryAppletSelfAccessor::GetLibraryAppletInfo(HLERequestContext& ctx) {
|
|||
|
||||
void ILibraryAppletSelfAccessor::GetMainAppletIdentityInfo(HLERequestContext& ctx) {
|
||||
struct AppletIdentityInfo {
|
||||
Applets::AppletId applet_id;
|
||||
AppletId applet_id;
|
||||
INSERT_PADDING_BYTES(0x4);
|
||||
u64 application_id;
|
||||
};
|
||||
|
@ -144,7 +144,7 @@ void ILibraryAppletSelfAccessor::GetMainAppletIdentityInfo(HLERequestContext& ct
|
|||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||
|
||||
const AppletIdentityInfo applet_info{
|
||||
.applet_id = Applets::AppletId::QLaunch,
|
||||
.applet_id = AppletId::QLaunch,
|
||||
.application_id = 0x0100000000001000ull,
|
||||
};
|
||||
|
||||
|
@ -155,7 +155,7 @@ void ILibraryAppletSelfAccessor::GetMainAppletIdentityInfo(HLERequestContext& ct
|
|||
|
||||
void ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo(HLERequestContext& ctx) {
|
||||
struct AppletIdentityInfo {
|
||||
Applets::AppletId applet_id;
|
||||
AppletId applet_id;
|
||||
INSERT_PADDING_BYTES(0x4);
|
||||
u64 application_id;
|
||||
};
|
||||
|
@ -163,7 +163,7 @@ void ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo(HLERequestContext&
|
|||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||
|
||||
const AppletIdentityInfo applet_info{
|
||||
.applet_id = Applets::AppletId::QLaunch,
|
||||
.applet_id = AppletId::QLaunch,
|
||||
.application_id = 0x0100000000001000ull,
|
||||
};
|
||||
|
||||
|
@ -208,11 +208,11 @@ void ILibraryAppletSelfAccessor::ShouldSetGpuTimeSliceManually(HLERequestContext
|
|||
}
|
||||
|
||||
void ILibraryAppletSelfAccessor::PushInShowAlbum() {
|
||||
const Applets::CommonArguments arguments{
|
||||
.arguments_version = Applets::CommonArgumentVersion::Version3,
|
||||
.size = Applets::CommonArgumentSize::Version3,
|
||||
const CommonArguments arguments{
|
||||
.arguments_version = CommonArgumentVersion::Version3,
|
||||
.size = CommonArgumentSize::Version3,
|
||||
.library_version = 1,
|
||||
.theme_color = Applets::ThemeColor::BasicBlack,
|
||||
.theme_color = ThemeColor::BasicBlack,
|
||||
.play_startup_sound = true,
|
||||
.system_tick = system.CoreTiming().GetClockTicks(),
|
||||
};
|
||||
|
@ -225,16 +225,16 @@ void ILibraryAppletSelfAccessor::PushInShowAlbum() {
|
|||
}
|
||||
|
||||
void ILibraryAppletSelfAccessor::PushInShowController() {
|
||||
const Applets::CommonArguments common_args = {
|
||||
.arguments_version = Applets::CommonArgumentVersion::Version3,
|
||||
.size = Applets::CommonArgumentSize::Version3,
|
||||
.library_version = static_cast<u32>(Applets::ControllerAppletVersion::Version8),
|
||||
.theme_color = Applets::ThemeColor::BasicBlack,
|
||||
const CommonArguments common_args = {
|
||||
.arguments_version = CommonArgumentVersion::Version3,
|
||||
.size = CommonArgumentSize::Version3,
|
||||
.library_version = static_cast<u32>(Frontend::ControllerAppletVersion::Version8),
|
||||
.theme_color = ThemeColor::BasicBlack,
|
||||
.play_startup_sound = true,
|
||||
.system_tick = system.CoreTiming().GetClockTicks(),
|
||||
};
|
||||
|
||||
Applets::ControllerSupportArgNew user_args = {
|
||||
Frontend::ControllerSupportArgNew user_args = {
|
||||
.header = {.player_count_min = 1,
|
||||
.player_count_max = 4,
|
||||
.enable_take_over_connection = true,
|
||||
|
@ -247,13 +247,13 @@ void ILibraryAppletSelfAccessor::PushInShowController() {
|
|||
.explain_text = {},
|
||||
};
|
||||
|
||||
Applets::ControllerSupportArgPrivate private_args = {
|
||||
.arg_private_size = sizeof(Applets::ControllerSupportArgPrivate),
|
||||
.arg_size = sizeof(Applets::ControllerSupportArgNew),
|
||||
Frontend::ControllerSupportArgPrivate private_args = {
|
||||
.arg_private_size = sizeof(Frontend::ControllerSupportArgPrivate),
|
||||
.arg_size = sizeof(Frontend::ControllerSupportArgNew),
|
||||
.is_home_menu = true,
|
||||
.flag_1 = true,
|
||||
.mode = Applets::ControllerSupportMode::ShowControllerSupport,
|
||||
.caller = Applets::ControllerSupportCaller::
|
||||
.mode = Frontend::ControllerSupportMode::ShowControllerSupport,
|
||||
.caller = Frontend::ControllerSupportCaller::
|
||||
Application, // switchbrew: Always zero except with
|
||||
// ShowControllerFirmwareUpdateForSystem/ShowControllerKeyRemappingForSystem,
|
||||
// which sets this to the input param
|
||||
|
@ -274,19 +274,19 @@ void ILibraryAppletSelfAccessor::PushInShowController() {
|
|||
}
|
||||
|
||||
void ILibraryAppletSelfAccessor::PushInShowCabinetData() {
|
||||
const Applets::CommonArguments arguments{
|
||||
.arguments_version = Applets::CommonArgumentVersion::Version3,
|
||||
.size = Applets::CommonArgumentSize::Version3,
|
||||
.library_version = static_cast<u32>(Applets::CabinetAppletVersion::Version1),
|
||||
.theme_color = Applets::ThemeColor::BasicBlack,
|
||||
const CommonArguments arguments{
|
||||
.arguments_version = CommonArgumentVersion::Version3,
|
||||
.size = CommonArgumentSize::Version3,
|
||||
.library_version = static_cast<u32>(Frontend::CabinetAppletVersion::Version1),
|
||||
.theme_color = ThemeColor::BasicBlack,
|
||||
.play_startup_sound = true,
|
||||
.system_tick = system.CoreTiming().GetClockTicks(),
|
||||
};
|
||||
|
||||
const Applets::StartParamForAmiiboSettings amiibo_settings{
|
||||
const Frontend::StartParamForAmiiboSettings amiibo_settings{
|
||||
.param_1 = 0,
|
||||
.applet_mode = system.GetAppletManager().GetCabinetMode(),
|
||||
.flags = Applets::CabinetFlags::None,
|
||||
.applet_mode = system.GetFrontendAppletHolder().GetCabinetMode(),
|
||||
.flags = Frontend::CabinetFlags::None,
|
||||
.amiibo_settings_1 = 0,
|
||||
.device_handle = 0,
|
||||
.tag_info{},
|
||||
|
@ -304,16 +304,16 @@ void ILibraryAppletSelfAccessor::PushInShowCabinetData() {
|
|||
|
||||
void ILibraryAppletSelfAccessor::PushInShowMiiEditData() {
|
||||
struct MiiEditV3 {
|
||||
Applets::MiiEditAppletInputCommon common;
|
||||
Applets::MiiEditAppletInputV3 input;
|
||||
Frontend::MiiEditAppletInputCommon common;
|
||||
Frontend::MiiEditAppletInputV3 input;
|
||||
};
|
||||
static_assert(sizeof(MiiEditV3) == 0x100, "MiiEditV3 has incorrect size.");
|
||||
|
||||
MiiEditV3 mii_arguments{
|
||||
.common =
|
||||
{
|
||||
.version = Applets::MiiEditAppletVersion::Version3,
|
||||
.applet_mode = Applets::MiiEditAppletMode::ShowMiiEdit,
|
||||
.version = Frontend::MiiEditAppletVersion::Version3,
|
||||
.applet_mode = Frontend::MiiEditAppletMode::ShowMiiEdit,
|
||||
},
|
||||
.input{},
|
||||
};
|
||||
|
@ -325,32 +325,32 @@ void ILibraryAppletSelfAccessor::PushInShowMiiEditData() {
|
|||
}
|
||||
|
||||
void ILibraryAppletSelfAccessor::PushInShowSoftwareKeyboard() {
|
||||
const Applets::CommonArguments arguments{
|
||||
.arguments_version = Applets::CommonArgumentVersion::Version3,
|
||||
.size = Applets::CommonArgumentSize::Version3,
|
||||
.library_version = static_cast<u32>(Applets::SwkbdAppletVersion::Version524301),
|
||||
.theme_color = Applets::ThemeColor::BasicBlack,
|
||||
const CommonArguments arguments{
|
||||
.arguments_version = CommonArgumentVersion::Version3,
|
||||
.size = CommonArgumentSize::Version3,
|
||||
.library_version = static_cast<u32>(Frontend::SwkbdAppletVersion::Version524301),
|
||||
.theme_color = ThemeColor::BasicBlack,
|
||||
.play_startup_sound = true,
|
||||
.system_tick = system.CoreTiming().GetClockTicks(),
|
||||
};
|
||||
|
||||
std::vector<char16_t> initial_string(0);
|
||||
|
||||
const Applets::SwkbdConfigCommon swkbd_config{
|
||||
.type = Applets::SwkbdType::Qwerty,
|
||||
const Frontend::SwkbdConfigCommon swkbd_config{
|
||||
.type = Frontend::SwkbdType::Qwerty,
|
||||
.ok_text{},
|
||||
.left_optional_symbol_key{},
|
||||
.right_optional_symbol_key{},
|
||||
.use_prediction = false,
|
||||
.key_disable_flags{},
|
||||
.initial_cursor_position = Applets::SwkbdInitialCursorPosition::Start,
|
||||
.initial_cursor_position = Frontend::SwkbdInitialCursorPosition::Start,
|
||||
.header_text{},
|
||||
.sub_text{},
|
||||
.guide_text{},
|
||||
.max_text_length = 500,
|
||||
.min_text_length = 0,
|
||||
.password_mode = Applets::SwkbdPasswordMode::Disabled,
|
||||
.text_draw_type = Applets::SwkbdTextDrawType::Box,
|
||||
.password_mode = Frontend::SwkbdPasswordMode::Disabled,
|
||||
.text_draw_type = Frontend::SwkbdTextDrawType::Box,
|
||||
.enable_return_button = true,
|
||||
.use_utf8 = false,
|
||||
.use_blur_background = true,
|
||||
|
@ -361,7 +361,7 @@ void ILibraryAppletSelfAccessor::PushInShowSoftwareKeyboard() {
|
|||
.use_text_check = false,
|
||||
};
|
||||
|
||||
Applets::SwkbdConfigNew swkbd_config_new{};
|
||||
Frontend::SwkbdConfigNew swkbd_config_new{};
|
||||
|
||||
std::vector<u8> argument_data(sizeof(arguments));
|
||||
std::vector<u8> swkbd_data(sizeof(swkbd_config) + sizeof(swkbd_config_new));
|
||||
|
@ -370,7 +370,7 @@ void ILibraryAppletSelfAccessor::PushInShowSoftwareKeyboard() {
|
|||
std::memcpy(argument_data.data(), &arguments, sizeof(arguments));
|
||||
std::memcpy(swkbd_data.data(), &swkbd_config, sizeof(swkbd_config));
|
||||
std::memcpy(swkbd_data.data() + sizeof(swkbd_config), &swkbd_config_new,
|
||||
sizeof(Applets::SwkbdConfigNew));
|
||||
sizeof(Frontend::SwkbdConfigNew));
|
||||
std::memcpy(work_buffer.data(), initial_string.data(),
|
||||
swkbd_config.initial_string_length * sizeof(char16_t));
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/am/library_applet_accessor.h"
|
||||
#include "core/hle/service/am/process_winding_controller.h"
|
||||
#include "core/hle/service/ipc_helpers.h"
|
||||
|
@ -48,14 +48,14 @@ void IProcessWindingController::GetLaunchReason(HLERequestContext& ctx) {
|
|||
}
|
||||
|
||||
void IProcessWindingController::OpenCallingLibraryApplet(HLERequestContext& ctx) {
|
||||
const auto applet_id = system.GetAppletManager().GetCurrentAppletId();
|
||||
const auto applet_mode = Applets::LibraryAppletMode::AllForeground;
|
||||
const auto applet_id = system.GetFrontendAppletHolder().GetCurrentAppletId();
|
||||
const auto applet_mode = LibraryAppletMode::AllForeground;
|
||||
|
||||
LOG_WARNING(Service_AM, "(STUBBED) called with applet_id={:08X}, applet_mode={:08X}", applet_id,
|
||||
applet_mode);
|
||||
|
||||
const auto& applet_manager{system.GetAppletManager()};
|
||||
const auto applet = applet_manager.GetApplet(applet_id, applet_mode);
|
||||
const auto& holder{system.GetFrontendAppletHolder()};
|
||||
const auto applet = holder.GetApplet(applet_id, applet_mode);
|
||||
|
||||
if (applet == nullptr) {
|
||||
LOG_ERROR(Service_AM, "Applet doesn't exist! applet_id={}", applet_id);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/am/self_controller.h"
|
||||
#include "core/hle/service/caps/caps_su.h"
|
||||
#include "core/hle/service/ipc_helpers.h"
|
||||
|
@ -271,7 +271,7 @@ Result ISelfController::EnsureBufferSharingEnabled(Kernel::KProcess* process) {
|
|||
return ResultSuccess;
|
||||
}
|
||||
|
||||
if (system.GetAppletManager().GetCurrentAppletId() <= Applets::AppletId::Application) {
|
||||
if (system.GetFrontendAppletHolder().GetCurrentAppletId() <= AppletId::Application) {
|
||||
return VI::ResultOperationFailed;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue