summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-02-12 02:49:45 +0100
committerLiam <byteslice@airmail.cc>2024-02-12 15:18:27 +0100
commita65fb85b6d3f249d2179ad88de29869ec0d38c76 (patch)
treea2e3f2b179b8f0a9be387aa1545b4b7334bb8fe7 /src/core
parentam: add IApplicationAccessor (diff)
downloadyuzu-a65fb85b6d3f249d2179ad88de29869ec0d38c76.tar
yuzu-a65fb85b6d3f249d2179ad88de29869ec0d38c76.tar.gz
yuzu-a65fb85b6d3f249d2179ad88de29869ec0d38c76.tar.bz2
yuzu-a65fb85b6d3f249d2179ad88de29869ec0d38c76.tar.lz
yuzu-a65fb85b6d3f249d2179ad88de29869ec0d38c76.tar.xz
yuzu-a65fb85b6d3f249d2179ad88de29869ec0d38c76.tar.zst
yuzu-a65fb85b6d3f249d2179ad88de29869ec0d38c76.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/core/hle/service/am/service/application_creator.cpp (renamed from src/core/hle/service/am/application_creator.cpp)16
-rw-r--r--src/core/hle/service/am/service/application_creator.h (renamed from src/core/hle/service/am/application_creator.h)7
-rw-r--r--src/core/hle/service/am/service/system_applet_proxy.cpp7
4 files changed, 26 insertions, 8 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index db27e0f3e..8fd99a5e9 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -423,8 +423,6 @@ add_library(core STATIC
hle/service/am/applet_manager.h
hle/service/am/applet_message_queue.cpp
hle/service/am/applet_message_queue.h
- hle/service/am/application_creator.cpp
- hle/service/am/application_creator.h
hle/service/am/hid_registration.cpp
hle/service/am/hid_registration.h
hle/service/am/idle.cpp
@@ -443,6 +441,8 @@ add_library(core STATIC
hle/service/am/service/applet_common_functions.h
hle/service/am/service/application_accessor.cpp
hle/service/am/service/application_accessor.h
+ hle/service/am/service/application_creator.cpp
+ hle/service/am/service/application_creator.h
hle/service/am/service/application_functions.cpp
hle/service/am/service/application_functions.h
hle/service/am/service/application_proxy_service.cpp
diff --git a/src/core/hle/service/am/application_creator.cpp b/src/core/hle/service/am/service/application_creator.cpp
index 79ea045a3..568bb0122 100644
--- a/src/core/hle/service/am/application_creator.cpp
+++ b/src/core/hle/service/am/service/application_creator.cpp
@@ -1,8 +1,12 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hle/service/am/application_creator.h"
-#include "core/hle/service/ipc_helpers.h"
+#include "core/hle/service/am/am_types.h"
+#include "core/hle/service/am/applet.h"
+#include "core/hle/service/am/applet_manager.h"
+#include "core/hle/service/am/service/application_accessor.h"
+#include "core/hle/service/am/service/application_creator.h"
+#include "core/hle/service/cmif_serialization.h"
namespace Service::AM {
@@ -10,7 +14,7 @@ IApplicationCreator::IApplicationCreator(Core::System& system_)
: ServiceFramework{system_, "IApplicationCreator"} {
// clang-format off
static const FunctionInfo functions[] = {
- {0, nullptr, "CreateApplication"},
+ {0, D<&IApplicationCreator::CreateApplication>, "CreateApplication"},
{1, nullptr, "PopLaunchRequestedApplication"},
{10, nullptr, "CreateSystemApplication"},
{100, nullptr, "PopFloatingApplicationForDevelopment"},
@@ -22,4 +26,10 @@ IApplicationCreator::IApplicationCreator(Core::System& system_)
IApplicationCreator::~IApplicationCreator() = default;
+Result IApplicationCreator::CreateApplication(
+ Out<SharedPointer<IApplicationAccessor>> out_application_accessor, u64 application_id) {
+ LOG_ERROR(Service_NS, "called, application_id={:x}", application_id);
+ R_THROW(ResultUnknown);
+}
+
} // namespace Service::AM
diff --git a/src/core/hle/service/am/application_creator.h b/src/core/hle/service/am/service/application_creator.h
index 375a3c476..9f939ebf6 100644
--- a/src/core/hle/service/am/application_creator.h
+++ b/src/core/hle/service/am/service/application_creator.h
@@ -3,14 +3,21 @@
#pragma once
+#include "core/hle/service/cmif_types.h"
#include "core/hle/service/service.h"
namespace Service::AM {
+class IApplicationAccessor;
+struct Applet;
+
class IApplicationCreator final : public ServiceFramework<IApplicationCreator> {
public:
explicit IApplicationCreator(Core::System& system_);
~IApplicationCreator() override;
+
+private:
+ Result CreateApplication(Out<SharedPointer<IApplicationAccessor>>, u64 application_id);
};
} // namespace Service::AM
diff --git a/src/core/hle/service/am/service/system_applet_proxy.cpp b/src/core/hle/service/am/service/system_applet_proxy.cpp
index a3e801799..5ec509d2e 100644
--- a/src/core/hle/service/am/service/system_applet_proxy.cpp
+++ b/src/core/hle/service/am/service/system_applet_proxy.cpp
@@ -1,8 +1,8 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include "core/hle/service/am/application_creator.h"
#include "core/hle/service/am/service/applet_common_functions.h"
+#include "core/hle/service/am/service/application_creator.h"
#include "core/hle/service/am/service/audio_controller.h"
#include "core/hle/service/am/service/common_state_getter.h"
#include "core/hle/service/am/service/debug_functions.h"
@@ -104,8 +104,9 @@ Result ISystemAppletProxy::GetLibraryAppletCreator(
Result ISystemAppletProxy::GetApplicationCreator(
Out<SharedPointer<IApplicationCreator>> out_application_creator) {
- LOG_ERROR(Service_AM, "called");
- R_THROW(ResultUnknown);
+ LOG_DEBUG(Service_AM, "called");
+ *out_application_creator = std::make_shared<IApplicationCreator>(system);
+ R_SUCCEED();
}
Result ISystemAppletProxy::GetAppletCommonFunctions(