summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar german772023-09-21 21:38:58 -0600
committerGravatar german772023-09-23 20:14:33 -0600
commitc46f54b09172bd43c40004a7276cf2cae720822b (patch)
tree7bce0d1dcc005dda0b2ab7b6d56102850e94515a /src
parentservice: fsp: Implement CreateSaveDataFileSystemBySystemSaveDataId and OpenSa... (diff)
downloadyuzu-c46f54b09172bd43c40004a7276cf2cae720822b.tar.gz
yuzu-c46f54b09172bd43c40004a7276cf2cae720822b.tar.xz
yuzu-c46f54b09172bd43c40004a7276cf2cae720822b.zip
service: am: Implement stuff needed for Mii Edit
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/am.cpp184
-rw-r--r--src/core/hle/service/am/am.h28
-rw-r--r--src/core/hle/service/am/applet_ae.cpp48
3 files changed, 238 insertions, 22 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 8ffdd19e7..7c705651a 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -19,6 +19,7 @@
19#include "core/hle/service/am/am.h" 19#include "core/hle/service/am/am.h"
20#include "core/hle/service/am/applet_ae.h" 20#include "core/hle/service/am/applet_ae.h"
21#include "core/hle/service/am/applet_oe.h" 21#include "core/hle/service/am/applet_oe.h"
22#include "core/hle/service/am/applets/applet_mii_edit_types.h"
22#include "core/hle/service/am/applets/applet_profile_select.h" 23#include "core/hle/service/am/applets/applet_profile_select.h"
23#include "core/hle/service/am/applets/applet_web_browser.h" 24#include "core/hle/service/am/applets/applet_web_browser.h"
24#include "core/hle/service/am/applets/applets.h" 25#include "core/hle/service/am/applets/applets.h"
@@ -724,7 +725,7 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_,
724 {110, nullptr, "OpenMyGpuErrorHandler"}, 725 {110, nullptr, "OpenMyGpuErrorHandler"},
725 {120, nullptr, "GetAppletLaunchedHistory"}, 726 {120, nullptr, "GetAppletLaunchedHistory"},
726 {200, nullptr, "GetOperationModeSystemInfo"}, 727 {200, nullptr, "GetOperationModeSystemInfo"},
727 {300, nullptr, "GetSettingsPlatformRegion"}, 728 {300, &ICommonStateGetter::GetSettingsPlatformRegion, "GetSettingsPlatformRegion"},
728 {400, nullptr, "ActivateMigrationService"}, 729 {400, nullptr, "ActivateMigrationService"},
729 {401, nullptr, "DeactivateMigrationService"}, 730 {401, nullptr, "DeactivateMigrationService"},
730 {500, nullptr, "DisableSleepTillShutdown"}, 731 {500, nullptr, "DisableSleepTillShutdown"},
@@ -736,6 +737,10 @@ ICommonStateGetter::ICommonStateGetter(Core::System& system_,
736 // clang-format on 737 // clang-format on
737 738
738 RegisterHandlers(functions); 739 RegisterHandlers(functions);
740
741 // Configure applets to be in foreground state
742 msg_queue->PushMessage(AppletMessageQueue::AppletMessage::FocusStateChanged);
743 msg_queue->PushMessage(AppletMessageQueue::AppletMessage::ChangeIntoForeground);
739} 744}
740 745
741ICommonStateGetter::~ICommonStateGetter() = default; 746ICommonStateGetter::~ICommonStateGetter() = default;
@@ -867,6 +872,14 @@ void ICommonStateGetter::PerformSystemButtonPressingIfInFocus(HLERequestContext&
867 rb.Push(ResultSuccess); 872 rb.Push(ResultSuccess);
868} 873}
869 874
875void ICommonStateGetter::GetSettingsPlatformRegion(HLERequestContext& ctx) {
876 LOG_WARNING(Service_AM, "(STUBBED) called");
877
878 IPC::ResponseBuilder rb{ctx, 3};
879 rb.Push(ResultSuccess);
880 rb.PushEnum(SysPlatformRegion::Global);
881}
882
870void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled( 883void ICommonStateGetter::SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(
871 HLERequestContext& ctx) { 884 HLERequestContext& ctx) {
872 LOG_WARNING(Service_AM, "(STUBBED) called"); 885 LOG_WARNING(Service_AM, "(STUBBED) called");
@@ -1324,18 +1337,19 @@ void ILibraryAppletCreator::CreateHandleStorage(HLERequestContext& ctx) {
1324 1337
1325ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_) 1338ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_)
1326 : ServiceFramework{system_, "ILibraryAppletSelfAccessor"} { 1339 : ServiceFramework{system_, "ILibraryAppletSelfAccessor"} {
1340 // clang-format off
1327 static const FunctionInfo functions[] = { 1341 static const FunctionInfo functions[] = {
1328 {0, nullptr, "PopInData"}, 1342 {0, &ILibraryAppletSelfAccessor::PopInData, "PopInData"},
1329 {1, nullptr, "PushOutData"}, 1343 {1, nullptr, "PushOutData"},
1330 {2, nullptr, "PopInteractiveInData"}, 1344 {2, nullptr, "PopInteractiveInData"},
1331 {3, nullptr, "PushInteractiveOutData"}, 1345 {3, nullptr, "PushInteractiveOutData"},
1332 {5, nullptr, "GetPopInDataEvent"}, 1346 {5, nullptr, "GetPopInDataEvent"},
1333 {6, nullptr, "GetPopInteractiveInDataEvent"}, 1347 {6, nullptr, "GetPopInteractiveInDataEvent"},
1334 {10, nullptr, "ExitProcessAndReturn"}, 1348 {10, nullptr, "ExitProcessAndReturn"},
1335 {11, nullptr, "GetLibraryAppletInfo"}, 1349 {11, &ILibraryAppletSelfAccessor::GetLibraryAppletInfo, "GetLibraryAppletInfo"},
1336 {12, nullptr, "GetMainAppletIdentityInfo"}, 1350 {12, nullptr, "GetMainAppletIdentityInfo"},
1337 {13, nullptr, "CanUseApplicationCore"}, 1351 {13, nullptr, "CanUseApplicationCore"},
1338 {14, nullptr, "GetCallerAppletIdentityInfo"}, 1352 {14, &ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo, "GetCallerAppletIdentityInfo"},
1339 {15, nullptr, "GetMainAppletApplicationControlProperty"}, 1353 {15, nullptr, "GetMainAppletApplicationControlProperty"},
1340 {16, nullptr, "GetMainAppletStorageId"}, 1354 {16, nullptr, "GetMainAppletStorageId"},
1341 {17, nullptr, "GetCallerAppletIdentityInfoStack"}, 1355 {17, nullptr, "GetCallerAppletIdentityInfoStack"},
@@ -1361,10 +1375,126 @@ ILibraryAppletSelfAccessor::ILibraryAppletSelfAccessor(Core::System& system_)
1361 {140, nullptr, "SetApplicationMemoryReservation"}, 1375 {140, nullptr, "SetApplicationMemoryReservation"},
1362 {150, nullptr, "ShouldSetGpuTimeSliceManually"}, 1376 {150, nullptr, "ShouldSetGpuTimeSliceManually"},
1363 }; 1377 };
1378 // clang-format on
1364 RegisterHandlers(functions); 1379 RegisterHandlers(functions);
1380
1381 PushInShowMiiEditData();
1365} 1382}
1366 1383
1367ILibraryAppletSelfAccessor::~ILibraryAppletSelfAccessor() = default; 1384ILibraryAppletSelfAccessor::~ILibraryAppletSelfAccessor() = default;
1385void ILibraryAppletSelfAccessor::PopInData(HLERequestContext& ctx) {
1386 LOG_INFO(Service_AM, "called");
1387
1388 if (queue_data.empty()) {
1389 IPC::ResponseBuilder rb{ctx, 2};
1390 rb.Push(ResultNoDataInChannel);
1391 return;
1392 }
1393
1394 auto data = queue_data.front();
1395 queue_data.pop_front();
1396
1397 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
1398 rb.Push(ResultSuccess);
1399 rb.PushIpcInterface<IStorage>(system, std::move(data));
1400}
1401
1402void ILibraryAppletSelfAccessor::GetLibraryAppletInfo(HLERequestContext& ctx) {
1403 struct LibraryAppletInfo {
1404 Applets::AppletId applet_id;
1405 Applets::LibraryAppletMode library_applet_mode;
1406 };
1407
1408 LOG_WARNING(Service_AM, "(STUBBED) called");
1409
1410 const LibraryAppletInfo applet_info{
1411 .applet_id = Applets::AppletId::MiiEdit,
1412 .library_applet_mode = Applets::LibraryAppletMode::AllForeground,
1413 };
1414
1415 IPC::ResponseBuilder rb{ctx, 4};
1416 rb.Push(ResultSuccess);
1417 rb.PushRaw(applet_info);
1418}
1419
1420void ILibraryAppletSelfAccessor::GetCallerAppletIdentityInfo(HLERequestContext& ctx) {
1421 struct AppletIdentityInfo {
1422 Applets::AppletId applet_id;
1423 INSERT_PADDING_BYTES(0x4);
1424 u64 application_id;
1425 };
1426
1427 LOG_WARNING(Service_AM, "(STUBBED) called");
1428
1429 const AppletIdentityInfo applet_info{
1430 .applet_id = Applets::AppletId::QLaunch,
1431 .application_id = 0x0100000000001000ull,
1432 };
1433
1434 IPC::ResponseBuilder rb{ctx, 6};
1435 rb.Push(ResultSuccess);
1436 rb.PushRaw(applet_info);
1437}
1438
1439void ILibraryAppletSelfAccessor::PushInShowMiiEditData() {
1440 struct MiiEditV3 {
1441 Applets::MiiEditAppletInputCommon common;
1442 Applets::MiiEditAppletInputV3 input;
1443 };
1444 static_assert(sizeof(MiiEditV3) == 0x100, "MiiEditV3 has incorrect size.");
1445
1446 MiiEditV3 mii_arguments{
1447 .common =
1448 {
1449 .version = Applets::MiiEditAppletVersion::Version3,
1450 .applet_mode = Applets::MiiEditAppletMode::ShowMiiEdit,
1451 },
1452 .input{},
1453 };
1454
1455 std::vector<u8> argument_data(sizeof(mii_arguments));
1456 std::memcpy(argument_data.data(), &mii_arguments, sizeof(mii_arguments));
1457
1458 queue_data.emplace_back(std::move(argument_data));
1459}
1460
1461IAppletCommonFunctions::IAppletCommonFunctions(Core::System& system_)
1462 : ServiceFramework{system_, "IAppletCommonFunctions"} {
1463 // clang-format off
1464 static const FunctionInfo functions[] = {
1465 {0, nullptr, "SetTerminateResult"},
1466 {10, nullptr, "ReadThemeStorage"},
1467 {11, nullptr, "WriteThemeStorage"},
1468 {20, nullptr, "PushToAppletBoundChannel"},
1469 {21, nullptr, "TryPopFromAppletBoundChannel"},
1470 {40, nullptr, "GetDisplayLogicalResolution"},
1471 {42, nullptr, "SetDisplayMagnification"},
1472 {50, nullptr, "SetHomeButtonDoubleClickEnabled"},
1473 {51, nullptr, "GetHomeButtonDoubleClickEnabled"},
1474 {52, nullptr, "IsHomeButtonShortPressedBlocked"},
1475 {60, nullptr, "IsVrModeCurtainRequired"},
1476 {61, nullptr, "IsSleepRequiredByHighTemperature"},
1477 {62, nullptr, "IsSleepRequiredByLowBattery"},
1478 {70, &IAppletCommonFunctions::SetCpuBoostRequestPriority, "SetCpuBoostRequestPriority"},
1479 {80, nullptr, "SetHandlingCaptureButtonShortPressedMessageEnabledForApplet"},
1480 {81, nullptr, "SetHandlingCaptureButtonLongPressedMessageEnabledForApplet"},
1481 {90, nullptr, "OpenNamedChannelAsParent"},
1482 {91, nullptr, "OpenNamedChannelAsChild"},
1483 {100, nullptr, "SetApplicationCoreUsageMode"},
1484 };
1485 // clang-format on
1486
1487 RegisterHandlers(functions);
1488}
1489
1490IAppletCommonFunctions::~IAppletCommonFunctions() = default;
1491
1492void IAppletCommonFunctions::SetCpuBoostRequestPriority(HLERequestContext& ctx) {
1493 LOG_WARNING(Service_AM, "(STUBBED) called");
1494
1495 IPC::ResponseBuilder rb{ctx, 2};
1496 rb.Push(ResultSuccess);
1497}
1368 1498
1369IApplicationFunctions::IApplicationFunctions(Core::System& system_) 1499IApplicationFunctions::IApplicationFunctions(Core::System& system_)
1370 : ServiceFramework{system_, "IApplicationFunctions"}, service_context{system, 1500 : ServiceFramework{system_, "IApplicationFunctions"}, service_context{system,
@@ -2049,8 +2179,8 @@ IProcessWindingController::IProcessWindingController(Core::System& system_)
2049 : ServiceFramework{system_, "IProcessWindingController"} { 2179 : ServiceFramework{system_, "IProcessWindingController"} {
2050 // clang-format off 2180 // clang-format off
2051 static const FunctionInfo functions[] = { 2181 static const FunctionInfo functions[] = {
2052 {0, nullptr, "GetLaunchReason"}, 2182 {0, &IProcessWindingController::GetLaunchReason, "GetLaunchReason"},
2053 {11, nullptr, "OpenCallingLibraryApplet"}, 2183 {11, &IProcessWindingController::OpenCallingLibraryApplet, "OpenCallingLibraryApplet"},
2054 {21, nullptr, "PushContext"}, 2184 {21, nullptr, "PushContext"},
2055 {22, nullptr, "PopContext"}, 2185 {22, nullptr, "PopContext"},
2056 {23, nullptr, "CancelWindingReservation"}, 2186 {23, nullptr, "CancelWindingReservation"},
@@ -2064,4 +2194,46 @@ IProcessWindingController::IProcessWindingController(Core::System& system_)
2064} 2194}
2065 2195
2066IProcessWindingController::~IProcessWindingController() = default; 2196IProcessWindingController::~IProcessWindingController() = default;
2197
2198void IProcessWindingController::GetLaunchReason(HLERequestContext& ctx) {
2199 LOG_WARNING(Service_AM, "(STUBBED) called");
2200
2201 struct AppletProcessLaunchReason {
2202 u8 flag;
2203 INSERT_PADDING_BYTES(3);
2204 };
2205 static_assert(sizeof(AppletProcessLaunchReason) == 0x4,
2206 "AppletProcessLaunchReason is an invalid size");
2207
2208 AppletProcessLaunchReason reason{
2209 .flag = 0,
2210 };
2211
2212 IPC::ResponseBuilder rb{ctx, 3};
2213 rb.Push(ResultSuccess);
2214 rb.PushRaw(reason);
2215}
2216
2217void IProcessWindingController::OpenCallingLibraryApplet(HLERequestContext& ctx) {
2218 const auto applet_id = Applets::AppletId::MiiEdit;
2219 const auto applet_mode = Applets::LibraryAppletMode::AllForeground;
2220
2221 LOG_WARNING(Service_AM, "(STUBBED) called with applet_id={:08X}, applet_mode={:08X}", applet_id,
2222 applet_mode);
2223
2224 const auto& applet_manager{system.GetAppletManager()};
2225 const auto applet = applet_manager.GetApplet(applet_id, applet_mode);
2226
2227 if (applet == nullptr) {
2228 LOG_ERROR(Service_AM, "Applet doesn't exist! applet_id={}", applet_id);
2229
2230 IPC::ResponseBuilder rb{ctx, 2};
2231 rb.Push(ResultUnknown);
2232 return;
2233 }
2234
2235 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
2236 rb.Push(ResultSuccess);
2237 rb.PushIpcInterface<ILibraryAppletAccessor>(system, applet);
2238}
2067} // namespace Service::AM 2239} // namespace Service::AM
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index f86841c60..3d5eae44e 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -212,6 +212,11 @@ private:
212 CaptureButtonLongPressing, 212 CaptureButtonLongPressing,
213 }; 213 };
214 214
215 enum class SysPlatformRegion : s32 {
216 Global = 1,
217 Terra = 2,
218 };
219
215 void GetEventHandle(HLERequestContext& ctx); 220 void GetEventHandle(HLERequestContext& ctx);
216 void ReceiveMessage(HLERequestContext& ctx); 221 void ReceiveMessage(HLERequestContext& ctx);
217 void GetCurrentFocusState(HLERequestContext& ctx); 222 void GetCurrentFocusState(HLERequestContext& ctx);
@@ -227,6 +232,7 @@ private:
227 void GetDefaultDisplayResolution(HLERequestContext& ctx); 232 void GetDefaultDisplayResolution(HLERequestContext& ctx);
228 void SetCpuBoostMode(HLERequestContext& ctx); 233 void SetCpuBoostMode(HLERequestContext& ctx);
229 void PerformSystemButtonPressingIfInFocus(HLERequestContext& ctx); 234 void PerformSystemButtonPressingIfInFocus(HLERequestContext& ctx);
235 void GetSettingsPlatformRegion(HLERequestContext& ctx);
230 void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(HLERequestContext& ctx); 236 void SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(HLERequestContext& ctx);
231 237
232 std::shared_ptr<AppletMessageQueue> msg_queue; 238 std::shared_ptr<AppletMessageQueue> msg_queue;
@@ -294,6 +300,24 @@ class ILibraryAppletSelfAccessor final : public ServiceFramework<ILibraryAppletS
294public: 300public:
295 explicit ILibraryAppletSelfAccessor(Core::System& system_); 301 explicit ILibraryAppletSelfAccessor(Core::System& system_);
296 ~ILibraryAppletSelfAccessor() override; 302 ~ILibraryAppletSelfAccessor() override;
303
304private:
305 void PopInData(HLERequestContext& ctx);
306 void GetLibraryAppletInfo(HLERequestContext& ctx);
307 void GetCallerAppletIdentityInfo(HLERequestContext& ctx);
308
309 void PushInShowMiiEditData();
310
311 std::deque<std::vector<u8>> queue_data;
312};
313
314class IAppletCommonFunctions final : public ServiceFramework<IAppletCommonFunctions> {
315public:
316 explicit IAppletCommonFunctions(Core::System& system_);
317 ~IAppletCommonFunctions() override;
318
319private:
320 void SetCpuBoostRequestPriority(HLERequestContext& ctx);
297}; 321};
298 322
299class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> { 323class IApplicationFunctions final : public ServiceFramework<IApplicationFunctions> {
@@ -378,6 +402,10 @@ class IProcessWindingController final : public ServiceFramework<IProcessWindingC
378public: 402public:
379 explicit IProcessWindingController(Core::System& system_); 403 explicit IProcessWindingController(Core::System& system_);
380 ~IProcessWindingController() override; 404 ~IProcessWindingController() override;
405
406private:
407 void GetLaunchReason(HLERequestContext& ctx);
408 void OpenCallingLibraryApplet(HLERequestContext& ctx);
381}; 409};
382 410
383void LoopProcess(Nvnflinger::Nvnflinger& nvnflinger, Core::System& system); 411void LoopProcess(Nvnflinger::Nvnflinger& nvnflinger, Core::System& system);
diff --git a/src/core/hle/service/am/applet_ae.cpp b/src/core/hle/service/am/applet_ae.cpp
index ee9d99a54..eb12312cc 100644
--- a/src/core/hle/service/am/applet_ae.cpp
+++ b/src/core/hle/service/am/applet_ae.cpp
@@ -27,7 +27,7 @@ public:
27 {10, &ILibraryAppletProxy::GetProcessWindingController, "GetProcessWindingController"}, 27 {10, &ILibraryAppletProxy::GetProcessWindingController, "GetProcessWindingController"},
28 {11, &ILibraryAppletProxy::GetLibraryAppletCreator, "GetLibraryAppletCreator"}, 28 {11, &ILibraryAppletProxy::GetLibraryAppletCreator, "GetLibraryAppletCreator"},
29 {20, &ILibraryAppletProxy::OpenLibraryAppletSelfAccessor, "OpenLibraryAppletSelfAccessor"}, 29 {20, &ILibraryAppletProxy::OpenLibraryAppletSelfAccessor, "OpenLibraryAppletSelfAccessor"},
30 {21, nullptr, "GetAppletCommonFunctions"}, 30 {21, &ILibraryAppletProxy::GetAppletCommonFunctions, "GetAppletCommonFunctions"},
31 {22, nullptr, "GetHomeMenuFunctions"}, 31 {22, nullptr, "GetHomeMenuFunctions"},
32 {23, nullptr, "GetGlobalStateController"}, 32 {23, nullptr, "GetGlobalStateController"},
33 {1000, &ILibraryAppletProxy::GetDebugFunctions, "GetDebugFunctions"}, 33 {1000, &ILibraryAppletProxy::GetDebugFunctions, "GetDebugFunctions"},
@@ -86,28 +86,36 @@ private:
86 rb.PushIpcInterface<IProcessWindingController>(system); 86 rb.PushIpcInterface<IProcessWindingController>(system);
87 } 87 }
88 88
89 void GetDebugFunctions(HLERequestContext& ctx) { 89 void GetLibraryAppletCreator(HLERequestContext& ctx) {
90 LOG_DEBUG(Service_AM, "called"); 90 LOG_DEBUG(Service_AM, "called");
91 91
92 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 92 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
93 rb.Push(ResultSuccess); 93 rb.Push(ResultSuccess);
94 rb.PushIpcInterface<IDebugFunctions>(system); 94 rb.PushIpcInterface<ILibraryAppletCreator>(system);
95 } 95 }
96 96
97 void GetLibraryAppletCreator(HLERequestContext& ctx) { 97 void OpenLibraryAppletSelfAccessor(HLERequestContext& ctx) {
98 LOG_DEBUG(Service_AM, "called"); 98 LOG_DEBUG(Service_AM, "called");
99 99
100 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 100 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
101 rb.Push(ResultSuccess); 101 rb.Push(ResultSuccess);
102 rb.PushIpcInterface<ILibraryAppletCreator>(system); 102 rb.PushIpcInterface<ILibraryAppletSelfAccessor>(system);
103 } 103 }
104 104
105 void OpenLibraryAppletSelfAccessor(HLERequestContext& ctx) { 105 void GetAppletCommonFunctions(HLERequestContext& ctx) {
106 LOG_DEBUG(Service_AM, "called"); 106 LOG_DEBUG(Service_AM, "called");
107 107
108 IPC::ResponseBuilder rb{ctx, 2, 0, 1}; 108 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
109 rb.Push(ResultSuccess); 109 rb.Push(ResultSuccess);
110 rb.PushIpcInterface<ILibraryAppletSelfAccessor>(system); 110 rb.PushIpcInterface<IAppletCommonFunctions>(system);
111 }
112
113 void GetDebugFunctions(HLERequestContext& ctx) {
114 LOG_DEBUG(Service_AM, "called");
115
116 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
117 rb.Push(ResultSuccess);
118 rb.PushIpcInterface<IDebugFunctions>(system);
111 } 119 }
112 120
113 Nvnflinger::Nvnflinger& nvnflinger; 121 Nvnflinger::Nvnflinger& nvnflinger;
@@ -133,7 +141,7 @@ public:
133 {20, &ISystemAppletProxy::GetHomeMenuFunctions, "GetHomeMenuFunctions"}, 141 {20, &ISystemAppletProxy::GetHomeMenuFunctions, "GetHomeMenuFunctions"},
134 {21, &ISystemAppletProxy::GetGlobalStateController, "GetGlobalStateController"}, 142 {21, &ISystemAppletProxy::GetGlobalStateController, "GetGlobalStateController"},
135 {22, &ISystemAppletProxy::GetApplicationCreator, "GetApplicationCreator"}, 143 {22, &ISystemAppletProxy::GetApplicationCreator, "GetApplicationCreator"},
136 {23, nullptr, "GetAppletCommonFunctions"}, 144 {23, &ISystemAppletProxy::GetAppletCommonFunctions, "GetAppletCommonFunctions"},
137 {1000, &ISystemAppletProxy::GetDebugFunctions, "GetDebugFunctions"}, 145 {1000, &ISystemAppletProxy::GetDebugFunctions, "GetDebugFunctions"},
138 }; 146 };
139 // clang-format on 147 // clang-format on
@@ -182,14 +190,6 @@ private:
182 rb.PushIpcInterface<IDisplayController>(system); 190 rb.PushIpcInterface<IDisplayController>(system);
183 } 191 }
184 192
185 void GetDebugFunctions(HLERequestContext& ctx) {
186 LOG_DEBUG(Service_AM, "called");
187
188 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
189 rb.Push(ResultSuccess);
190 rb.PushIpcInterface<IDebugFunctions>(system);
191 }
192
193 void GetLibraryAppletCreator(HLERequestContext& ctx) { 193 void GetLibraryAppletCreator(HLERequestContext& ctx) {
194 LOG_DEBUG(Service_AM, "called"); 194 LOG_DEBUG(Service_AM, "called");
195 195
@@ -222,6 +222,22 @@ private:
222 rb.PushIpcInterface<IApplicationCreator>(system); 222 rb.PushIpcInterface<IApplicationCreator>(system);
223 } 223 }
224 224
225 void GetAppletCommonFunctions(HLERequestContext& ctx) {
226 LOG_DEBUG(Service_AM, "called");
227
228 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
229 rb.Push(ResultSuccess);
230 rb.PushIpcInterface<IAppletCommonFunctions>(system);
231 }
232
233 void GetDebugFunctions(HLERequestContext& ctx) {
234 LOG_DEBUG(Service_AM, "called");
235
236 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
237 rb.Push(ResultSuccess);
238 rb.PushIpcInterface<IDebugFunctions>(system);
239 }
240
225 Nvnflinger::Nvnflinger& nvnflinger; 241 Nvnflinger::Nvnflinger& nvnflinger;
226 std::shared_ptr<AppletMessageQueue> msg_queue; 242 std::shared_ptr<AppletMessageQueue> msg_queue;
227}; 243};