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
|
@ -82,7 +82,7 @@ AndroidKeyboard::ResultData AndroidKeyboard::ResultData::CreateFromFrontend(jobj
|
|||
const jstring string = reinterpret_cast<jstring>(env->GetObjectField(
|
||||
object, env->GetFieldID(s_keyboard_data_class, "text", "Ljava/lang/String;")));
|
||||
return ResultData{GetJString(env, string),
|
||||
static_cast<Service::AM::Applets::SwkbdResult>(env->GetIntField(
|
||||
static_cast<Service::AM::Frontend::SwkbdResult>(env->GetIntField(
|
||||
object, env->GetFieldID(s_keyboard_data_class, "result", "I")))};
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ void AndroidKeyboard::ShowNormalKeyboard() const {
|
|||
}
|
||||
|
||||
void AndroidKeyboard::ShowTextCheckDialog(
|
||||
Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) const {
|
||||
LOG_WARNING(Frontend, "(STUBBED) called, backend requested to show the text check dialog.");
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ void AndroidKeyboard::InlineTextChanged(
|
|||
"\ncursor_position={}",
|
||||
Common::UTF16ToUTF8(text_parameters.input_text), text_parameters.cursor_position);
|
||||
|
||||
submit_inline_callback(Service::AM::Applets::SwkbdReplyType::ChangedString,
|
||||
submit_inline_callback(Service::AM::Frontend::SwkbdReplyType::ChangedString,
|
||||
text_parameters.input_text, text_parameters.cursor_position);
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ void AndroidKeyboard::SubmitInlineKeyboardText(std::u16string submitted_text) {
|
|||
|
||||
m_current_text += submitted_text;
|
||||
|
||||
submit_inline_callback(Service::AM::Applets::SwkbdReplyType::ChangedString, m_current_text,
|
||||
submit_inline_callback(Service::AM::Frontend::SwkbdReplyType::ChangedString, m_current_text,
|
||||
m_current_text.size());
|
||||
}
|
||||
|
||||
|
@ -236,12 +236,12 @@ void AndroidKeyboard::SubmitInlineKeyboardInput(int key_code) {
|
|||
case KEYCODE_BACK:
|
||||
case KEYCODE_ENTER:
|
||||
m_is_inline_active = false;
|
||||
submit_inline_callback(Service::AM::Applets::SwkbdReplyType::DecidedEnter, m_current_text,
|
||||
submit_inline_callback(Service::AM::Frontend::SwkbdReplyType::DecidedEnter, m_current_text,
|
||||
static_cast<s32>(m_current_text.size()));
|
||||
break;
|
||||
case KEYCODE_DEL:
|
||||
m_current_text.pop_back();
|
||||
submit_inline_callback(Service::AM::Applets::SwkbdReplyType::ChangedString, m_current_text,
|
||||
submit_inline_callback(Service::AM::Frontend::SwkbdReplyType::ChangedString, m_current_text,
|
||||
m_current_text.size());
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
|
||||
void ShowNormalKeyboard() const override;
|
||||
|
||||
void ShowTextCheckDialog(Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
void ShowTextCheckDialog(Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) const override;
|
||||
|
||||
void ShowInlineKeyboard(
|
||||
|
@ -45,7 +45,7 @@ private:
|
|||
static ResultData CreateFromFrontend(jobject object);
|
||||
|
||||
std::string text;
|
||||
Service::AM::Applets::SwkbdResult result{};
|
||||
Service::AM::Frontend::SwkbdResult result{};
|
||||
};
|
||||
|
||||
void SubmitNormalText(const ResultData& result) const;
|
||||
|
|
|
@ -42,14 +42,14 @@
|
|||
#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"
|
||||
#include "core/frontend/applets/web_browser.h"
|
||||
#include "core/hle/service/am/applet_ae.h"
|
||||
#include "core/hle/service/am/applet_oe.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/filesystem/filesystem.h"
|
||||
#include "core/loader/loader.h"
|
||||
#include "frontend_common/config.h"
|
||||
|
@ -226,7 +226,7 @@ Core::SystemResultStatus EmulationSession::InitializeEmulation(const std::string
|
|||
m_system.ApplySettings();
|
||||
Settings::LogSettings();
|
||||
m_system.HIDCore().ReloadInputDevices();
|
||||
m_system.SetAppletFrontendSet({
|
||||
m_system.SetFrontendAppletSet({
|
||||
nullptr, // Amiibo Settings
|
||||
nullptr, // Controller Selector
|
||||
nullptr, // Error Display
|
||||
|
@ -809,13 +809,13 @@ jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getAppletLaunchPath(JNIEnv* env, j
|
|||
|
||||
void Java_org_yuzu_yuzu_1emu_NativeLibrary_setCurrentAppletId(JNIEnv* env, jclass clazz,
|
||||
jint jappletId) {
|
||||
EmulationSession::GetInstance().System().GetAppletManager().SetCurrentAppletId(
|
||||
static_cast<Service::AM::Applets::AppletId>(jappletId));
|
||||
EmulationSession::GetInstance().System().GetFrontendAppletHolder().SetCurrentAppletId(
|
||||
static_cast<Service::AM::AppletId>(jappletId));
|
||||
}
|
||||
|
||||
void Java_org_yuzu_yuzu_1emu_NativeLibrary_setCabinetMode(JNIEnv* env, jclass clazz,
|
||||
jint jcabinetMode) {
|
||||
EmulationSession::GetInstance().System().GetAppletManager().SetCabinetMode(
|
||||
EmulationSession::GetInstance().System().GetFrontendAppletHolder().SetCabinetMode(
|
||||
static_cast<Service::NFP::CabinetMode>(jcabinetMode));
|
||||
}
|
||||
|
||||
|
|
|
@ -176,8 +176,8 @@ add_library(core STATIC
|
|||
frontend/applets/controller.h
|
||||
frontend/applets/error.cpp
|
||||
frontend/applets/error.h
|
||||
frontend/applets/general_frontend.cpp
|
||||
frontend/applets/general_frontend.h
|
||||
frontend/applets/general.cpp
|
||||
frontend/applets/general.h
|
||||
frontend/applets/mii_edit.cpp
|
||||
frontend/applets/mii_edit.h
|
||||
frontend/applets/profile_select.cpp
|
||||
|
@ -390,6 +390,27 @@ add_library(core STATIC
|
|||
hle/service/acc/errors.h
|
||||
hle/service/acc/profile_manager.cpp
|
||||
hle/service/acc/profile_manager.h
|
||||
hle/service/am/frontend/applet_cabinet.cpp
|
||||
hle/service/am/frontend/applet_cabinet.h
|
||||
hle/service/am/frontend/applet_controller.cpp
|
||||
hle/service/am/frontend/applet_controller.h
|
||||
hle/service/am/frontend/applet_error.cpp
|
||||
hle/service/am/frontend/applet_error.h
|
||||
hle/service/am/frontend/applet_general.cpp
|
||||
hle/service/am/frontend/applet_general.h
|
||||
hle/service/am/frontend/applet_mii_edit.cpp
|
||||
hle/service/am/frontend/applet_mii_edit.h
|
||||
hle/service/am/frontend/applet_mii_edit_types.h
|
||||
hle/service/am/frontend/applet_profile_select.cpp
|
||||
hle/service/am/frontend/applet_profile_select.h
|
||||
hle/service/am/frontend/applet_software_keyboard.cpp
|
||||
hle/service/am/frontend/applet_software_keyboard.h
|
||||
hle/service/am/frontend/applet_software_keyboard_types.h
|
||||
hle/service/am/frontend/applet_web_browser.cpp
|
||||
hle/service/am/frontend/applet_web_browser.h
|
||||
hle/service/am/frontend/applet_web_browser_types.h
|
||||
hle/service/am/frontend/applets.cpp
|
||||
hle/service/am/frontend/applets.h
|
||||
hle/service/am/am.cpp
|
||||
hle/service/am/am.h
|
||||
hle/service/am/am_results.h
|
||||
|
@ -402,27 +423,6 @@ add_library(core STATIC
|
|||
hle/service/am/applet_manager.h
|
||||
hle/service/am/applet_oe.cpp
|
||||
hle/service/am/applet_oe.h
|
||||
hle/service/am/applets/applet_cabinet.cpp
|
||||
hle/service/am/applets/applet_cabinet.h
|
||||
hle/service/am/applets/applet_controller.cpp
|
||||
hle/service/am/applets/applet_controller.h
|
||||
hle/service/am/applets/applet_error.cpp
|
||||
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_edit.cpp
|
||||
hle/service/am/applets/applet_mii_edit.h
|
||||
hle/service/am/applets/applet_mii_edit_types.h
|
||||
hle/service/am/applets/applet_profile_select.cpp
|
||||
hle/service/am/applets/applet_profile_select.h
|
||||
hle/service/am/applets/applet_software_keyboard.cpp
|
||||
hle/service/am/applets/applet_software_keyboard.h
|
||||
hle/service/am/applets/applet_software_keyboard_types.h
|
||||
hle/service/am/applets/applet_web_browser.cpp
|
||||
hle/service/am/applets/applet_web_browser.h
|
||||
hle/service/am/applets/applet_web_browser_types.h
|
||||
hle/service/am/applets/applets.cpp
|
||||
hle/service/am/applets/applets.h
|
||||
hle/service/am/applet_common_functions.cpp
|
||||
hle/service/am/applet_common_functions.h
|
||||
hle/service/am/applet_message_queue.cpp
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#include "core/hle/kernel/kernel.h"
|
||||
#include "core/hle/kernel/physical_core.h"
|
||||
#include "core/hle/service/acc/profile_manager.h"
|
||||
#include "core/hle/service/am/applets/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/apm/apm_controller.h"
|
||||
#include "core/hle/service/filesystem/filesystem.h"
|
||||
#include "core/hle/service/glue/glue_manager.h"
|
||||
|
@ -135,8 +135,8 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
|
|||
|
||||
struct System::Impl {
|
||||
explicit Impl(System& system)
|
||||
: kernel{system}, fs_controller{system}, hid_core{}, room_network{},
|
||||
cpu_manager{system}, reporter{system}, applet_manager{system}, profile_manager{} {}
|
||||
: kernel{system}, fs_controller{system}, hid_core{}, room_network{}, cpu_manager{system},
|
||||
reporter{system}, frontend_applets{system}, profile_manager{} {}
|
||||
|
||||
void Initialize(System& system) {
|
||||
device_memory = std::make_unique<Core::DeviceMemory>();
|
||||
|
@ -157,7 +157,7 @@ struct System::Impl {
|
|||
}
|
||||
|
||||
// Create default implementations of applets if one is not provided.
|
||||
applet_manager.SetDefaultAppletsIfMissing();
|
||||
frontend_applets.SetDefaultAppletsIfMissing();
|
||||
|
||||
is_async_gpu = Settings::values.use_asynchronous_gpu_emulation.GetValue();
|
||||
|
||||
|
@ -567,7 +567,7 @@ struct System::Impl {
|
|||
std::unique_ptr<Tools::RenderdocAPI> renderdoc_api;
|
||||
|
||||
/// Frontend applets
|
||||
Service::AM::Applets::AppletManager applet_manager;
|
||||
Service::AM::Frontend::FrontendAppletHolder frontend_applets;
|
||||
|
||||
/// APM (Performance) services
|
||||
Service::APM::Controller apm_controller{core_timing};
|
||||
|
@ -871,20 +871,20 @@ void System::RegisterCheatList(const std::vector<Memory::CheatEntry>& list,
|
|||
impl->cheat_engine->SetMainMemoryParameters(main_region_begin, main_region_size);
|
||||
}
|
||||
|
||||
void System::SetAppletFrontendSet(Service::AM::Applets::AppletFrontendSet&& set) {
|
||||
impl->applet_manager.SetAppletFrontendSet(std::move(set));
|
||||
void System::SetFrontendAppletSet(Service::AM::Frontend::FrontendAppletSet&& set) {
|
||||
impl->frontend_applets.SetFrontendAppletSet(std::move(set));
|
||||
}
|
||||
|
||||
void System::SetDefaultAppletFrontendSet() {
|
||||
impl->applet_manager.SetDefaultAppletFrontendSet();
|
||||
impl->frontend_applets.SetDefaultAppletFrontendSet();
|
||||
}
|
||||
|
||||
Service::AM::Applets::AppletManager& System::GetAppletManager() {
|
||||
return impl->applet_manager;
|
||||
Service::AM::Frontend::FrontendAppletHolder& System::GetFrontendAppletHolder() {
|
||||
return impl->frontend_applets;
|
||||
}
|
||||
|
||||
const Service::AM::Applets::AppletManager& System::GetAppletManager() const {
|
||||
return impl->applet_manager;
|
||||
const Service::AM::Frontend::FrontendAppletHolder& System::GetFrontendAppletHolder() const {
|
||||
return impl->frontend_applets;
|
||||
}
|
||||
|
||||
void System::SetContentProvider(std::unique_ptr<FileSys::ContentProviderUnion> provider) {
|
||||
|
|
|
@ -50,10 +50,10 @@ namespace Account {
|
|||
class ProfileManager;
|
||||
} // namespace Account
|
||||
|
||||
namespace AM::Applets {
|
||||
struct AppletFrontendSet;
|
||||
class AppletManager;
|
||||
} // namespace AM::Applets
|
||||
namespace AM::Frontend {
|
||||
struct FrontendAppletSet;
|
||||
class FrontendAppletHolder;
|
||||
} // namespace AM::Frontend
|
||||
|
||||
namespace APM {
|
||||
class Controller;
|
||||
|
@ -344,11 +344,12 @@ public:
|
|||
const std::array<u8, 0x20>& build_id, u64 main_region_begin,
|
||||
u64 main_region_size);
|
||||
|
||||
void SetAppletFrontendSet(Service::AM::Applets::AppletFrontendSet&& set);
|
||||
void SetFrontendAppletSet(Service::AM::Frontend::FrontendAppletSet&& set);
|
||||
void SetDefaultAppletFrontendSet();
|
||||
|
||||
[[nodiscard]] Service::AM::Applets::AppletManager& GetAppletManager();
|
||||
[[nodiscard]] const Service::AM::Applets::AppletManager& GetAppletManager() const;
|
||||
[[nodiscard]] Service::AM::Frontend::FrontendAppletHolder& GetFrontendAppletHolder();
|
||||
[[nodiscard]] const Service::AM::Frontend::FrontendAppletHolder& GetFrontendAppletHolder()
|
||||
const;
|
||||
|
||||
void SetContentProvider(std::unique_ptr<FileSys::ContentProviderUnion> provider);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "common/logging/log.h"
|
||||
#include "core/frontend/applets/general_frontend.h"
|
||||
#include "core/frontend/applets/general.h"
|
||||
|
||||
namespace Core::Frontend {
|
||||
|
|
@ -8,15 +8,15 @@
|
|||
|
||||
#include "common/uuid.h"
|
||||
#include "core/frontend/applets/applet.h"
|
||||
#include "core/hle/service/am/applets/applet_profile_select.h"
|
||||
#include "core/hle/service/am/frontend/applet_profile_select.h"
|
||||
|
||||
namespace Core::Frontend {
|
||||
|
||||
struct ProfileSelectParameters {
|
||||
Service::AM::Applets::UiMode mode;
|
||||
Service::AM::Frontend::UiMode mode;
|
||||
std::array<Common::UUID, 8> invalid_uid_list;
|
||||
Service::AM::Applets::UiSettingsDisplayOptions display_options;
|
||||
Service::AM::Applets::UserSelectionPurpose purpose;
|
||||
Service::AM::Frontend::UiSettingsDisplayOptions display_options;
|
||||
Service::AM::Frontend::UserSelectionPurpose purpose;
|
||||
};
|
||||
|
||||
class ProfileSelectApplet : public Applet {
|
||||
|
|
|
@ -69,7 +69,7 @@ void DefaultSoftwareKeyboardApplet::ShowNormalKeyboard() const {
|
|||
}
|
||||
|
||||
void DefaultSoftwareKeyboardApplet::ShowTextCheckDialog(
|
||||
Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) const {
|
||||
LOG_WARNING(Service_AM, "(STUBBED) called, backend requested to show the text check dialog.");
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ void DefaultSoftwareKeyboardApplet::InlineTextChanged(InlineTextParameters text_
|
|||
"\ncursor_position={}",
|
||||
Common::UTF16ToUTF8(text_parameters.input_text), text_parameters.cursor_position);
|
||||
|
||||
submit_inline_callback(Service::AM::Applets::SwkbdReplyType::ChangedString,
|
||||
submit_inline_callback(Service::AM::Frontend::SwkbdReplyType::ChangedString,
|
||||
text_parameters.input_text, text_parameters.cursor_position);
|
||||
}
|
||||
|
||||
|
@ -127,22 +127,22 @@ void DefaultSoftwareKeyboardApplet::ExitKeyboard() const {
|
|||
}
|
||||
|
||||
void DefaultSoftwareKeyboardApplet::SubmitNormalText(std::u16string text) const {
|
||||
submit_normal_callback(Service::AM::Applets::SwkbdResult::Ok, text, true);
|
||||
submit_normal_callback(Service::AM::Frontend::SwkbdResult::Ok, text, true);
|
||||
}
|
||||
|
||||
void DefaultSoftwareKeyboardApplet::SubmitInlineText(std::u16string_view text) const {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||
|
||||
for (std::size_t index = 0; index < text.size(); ++index) {
|
||||
submit_inline_callback(Service::AM::Applets::SwkbdReplyType::ChangedString,
|
||||
submit_inline_callback(Service::AM::Frontend::SwkbdReplyType::ChangedString,
|
||||
std::u16string(text.data(), text.data() + index + 1),
|
||||
static_cast<s32>(index) + 1);
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(250));
|
||||
}
|
||||
|
||||
submit_inline_callback(Service::AM::Applets::SwkbdReplyType::DecidedEnter, std::u16string(text),
|
||||
static_cast<s32>(text.size()));
|
||||
submit_inline_callback(Service::AM::Frontend::SwkbdReplyType::DecidedEnter,
|
||||
std::u16string(text), static_cast<s32>(text.size()));
|
||||
}
|
||||
|
||||
} // namespace Core::Frontend
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "common/common_types.h"
|
||||
|
||||
#include "core/frontend/applets/applet.h"
|
||||
#include "core/hle/service/am/applets/applet_software_keyboard_types.h"
|
||||
#include "core/hle/service/am/frontend/applet_software_keyboard_types.h"
|
||||
|
||||
namespace Core::Frontend {
|
||||
|
||||
|
@ -23,10 +23,10 @@ struct KeyboardInitializeParameters {
|
|||
u32 max_text_length;
|
||||
u32 min_text_length;
|
||||
s32 initial_cursor_position;
|
||||
Service::AM::Applets::SwkbdType type;
|
||||
Service::AM::Applets::SwkbdPasswordMode password_mode;
|
||||
Service::AM::Applets::SwkbdTextDrawType text_draw_type;
|
||||
Service::AM::Applets::SwkbdKeyDisableFlags key_disable_flags;
|
||||
Service::AM::Frontend::SwkbdType type;
|
||||
Service::AM::Frontend::SwkbdPasswordMode password_mode;
|
||||
Service::AM::Frontend::SwkbdTextDrawType text_draw_type;
|
||||
Service::AM::Frontend::SwkbdKeyDisableFlags key_disable_flags;
|
||||
bool use_blur_background;
|
||||
bool enable_backspace_button;
|
||||
bool enable_return_button;
|
||||
|
@ -40,8 +40,8 @@ struct InlineAppearParameters {
|
|||
f32 key_top_scale_y;
|
||||
f32 key_top_translate_x;
|
||||
f32 key_top_translate_y;
|
||||
Service::AM::Applets::SwkbdType type;
|
||||
Service::AM::Applets::SwkbdKeyDisableFlags key_disable_flags;
|
||||
Service::AM::Frontend::SwkbdType type;
|
||||
Service::AM::Frontend::SwkbdKeyDisableFlags key_disable_flags;
|
||||
bool key_top_as_floating;
|
||||
bool enable_backspace_button;
|
||||
bool enable_return_button;
|
||||
|
@ -56,9 +56,9 @@ struct InlineTextParameters {
|
|||
class SoftwareKeyboardApplet : public Applet {
|
||||
public:
|
||||
using SubmitInlineCallback =
|
||||
std::function<void(Service::AM::Applets::SwkbdReplyType, std::u16string, s32)>;
|
||||
std::function<void(Service::AM::Frontend::SwkbdReplyType, std::u16string, s32)>;
|
||||
using SubmitNormalCallback =
|
||||
std::function<void(Service::AM::Applets::SwkbdResult, std::u16string, bool)>;
|
||||
std::function<void(Service::AM::Frontend::SwkbdResult, std::u16string, bool)>;
|
||||
|
||||
virtual ~SoftwareKeyboardApplet();
|
||||
|
||||
|
@ -69,7 +69,7 @@ public:
|
|||
|
||||
virtual void ShowNormalKeyboard() const = 0;
|
||||
|
||||
virtual void ShowTextCheckDialog(Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
virtual void ShowTextCheckDialog(Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) const = 0;
|
||||
|
||||
virtual void ShowInlineKeyboard(InlineAppearParameters appear_parameters) const = 0;
|
||||
|
@ -93,7 +93,7 @@ public:
|
|||
|
||||
void ShowNormalKeyboard() const override;
|
||||
|
||||
void ShowTextCheckDialog(Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
void ShowTextCheckDialog(Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) const override;
|
||||
|
||||
void ShowInlineKeyboard(InlineAppearParameters appear_parameters) const override;
|
||||
|
|
|
@ -18,7 +18,7 @@ void DefaultWebBrowserApplet::OpenLocalWebPage(const std::string& local_url,
|
|||
LOG_WARNING(Service_AM, "(STUBBED) called, backend requested to open local web page at {}",
|
||||
local_url);
|
||||
|
||||
callback(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/");
|
||||
callback(Service::AM::Frontend::WebExitReason::WindowClosed, "http://localhost/");
|
||||
}
|
||||
|
||||
void DefaultWebBrowserApplet::OpenExternalWebPage(const std::string& external_url,
|
||||
|
@ -26,7 +26,7 @@ void DefaultWebBrowserApplet::OpenExternalWebPage(const std::string& external_ur
|
|||
LOG_WARNING(Service_AM, "(STUBBED) called, backend requested to open external web page at {}",
|
||||
external_url);
|
||||
|
||||
callback(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/");
|
||||
callback(Service::AM::Frontend::WebExitReason::WindowClosed, "http://localhost/");
|
||||
}
|
||||
|
||||
} // namespace Core::Frontend
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <functional>
|
||||
|
||||
#include "core/frontend/applets/applet.h"
|
||||
#include "core/hle/service/am/applets/applet_web_browser_types.h"
|
||||
#include "core/hle/service/am/frontend/applet_web_browser_types.h"
|
||||
|
||||
namespace Core::Frontend {
|
||||
|
||||
|
@ -14,7 +14,7 @@ class WebBrowserApplet : public Applet {
|
|||
public:
|
||||
using ExtractROMFSCallback = std::function<void()>;
|
||||
using OpenWebPageCallback =
|
||||
std::function<void(Service::AM::Applets::WebExitReason, std::string)>;
|
||||
std::function<void(Service::AM::Frontend::WebExitReason, std::string)>;
|
||||
|
||||
virtual ~WebBrowserApplet();
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ void QtProfileSelectionDialog::SelectUser(const QModelIndex& index) {
|
|||
|
||||
void QtProfileSelectionDialog::SetWindowTitle(
|
||||
const Core::Frontend::ProfileSelectParameters& parameters) {
|
||||
using Service::AM::Applets::UiMode;
|
||||
using Service::AM::Frontend::UiMode;
|
||||
switch (parameters.mode) {
|
||||
case UiMode::UserCreator:
|
||||
case UiMode::UserCreatorForStarter:
|
||||
|
@ -193,7 +193,7 @@ void QtProfileSelectionDialog::SetWindowTitle(
|
|||
|
||||
void QtProfileSelectionDialog::SetDialogPurpose(
|
||||
const Core::Frontend::ProfileSelectParameters& parameters) {
|
||||
using Service::AM::Applets::UserSelectionPurpose;
|
||||
using Service::AM::Frontend::UserSelectionPurpose;
|
||||
|
||||
switch (parameters.purpose) {
|
||||
case UserSelectionPurpose::GameCardRegistration:
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace {
|
||||
|
||||
using namespace Service::AM::Applets;
|
||||
using namespace Service::AM::Frontend;
|
||||
|
||||
constexpr float BASE_HEADER_FONT_SIZE = 23.0f;
|
||||
constexpr float BASE_SUB_FONT_SIZE = 17.0f;
|
||||
|
@ -389,7 +389,7 @@ void QtSoftwareKeyboardDialog::ShowNormalKeyboard(QPoint pos, QSize size) {
|
|||
}
|
||||
|
||||
void QtSoftwareKeyboardDialog::ShowTextCheckDialog(
|
||||
Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) {
|
||||
switch (text_check_result) {
|
||||
case SwkbdTextCheckResult::Success:
|
||||
|
@ -1612,7 +1612,7 @@ void QtSoftwareKeyboard::ShowNormalKeyboard() const {
|
|||
}
|
||||
|
||||
void QtSoftwareKeyboard::ShowTextCheckDialog(
|
||||
Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) const {
|
||||
emit MainWindowShowTextCheckDialog(text_check_result, std::move(text_check_message));
|
||||
}
|
||||
|
@ -1662,12 +1662,12 @@ void QtSoftwareKeyboard::ExitKeyboard() const {
|
|||
emit MainWindowExitKeyboard();
|
||||
}
|
||||
|
||||
void QtSoftwareKeyboard::SubmitNormalText(Service::AM::Applets::SwkbdResult result,
|
||||
void QtSoftwareKeyboard::SubmitNormalText(Service::AM::Frontend::SwkbdResult result,
|
||||
std::u16string submitted_text, bool confirmed) const {
|
||||
submit_normal_callback(result, submitted_text, confirmed);
|
||||
}
|
||||
|
||||
void QtSoftwareKeyboard::SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
||||
void QtSoftwareKeyboard::SubmitInlineText(Service::AM::Frontend::SwkbdReplyType reply_type,
|
||||
std::u16string submitted_text,
|
||||
s32 cursor_position) const {
|
||||
submit_inline_callback(reply_type, submitted_text, cursor_position);
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
void ShowNormalKeyboard(QPoint pos, QSize size);
|
||||
|
||||
void ShowTextCheckDialog(Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
void ShowTextCheckDialog(Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message);
|
||||
|
||||
void ShowInlineKeyboard(Core::Frontend::InlineAppearParameters appear_parameters, QPoint pos,
|
||||
|
@ -52,10 +52,10 @@ public:
|
|||
void ExitKeyboard();
|
||||
|
||||
signals:
|
||||
void SubmitNormalText(Service::AM::Applets::SwkbdResult result, std::u16string submitted_text,
|
||||
void SubmitNormalText(Service::AM::Frontend::SwkbdResult result, std::u16string submitted_text,
|
||||
bool confirmed = false) const;
|
||||
|
||||
void SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
||||
void SubmitInlineText(Service::AM::Frontend::SwkbdReplyType reply_type,
|
||||
std::u16string submitted_text, s32 cursor_position) const;
|
||||
|
||||
public slots:
|
||||
|
@ -244,7 +244,7 @@ public:
|
|||
|
||||
void ShowNormalKeyboard() const override;
|
||||
|
||||
void ShowTextCheckDialog(Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
void ShowTextCheckDialog(Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) const override;
|
||||
|
||||
void ShowInlineKeyboard(
|
||||
|
@ -262,7 +262,8 @@ signals:
|
|||
|
||||
void MainWindowShowNormalKeyboard() const;
|
||||
|
||||
void MainWindowShowTextCheckDialog(Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
void MainWindowShowTextCheckDialog(
|
||||
Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) const;
|
||||
|
||||
void MainWindowShowInlineKeyboard(
|
||||
|
@ -275,10 +276,10 @@ signals:
|
|||
void MainWindowExitKeyboard() const;
|
||||
|
||||
private:
|
||||
void SubmitNormalText(Service::AM::Applets::SwkbdResult result, std::u16string submitted_text,
|
||||
void SubmitNormalText(Service::AM::Frontend::SwkbdResult result, std::u16string submitted_text,
|
||||
bool confirmed) const;
|
||||
|
||||
void SubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
||||
void SubmitInlineText(Service::AM::Frontend::SwkbdReplyType reply_type,
|
||||
std::u16string submitted_text, s32 cursor_position) const;
|
||||
|
||||
mutable SubmitNormalCallback submit_normal_callback;
|
||||
|
|
|
@ -96,7 +96,7 @@ QtNXWebEngineView::QtNXWebEngineView(QWidget* parent, Core::System& system,
|
|||
[this] {
|
||||
if (page()->url() == url_interceptor->GetRequestedURL()) {
|
||||
SetFinished(true);
|
||||
SetExitReason(Service::AM::Applets::WebExitReason::WindowClosed);
|
||||
SetExitReason(Service::AM::Frontend::WebExitReason::WindowClosed);
|
||||
}
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
|
@ -115,7 +115,7 @@ void QtNXWebEngineView::LoadLocalWebPage(const std::string& main_url,
|
|||
FocusFirstLinkElement();
|
||||
SetUserAgent(UserAgent::WebApplet);
|
||||
SetFinished(false);
|
||||
SetExitReason(Service::AM::Applets::WebExitReason::EndButtonPressed);
|
||||
SetExitReason(Service::AM::Frontend::WebExitReason::EndButtonPressed);
|
||||
SetLastURL("http://localhost/");
|
||||
StartInputThread();
|
||||
|
||||
|
@ -130,7 +130,7 @@ void QtNXWebEngineView::LoadExternalWebPage(const std::string& main_url,
|
|||
FocusFirstLinkElement();
|
||||
SetUserAgent(UserAgent::WebApplet);
|
||||
SetFinished(false);
|
||||
SetExitReason(Service::AM::Applets::WebExitReason::EndButtonPressed);
|
||||
SetExitReason(Service::AM::Frontend::WebExitReason::EndButtonPressed);
|
||||
SetLastURL("http://localhost/");
|
||||
StartInputThread();
|
||||
|
||||
|
@ -170,11 +170,11 @@ void QtNXWebEngineView::SetFinished(bool finished_) {
|
|||
finished = finished_;
|
||||
}
|
||||
|
||||
Service::AM::Applets::WebExitReason QtNXWebEngineView::GetExitReason() const {
|
||||
Service::AM::Frontend::WebExitReason QtNXWebEngineView::GetExitReason() const {
|
||||
return exit_reason;
|
||||
}
|
||||
|
||||
void QtNXWebEngineView::SetExitReason(Service::AM::Applets::WebExitReason exit_reason_) {
|
||||
void QtNXWebEngineView::SetExitReason(Service::AM::Frontend::WebExitReason exit_reason_) {
|
||||
exit_reason = exit_reason_;
|
||||
}
|
||||
|
||||
|
@ -441,7 +441,7 @@ void QtWebBrowser::MainWindowExtractOfflineRomFS() {
|
|||
extract_romfs_callback();
|
||||
}
|
||||
|
||||
void QtWebBrowser::MainWindowWebBrowserClosed(Service::AM::Applets::WebExitReason exit_reason,
|
||||
void QtWebBrowser::MainWindowWebBrowserClosed(Service::AM::Frontend::WebExitReason exit_reason,
|
||||
std::string last_url) {
|
||||
if (callback) {
|
||||
callback(exit_reason, last_url);
|
||||
|
|
|
@ -85,8 +85,8 @@ public:
|
|||
[[nodiscard]] bool IsFinished() const;
|
||||
void SetFinished(bool finished_);
|
||||
|
||||
[[nodiscard]] Service::AM::Applets::WebExitReason GetExitReason() const;
|
||||
void SetExitReason(Service::AM::Applets::WebExitReason exit_reason_);
|
||||
[[nodiscard]] Service::AM::Frontend::WebExitReason GetExitReason() const;
|
||||
void SetExitReason(Service::AM::Frontend::WebExitReason exit_reason_);
|
||||
|
||||
[[nodiscard]] const std::string& GetLastURL() const;
|
||||
void SetLastURL(std::string last_url_);
|
||||
|
@ -176,8 +176,8 @@ private:
|
|||
|
||||
std::atomic<bool> finished{};
|
||||
|
||||
Service::AM::Applets::WebExitReason exit_reason{
|
||||
Service::AM::Applets::WebExitReason::EndButtonPressed};
|
||||
Service::AM::Frontend::WebExitReason exit_reason{
|
||||
Service::AM::Frontend::WebExitReason::EndButtonPressed};
|
||||
|
||||
std::string last_url{"http://localhost/"};
|
||||
|
||||
|
@ -212,7 +212,7 @@ signals:
|
|||
private:
|
||||
void MainWindowExtractOfflineRomFS();
|
||||
|
||||
void MainWindowWebBrowserClosed(Service::AM::Applets::WebExitReason exit_reason,
|
||||
void MainWindowWebBrowserClosed(Service::AM::Frontend::WebExitReason exit_reason,
|
||||
std::string last_url);
|
||||
|
||||
mutable ExtractROMFSCallback extract_romfs_callback;
|
||||
|
|
|
@ -39,14 +39,14 @@
|
|||
#include "core/file_sys/vfs/vfs_real.h"
|
||||
#include "core/frontend/applets/cabinet.h"
|
||||
#include "core/frontend/applets/controller.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/software_keyboard.h"
|
||||
#include "core/hle/service/acc/profile_manager.h"
|
||||
#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/applets.h"
|
||||
#include "core/hle/service/am/frontend/applets.h"
|
||||
#include "core/hle/service/set/system_settings_server.h"
|
||||
#include "frontend_common/content_manager.h"
|
||||
#include "hid_core/frontend/emulated_controller.h"
|
||||
|
@ -631,13 +631,14 @@ void GMainWindow::RegisterMetaTypes() {
|
|||
qRegisterMetaType<Core::Frontend::InlineAppearParameters>(
|
||||
"Core::Frontend::InlineAppearParameters");
|
||||
qRegisterMetaType<Core::Frontend::InlineTextParameters>("Core::Frontend::InlineTextParameters");
|
||||
qRegisterMetaType<Service::AM::Applets::SwkbdResult>("Service::AM::Applets::SwkbdResult");
|
||||
qRegisterMetaType<Service::AM::Applets::SwkbdTextCheckResult>(
|
||||
"Service::AM::Applets::SwkbdTextCheckResult");
|
||||
qRegisterMetaType<Service::AM::Applets::SwkbdReplyType>("Service::AM::Applets::SwkbdReplyType");
|
||||
qRegisterMetaType<Service::AM::Frontend::SwkbdResult>("Service::AM::Frontend::SwkbdResult");
|
||||
qRegisterMetaType<Service::AM::Frontend::SwkbdTextCheckResult>(
|
||||
"Service::AM::Frontend::SwkbdTextCheckResult");
|
||||
qRegisterMetaType<Service::AM::Frontend::SwkbdReplyType>(
|
||||
"Service::AM::Frontend::SwkbdReplyType");
|
||||
|
||||
// Web Browser Applet
|
||||
qRegisterMetaType<Service::AM::Applets::WebExitReason>("Service::AM::Applets::WebExitReason");
|
||||
qRegisterMetaType<Service::AM::Frontend::WebExitReason>("Service::AM::Frontend::WebExitReason");
|
||||
|
||||
// Register loader types
|
||||
qRegisterMetaType<Core::SystemResultStatus>("Core::SystemResultStatus");
|
||||
|
@ -747,7 +748,7 @@ void GMainWindow::SoftwareKeyboardInitialize(
|
|||
if (is_inline) {
|
||||
connect(
|
||||
software_keyboard, &QtSoftwareKeyboardDialog::SubmitInlineText, this,
|
||||
[this](Service::AM::Applets::SwkbdReplyType reply_type, std::u16string submitted_text,
|
||||
[this](Service::AM::Frontend::SwkbdReplyType reply_type, std::u16string submitted_text,
|
||||
s32 cursor_position) {
|
||||
emit SoftwareKeyboardSubmitInlineText(reply_type, submitted_text, cursor_position);
|
||||
},
|
||||
|
@ -755,7 +756,7 @@ void GMainWindow::SoftwareKeyboardInitialize(
|
|||
} else {
|
||||
connect(
|
||||
software_keyboard, &QtSoftwareKeyboardDialog::SubmitNormalText, this,
|
||||
[this](Service::AM::Applets::SwkbdResult result, std::u16string submitted_text,
|
||||
[this](Service::AM::Frontend::SwkbdResult result, std::u16string submitted_text,
|
||||
bool confirmed) {
|
||||
emit SoftwareKeyboardSubmitNormalText(result, submitted_text, confirmed);
|
||||
},
|
||||
|
@ -782,7 +783,7 @@ void GMainWindow::SoftwareKeyboardShowNormal() {
|
|||
}
|
||||
|
||||
void GMainWindow::SoftwareKeyboardShowTextCheck(
|
||||
Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message) {
|
||||
if (!software_keyboard) {
|
||||
LOG_ERROR(Frontend, "The software keyboard is not initialized!");
|
||||
|
@ -853,7 +854,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
|
|||
|
||||
// Raw input breaks with the web applet, Disable web applets if enabled
|
||||
if (UISettings::values.disable_web_applet || Settings::values.enable_raw_input) {
|
||||
emit WebBrowserClosed(Service::AM::Applets::WebExitReason::WindowClosed,
|
||||
emit WebBrowserClosed(Service::AM::Frontend::WebExitReason::WindowClosed,
|
||||
"http://localhost/");
|
||||
return;
|
||||
}
|
||||
|
@ -941,7 +942,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
|
|||
if (variant.toBool()) {
|
||||
web_applet->SetFinished(true);
|
||||
web_applet->SetExitReason(
|
||||
Service::AM::Applets::WebExitReason::EndButtonPressed);
|
||||
Service::AM::Frontend::WebExitReason::EndButtonPressed);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -951,7 +952,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
|
|||
if (web_applet->GetCurrentURL().contains(QStringLiteral("localhost"))) {
|
||||
if (!web_applet->IsFinished()) {
|
||||
web_applet->SetFinished(true);
|
||||
web_applet->SetExitReason(Service::AM::Applets::WebExitReason::CallbackURL);
|
||||
web_applet->SetExitReason(Service::AM::Frontend::WebExitReason::CallbackURL);
|
||||
}
|
||||
|
||||
web_applet->SetLastURL(web_applet->GetCurrentURL().toStdString());
|
||||
|
@ -984,7 +985,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
|
|||
#else
|
||||
|
||||
// Utilize the same fallback as the default web browser applet.
|
||||
emit WebBrowserClosed(Service::AM::Applets::WebExitReason::WindowClosed, "http://localhost/");
|
||||
emit WebBrowserClosed(Service::AM::Frontend::WebExitReason::WindowClosed, "http://localhost/");
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -992,7 +993,7 @@ void GMainWindow::WebBrowserOpenWebPage(const std::string& main_url,
|
|||
void GMainWindow::WebBrowserRequestExit() {
|
||||
#ifdef YUZU_USE_QT_WEB_ENGINE
|
||||
if (web_applet) {
|
||||
web_applet->SetExitReason(Service::AM::Applets::WebExitReason::ExitRequested);
|
||||
web_applet->SetExitReason(Service::AM::Frontend::WebExitReason::ExitRequested);
|
||||
web_applet->SetFinished(true);
|
||||
}
|
||||
#endif
|
||||
|
@ -1778,7 +1779,7 @@ bool GMainWindow::LoadROM(const QString& filename, u64 program_id, std::size_t p
|
|||
system->GetUserChannel().clear();
|
||||
}
|
||||
|
||||
system->SetAppletFrontendSet({
|
||||
system->SetFrontendAppletSet({
|
||||
std::make_unique<QtAmiiboSettings>(*this), // Amiibo Settings
|
||||
(UISettings::values.controller_applet_disabled.GetValue() == true)
|
||||
? nullptr
|
||||
|
@ -1921,7 +1922,7 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
|
|||
LOG_INFO(Frontend, "yuzu starting...");
|
||||
|
||||
if (program_id == 0 ||
|
||||
program_id > static_cast<u64>(Service::AM::Applets::AppletProgramId::MaxProgramId)) {
|
||||
program_id > static_cast<u64>(Service::AM::AppletProgramId::MaxProgramId)) {
|
||||
StoreRecentFile(filename); // Put the filename on top of the list
|
||||
}
|
||||
|
||||
|
@ -1955,10 +1956,10 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
|
|||
|
||||
if (UISettings::values.select_user_on_boot && !user_flag_cmd_line) {
|
||||
const Core::Frontend::ProfileSelectParameters parameters{
|
||||
.mode = Service::AM::Applets::UiMode::UserSelector,
|
||||
.mode = Service::AM::Frontend::UiMode::UserSelector,
|
||||
.invalid_uid_list = {},
|
||||
.display_options = {},
|
||||
.purpose = Service::AM::Applets::UserSelectionPurpose::General,
|
||||
.purpose = Service::AM::Frontend::UserSelectionPurpose::General,
|
||||
};
|
||||
if (SelectAndSetCurrentUser(parameters) == false) {
|
||||
return;
|
||||
|
@ -2161,7 +2162,7 @@ void GMainWindow::OnEmulationStopped() {
|
|||
OnTasStateChanged();
|
||||
render_window->FinalizeCamera();
|
||||
|
||||
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::None);
|
||||
system->GetFrontendAppletHolder().SetCurrentAppletId(Service::AM::AppletId::None);
|
||||
|
||||
// Enable all controllers
|
||||
system->HIDCore().SetSupportedStyleTag({Core::HID::NpadStyleSet::All});
|
||||
|
@ -2281,10 +2282,10 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target
|
|||
// User save data
|
||||
const auto select_profile = [this] {
|
||||
const Core::Frontend::ProfileSelectParameters parameters{
|
||||
.mode = Service::AM::Applets::UiMode::UserSelector,
|
||||
.mode = Service::AM::Frontend::UiMode::UserSelector,
|
||||
.invalid_uid_list = {},
|
||||
.display_options = {},
|
||||
.purpose = Service::AM::Applets::UserSelectionPurpose::General,
|
||||
.purpose = Service::AM::Frontend::UserSelectionPurpose::General,
|
||||
};
|
||||
QtProfileSelectionDialog dialog(*system, this, parameters);
|
||||
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
|
||||
|
@ -4154,7 +4155,7 @@ void GMainWindow::OnToggleStatusBar() {
|
|||
}
|
||||
|
||||
void GMainWindow::OnAlbum() {
|
||||
constexpr u64 AlbumId = static_cast<u64>(Service::AM::Applets::AppletProgramId::PhotoViewer);
|
||||
constexpr u64 AlbumId = static_cast<u64>(Service::AM::AppletProgramId::PhotoViewer);
|
||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||
if (!bis_system) {
|
||||
QMessageBox::warning(this, tr("No firmware available"),
|
||||
|
@ -4169,7 +4170,7 @@ void GMainWindow::OnAlbum() {
|
|||
return;
|
||||
}
|
||||
|
||||
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::PhotoViewer);
|
||||
system->GetFrontendAppletHolder().SetCurrentAppletId(Service::AM::AppletId::PhotoViewer);
|
||||
|
||||
const auto filename = QString::fromStdString(album_nca->GetFullPath());
|
||||
UISettings::values.roms_path = QFileInfo(filename).path().toStdString();
|
||||
|
@ -4177,7 +4178,7 @@ void GMainWindow::OnAlbum() {
|
|||
}
|
||||
|
||||
void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) {
|
||||
constexpr u64 CabinetId = static_cast<u64>(Service::AM::Applets::AppletProgramId::Cabinet);
|
||||
constexpr u64 CabinetId = static_cast<u64>(Service::AM::AppletProgramId::Cabinet);
|
||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||
if (!bis_system) {
|
||||
QMessageBox::warning(this, tr("No firmware available"),
|
||||
|
@ -4192,8 +4193,8 @@ void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) {
|
|||
return;
|
||||
}
|
||||
|
||||
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::Cabinet);
|
||||
system->GetAppletManager().SetCabinetMode(mode);
|
||||
system->GetFrontendAppletHolder().SetCurrentAppletId(Service::AM::AppletId::Cabinet);
|
||||
system->GetFrontendAppletHolder().SetCabinetMode(mode);
|
||||
|
||||
const auto filename = QString::fromStdString(cabinet_nca->GetFullPath());
|
||||
UISettings::values.roms_path = QFileInfo(filename).path().toStdString();
|
||||
|
@ -4201,7 +4202,7 @@ void GMainWindow::OnCabinet(Service::NFP::CabinetMode mode) {
|
|||
}
|
||||
|
||||
void GMainWindow::OnMiiEdit() {
|
||||
constexpr u64 MiiEditId = static_cast<u64>(Service::AM::Applets::AppletProgramId::MiiEdit);
|
||||
constexpr u64 MiiEditId = static_cast<u64>(Service::AM::AppletProgramId::MiiEdit);
|
||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||
if (!bis_system) {
|
||||
QMessageBox::warning(this, tr("No firmware available"),
|
||||
|
@ -4216,7 +4217,7 @@ void GMainWindow::OnMiiEdit() {
|
|||
return;
|
||||
}
|
||||
|
||||
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::MiiEdit);
|
||||
system->GetFrontendAppletHolder().SetCurrentAppletId(Service::AM::AppletId::MiiEdit);
|
||||
|
||||
const auto filename = QString::fromStdString((mii_applet_nca->GetFullPath()));
|
||||
UISettings::values.roms_path = QFileInfo(filename).path().toStdString();
|
||||
|
@ -4224,8 +4225,7 @@ void GMainWindow::OnMiiEdit() {
|
|||
}
|
||||
|
||||
void GMainWindow::OnOpenControllerMenu() {
|
||||
constexpr u64 ControllerAppletId =
|
||||
static_cast<u64>(Service::AM::Applets::AppletProgramId::Controller);
|
||||
constexpr u64 ControllerAppletId = static_cast<u64>(Service::AM::AppletProgramId::Controller);
|
||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||
if (!bis_system) {
|
||||
QMessageBox::warning(this, tr("No firmware available"),
|
||||
|
@ -4241,7 +4241,7 @@ void GMainWindow::OnOpenControllerMenu() {
|
|||
return;
|
||||
}
|
||||
|
||||
system->GetAppletManager().SetCurrentAppletId(Service::AM::Applets::AppletId::Controller);
|
||||
system->GetFrontendAppletHolder().SetCurrentAppletId(Service::AM::AppletId::Controller);
|
||||
|
||||
const auto filename = QString::fromStdString((controller_applet_nca->GetFullPath()));
|
||||
UISettings::values.roms_path = QFileInfo(filename).path().toStdString();
|
||||
|
@ -4565,7 +4565,7 @@ void GMainWindow::OnCheckFirmwareDecryption() {
|
|||
}
|
||||
|
||||
bool GMainWindow::CheckFirmwarePresence() {
|
||||
constexpr u64 MiiEditId = static_cast<u64>(Service::AM::Applets::AppletProgramId::MiiEdit);
|
||||
constexpr u64 MiiEditId = static_cast<u64>(Service::AM::AppletProgramId::MiiEdit);
|
||||
|
||||
auto bis_system = system->GetFileSystemController().GetSystemNANDContents();
|
||||
if (!bis_system) {
|
||||
|
|
|
@ -101,12 +101,12 @@ namespace InputCommon {
|
|||
class InputSubsystem;
|
||||
}
|
||||
|
||||
namespace Service::AM::Applets {
|
||||
namespace Service::AM::Frontend {
|
||||
enum class SwkbdResult : u32;
|
||||
enum class SwkbdTextCheckResult : u32;
|
||||
enum class SwkbdReplyType : u32;
|
||||
enum class WebExitReason : u32;
|
||||
} // namespace Service::AM::Applets
|
||||
} // namespace Service::AM::Frontend
|
||||
|
||||
namespace Service::NFC {
|
||||
class NfcDevice;
|
||||
|
@ -204,13 +204,13 @@ signals:
|
|||
|
||||
void ProfileSelectorFinishedSelection(std::optional<Common::UUID> uuid);
|
||||
|
||||
void SoftwareKeyboardSubmitNormalText(Service::AM::Applets::SwkbdResult result,
|
||||
void SoftwareKeyboardSubmitNormalText(Service::AM::Frontend::SwkbdResult result,
|
||||
std::u16string submitted_text, bool confirmed);
|
||||
void SoftwareKeyboardSubmitInlineText(Service::AM::Applets::SwkbdReplyType reply_type,
|
||||
void SoftwareKeyboardSubmitInlineText(Service::AM::Frontend::SwkbdReplyType reply_type,
|
||||
std::u16string submitted_text, s32 cursor_position);
|
||||
|
||||
void WebBrowserExtractOfflineRomFS();
|
||||
void WebBrowserClosed(Service::AM::Applets::WebExitReason exit_reason, std::string last_url);
|
||||
void WebBrowserClosed(Service::AM::Frontend::WebExitReason exit_reason, std::string last_url);
|
||||
|
||||
void SigInterrupt();
|
||||
|
||||
|
@ -228,7 +228,8 @@ public slots:
|
|||
void SoftwareKeyboardInitialize(
|
||||
bool is_inline, Core::Frontend::KeyboardInitializeParameters initialize_parameters);
|
||||
void SoftwareKeyboardShowNormal();
|
||||
void SoftwareKeyboardShowTextCheck(Service::AM::Applets::SwkbdTextCheckResult text_check_result,
|
||||
void SoftwareKeyboardShowTextCheck(
|
||||
Service::AM::Frontend::SwkbdTextCheckResult text_check_result,
|
||||
std::u16string text_check_message);
|
||||
void SoftwareKeyboardShowInline(Core::Frontend::InlineAppearParameters appear_parameters);
|
||||
void SoftwareKeyboardHideInline();
|
||||
|
|
Loading…
Reference in a new issue