am: migrate global state to per-applet state structure

This commit is contained in:
Liam
2024-01-02 18:29:03 -05:00
parent 3155f4e96d
commit 182137a9a4
41 changed files with 692 additions and 753 deletions

View File

@ -3,7 +3,6 @@
#include "core/hle/service/am/am.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/idle.h"
#include "core/hle/service/am/omm.h"
@ -13,13 +12,12 @@
namespace Service::AM {
void LoopProcess(Nvnflinger::Nvnflinger& nvnflinger, Core::System& system) {
auto message_queue = std::make_shared<AppletMessageQueue>(system);
auto server_manager = std::make_unique<ServerManager>(system);
server_manager->RegisterNamedService(
"appletAE", std::make_shared<AppletAE>(nvnflinger, message_queue, system));
server_manager->RegisterNamedService(
"appletOE", std::make_shared<AppletOE>(nvnflinger, message_queue, system));
server_manager->RegisterNamedService("appletAE",
std::make_shared<AppletAE>(nvnflinger, system));
server_manager->RegisterNamedService("appletOE",
std::make_shared<AppletOE>(nvnflinger, system));
server_manager->RegisterNamedService("idle:sys", std::make_shared<IdleSys>(system));
server_manager->RegisterNamedService("omm", std::make_shared<OMM>(system));
server_manager->RegisterNamedService("spsm", std::make_shared<SPSM>(system));