Qlauncher firmware 19

This commit is contained in:
Pavel Barabanov 2025-04-14 13:13:50 +03:00 committed by MrPurple666
parent d87ba21d05
commit 1bd86b08f2
15 changed files with 288 additions and 67 deletions

View file

@ -4,6 +4,7 @@
#include "core/core.h"
#include "core/hle/service/am/applet_manager.h"
#include "core/hle/service/am/service/all_system_applet_proxies_service.h"
#include "core/hle/service/am/service/application_proxy.h"
#include "core/hle/service/am/service/library_applet_proxy.h"
#include "core/hle/service/am/service/system_applet_proxy.h"
#include "core/hle/service/am/window_system.h"
@ -20,9 +21,10 @@ IAllSystemAppletProxiesService::IAllSystemAppletProxiesService(Core::System& sys
{200, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld>, "OpenLibraryAppletProxyOld"},
{201, D<&IAllSystemAppletProxiesService::OpenLibraryAppletProxy>, "OpenLibraryAppletProxy"},
{300, nullptr, "OpenOverlayAppletProxy"},
{350, nullptr, "OpenSystemApplicationProxy"},
{350, D<&IAllSystemAppletProxiesService::OpenSystemApplicationProxy>, "OpenSystemApplicationProxy"},
{400, nullptr, "CreateSelfLibraryAppletCreatorForDevelop"},
{410, nullptr, "GetSystemAppletControllerForDebug"},
{450, D<&IAllSystemAppletProxiesService::GetSystemProcessCommonFunctions>, "GetSystemProcessCommonFunctions"}, // 19.0.0+
{1000, nullptr, "GetDebugFunctions"},
};
// clang-format on
@ -63,6 +65,22 @@ Result IAllSystemAppletProxiesService::OpenLibraryAppletProxy(
}
}
Result IAllSystemAppletProxiesService::OpenSystemApplicationProxy(
Out<SharedPointer<IApplicationProxy>> out_system_application_proxy, ClientProcessId pid,
InCopyHandle<Kernel::KProcess> process_handle,
InLargeData<AppletAttribute, BufferAttr_HipcMapAlias> attribute) {
LOG_DEBUG(Service_AM, "called");
if (const auto applet = this->GetAppletFromProcessId(pid); applet) {
*out_system_application_proxy = std::make_shared<IApplicationProxy>(
system, applet, process_handle.Get(), m_window_system);
R_SUCCEED();
} else {
UNIMPLEMENTED();
R_THROW(ResultUnknown);
}
}
Result IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld(
Out<SharedPointer<ILibraryAppletProxy>> out_library_applet_proxy, ClientProcessId pid,
InCopyHandle<Kernel::KProcess> process_handle) {
@ -73,6 +91,14 @@ Result IAllSystemAppletProxiesService::OpenLibraryAppletProxyOld(
this->OpenLibraryAppletProxy(out_library_applet_proxy, pid, process_handle, attribute));
}
Result IAllSystemAppletProxiesService::GetSystemProcessCommonFunctions() {
LOG_DEBUG(Service_AM, "(STUBBED) called.");
// TODO (jarrodnorwell)
R_SUCCEED();
}
std::shared_ptr<Applet> IAllSystemAppletProxiesService::GetAppletFromProcessId(
ProcessId process_id) {
return m_window_system.GetByAppletResourceUserId(process_id.pid);

View file

@ -12,6 +12,7 @@ namespace AM {
struct Applet;
struct AppletAttribute;
class IApplicationProxy;
class ILibraryAppletProxy;
class ISystemAppletProxy;
class WindowSystem;
@ -33,6 +34,11 @@ private:
Result OpenLibraryAppletProxyOld(
Out<SharedPointer<ILibraryAppletProxy>> out_library_applet_proxy, ClientProcessId pid,
InCopyHandle<Kernel::KProcess> process_handle);
Result OpenSystemApplicationProxy(
Out<SharedPointer<IApplicationProxy>> out_system_application_proxy, ClientProcessId pid,
InCopyHandle<Kernel::KProcess> process_handle,
InLargeData<AppletAttribute, BufferAttr_HipcMapAlias> attribute);
Result GetSystemProcessCommonFunctions();
private:
std::shared_ptr<Applet> GetAppletFromProcessId(ProcessId pid);