mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-23 00:37:03 +02:00
properly start some stuff?
This commit is contained in:
parent
a8d6b4fe60
commit
6b94984041
2 changed files with 15 additions and 9 deletions
|
|
@ -83,9 +83,8 @@ constexpr size_t SlabCountKDeviceAddressSpace = 300;
|
|||
constexpr size_t SlabCountKSession = 1133;
|
||||
constexpr size_t SlabCountKLightSession = 100;
|
||||
constexpr size_t SlabCountKObjectName = 7;
|
||||
// Slight divergence to allow for uLaunch to work properly
|
||||
// TODO(lizzie): This should be 5, shouldn't it?
|
||||
constexpr size_t SlabCountKResourceLimit = 5 + 8;
|
||||
// TODO(lizzie): divergence that allows ulauncher to work
|
||||
constexpr size_t SlabCountKResourceLimit = 5 + 1;
|
||||
constexpr size_t SlabCountKDebug = Core::Hardware::NUM_CPU_CORES;
|
||||
constexpr size_t SlabCountKIoPool = 1;
|
||||
constexpr size_t SlabCountKIoRegion = 6;
|
||||
|
|
|
|||
|
|
@ -49,8 +49,9 @@ AppletIdentityInfo GetCallerIdentity(Applet& applet) {
|
|||
|
||||
ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_,
|
||||
std::shared_ptr<Applet> applet)
|
||||
: ServiceFramework{system_, "ILibraryAppletSelfAccessor"}, m_applet{std::move(applet)},
|
||||
m_broker{m_applet->caller_applet_broker} {
|
||||
: ServiceFramework{system_, "ILibraryAppletSelfAccessor"}, m_applet{std::move(applet)}
|
||||
, m_broker{m_applet->caller_applet_broker}
|
||||
{
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, D<&ILibraryAppletSelfAccessor::PopInData>, "PopInData"},
|
||||
|
|
@ -102,7 +103,7 @@ Result ILibraryAppletSelfAccessor::PopInData(Out<SharedPointer<IStorage>> out_st
|
|||
}
|
||||
|
||||
// uLauncher emulation
|
||||
static Result UloaderCreateApplication(Core::System& system, u64 program_id) {
|
||||
static Result UloaderCreateApplication(Core::System& system, u64 program_id, std::shared_ptr<Applet> caller_applet) {
|
||||
// Get the program NCA from storage.
|
||||
auto& storage = system.GetContentProviderUnion();
|
||||
FileSys::VirtualFile nca_raw = storage.GetEntryRaw(program_id, FileSys::ContentRecordType::Program);
|
||||
|
|
@ -118,6 +119,12 @@ static Result UloaderCreateApplication(Core::System& system, u64 program_id) {
|
|||
applet->applet_id = AppletId::Application;
|
||||
applet->type = AppletType::Application;
|
||||
applet->library_applet_mode = LibraryAppletMode::AllForeground;
|
||||
|
||||
applet->caller_applet = caller_applet;
|
||||
applet->caller_applet_broker = std::make_shared<AppletDataBroker>(system);
|
||||
applet->frontend = caller_applet->frontend;
|
||||
caller_applet->child_applets.push_back(applet);
|
||||
|
||||
system.GetAppletManager().GetWindowSystem()->TrackApplet(applet, true);
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
|
@ -176,7 +183,7 @@ Result ILibraryAppletSelfAccessor::PushOutData(SharedPointer<IStorage> storage)
|
|||
u64 args_value{};
|
||||
std::memcpy(std::addressof(args_value), req_data.data() + sizeof(req_cmd), sizeof(args_value));
|
||||
LOG_WARNING(Service_AM, "program_id={:016x}", args_value);
|
||||
UloaderCreateApplication(system, args_value);
|
||||
UloaderCreateApplication(system, args_value, m_applet);
|
||||
break;
|
||||
}
|
||||
case SystemMessage::ResumeApplication:
|
||||
|
|
@ -202,8 +209,8 @@ Result ILibraryAppletSelfAccessor::PushOutData(SharedPointer<IStorage> storage)
|
|||
case SystemMessage::NotifyWarnedAboutOutdatedTheme:
|
||||
break;
|
||||
case SystemMessage::TerminateMenu:
|
||||
m_applet->process->Terminate();
|
||||
system.GetAppletManager().GetWindowSystem()->RequestApplicationToGetForeground();
|
||||
system.GetUserChannel() = m_applet->user_channel_launch_parameter;
|
||||
system.ExecuteProgram(0);
|
||||
break;
|
||||
case SystemMessage::OpenControllerKeyRemapping:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue