updated the implementation of GetAppletManInfo to include the latest information from 3dbrew

This commit is contained in:
noah the goodra 2017-03-24 15:21:14 -05:00
parent ccc3985cc0
commit 3171c3df69
2 changed files with 11 additions and 3 deletions

View File

@ -132,14 +132,14 @@ void Enable(Service::Interface* self) {
void GetAppletManInfo(Service::Interface* self) { void GetAppletManInfo(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer(); u32* cmd_buff = Kernel::GetCommandBuffer();
u32 unk = cmd_buff[1]; AppletPosition applet_position = reinterpret_cast<AppletPosition>(cmd_buff[1]);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error cmd_buff[1] = RESULT_SUCCESS.raw; // No error
cmd_buff[2] = 0; cmd_buff[2] = reinterpret_cast<u32>(applet_position);
cmd_buff[3] = 0; cmd_buff[3] = 0;
cmd_buff[4] = static_cast<u32>(AppletId::HomeMenu); // Home menu AppID cmd_buff[4] = static_cast<u32>(AppletId::HomeMenu); // Home menu AppID
cmd_buff[5] = static_cast<u32>(AppletId::Application); // TODO(purpasmart96): Do this correctly cmd_buff[5] = static_cast<u32>(AppletId::Application); // TODO(purpasmart96): Do this correctly
LOG_WARNING(Service_APT, "(STUBBED) called unk=0x%08X", unk); LOG_WARNING(Service_APT, "(STUBBED) called unk=0x%08X", applet_position);
} }
void IsRegistered(Service::Interface* self) { void IsRegistered(Service::Interface* self) {

View File

@ -113,6 +113,14 @@ enum class ScreencapPostPermission : u32 {
EnableScreenshotPostingToMiiverse = 2, EnableScreenshotPostingToMiiverse = 2,
DisableScreenshotPostingToMiiverse = 3 DisableScreenshotPostingToMiiverse = 3
}; };
enum class AppletPosition : u32 {
POS_NONE = -1,
POS_APP = 0,
POS_APPLIB = 1,
POS_SYS = 2,
POS_SYSLIB = 3,
POS_RESIDENT = 4
};
/// Send a parameter to the currently-running application, which will read it via ReceiveParameter /// Send a parameter to the currently-running application, which will read it via ReceiveParameter
void SendParameter(const MessageParameter& parameter); void SendParameter(const MessageParameter& parameter);