diff --git a/src/ns_srvget_mitm_service.cpp b/src/ns_srvget_mitm_service.cpp index 2c08700..c8e2046 100644 --- a/src/ns_srvget_mitm_service.cpp +++ b/src/ns_srvget_mitm_service.cpp @@ -103,7 +103,7 @@ ams::Result NsROAppControlDataService::GetAppControlData(u8 flag, u64 tid, const .buffers = {{buffer.GetPointer(), buffer.GetSize()}}, ); - FILE_LOG_IPC_CLASS("(%u, 0x%016lx, buf[0x%lx]) // %x[0x%lx]", flag, tid, buffer.GetSize(), rc, out_size.GetValue()); + FILE_LOG_IPC_CLASS("(%u, 0x%016lx, buf[0x%lx]) // %x[0x%lx]", flag, tid, buffer.GetSize(), rc, out_size.GetValue()); if(R_SUCCEEDED(rc) && FileUtils::WaitInitialized()) { _ProcessControlData(tid, buffer.GetPointer(), buffer.GetSize(), out_size.GetPointer()); @@ -128,3 +128,41 @@ ams::Result NsROAppControlDataService::ConvertLanguageCodeToAppLanguage(u64 lang FILE_LOG_IPC_CLASS("(0x%016lx); // %x[0x%02x]", langcode, rc, out_langentry.GetValue()); return rc; } + +ams::Result NsROAppControlDataService::SelectApplicationDesiredLanguage() { + Result rc = serviceDispatch(this->srv.get(), NsROAppControlDataInterfaceCmdId::SelectApplicationDesiredLanguage); + FILE_LOG_IPC_CLASS("(); // %x", rc); + return rc; +} + +ams::Result NsROAppControlDataService::Unk1(u8 flag, u64 tid, const ams::sf::OutBuffer &buffer, ams::sf::Out out_size) { + const struct { + u8 flag; + u64 tid; + } in = {flag, tid}; + + Result rc = serviceDispatchInOut(this->srv.get(), NsROAppControlDataInterfaceCmdId::Unk1, in, *out_size.GetPointer(), + .buffer_attrs = {SfBufferAttr_HipcMapAlias | SfBufferAttr_Out}, + .buffers = {{buffer.GetPointer(), buffer.GetSize()}}, + ); + + FILE_LOG_IPC_CLASS("(%u, 0x%016lx, buf[0x%lx]) // %x[0x%lx]", flag, tid, buffer.GetSize(), rc, out_size.GetValue()); + + return rc; +} + +ams::Result NsROAppControlDataService::Unk2(u8 flag, u64 tid, const ams::sf::OutBuffer &buffer, ams::sf::Out out_size) { + const struct { + u8 flag; + u64 tid; + } in = {flag, tid}; + + Result rc = serviceDispatchInOut(this->srv.get(), NsROAppControlDataInterfaceCmdId::Unk2, in, *out_size.GetPointer(), + .buffer_attrs = {SfBufferAttr_HipcMapAlias | SfBufferAttr_Out}, + .buffers = {{buffer.GetPointer(), buffer.GetSize()}}, + ); + + FILE_LOG_IPC_CLASS("(%u, 0x%016lx, buf[0x%lx]) // %x[0x%lx]", flag, tid, buffer.GetSize(), rc, out_size.GetValue()); + + return rc; +} diff --git a/src/ns_srvget_mitm_service.hpp b/src/ns_srvget_mitm_service.hpp index 14fee56..51e0b9e 100644 --- a/src/ns_srvget_mitm_service.hpp +++ b/src/ns_srvget_mitm_service.hpp @@ -24,13 +24,19 @@ enum NsROAppControlDataInterfaceCmdId : u32 { GetAppDesiredLanguage = 1, ConvertAppLanguageToLanguageCode = 2, ConvertLanguageCodeToAppLanguage = 3, + SelectApplicationDesiredLanguage = 4, + Unk1 = 5, + Unk2 = 6, }; #define NS_RO_APP_CONTROL_DATA_INTERFACE_INFO(C, H) \ AMS_SF_METHOD_INFO_F(C, H, NsROAppControlDataInterfaceCmdId, GetAppControlData, (u8 flag, u64 tid, const ams::sf::OutBuffer &buffer, ams::sf::Out out_count), (flag, tid, buffer, out_count)) \ AMS_SF_METHOD_INFO_F(C, H, NsROAppControlDataInterfaceCmdId, GetAppDesiredLanguage, (u32 bitmask, ams::sf::Out out_langentry), (bitmask, out_langentry)) \ AMS_SF_METHOD_INFO_F(C, H, NsROAppControlDataInterfaceCmdId, ConvertAppLanguageToLanguageCode, (u8 langentry, ams::sf::Out langcode), (langentry, langcode)) \ - AMS_SF_METHOD_INFO_F(C, H, NsROAppControlDataInterfaceCmdId, ConvertLanguageCodeToAppLanguage, (u64 langcode, ams::sf::Out langentry), (langcode, langentry)) + AMS_SF_METHOD_INFO_F(C, H, NsROAppControlDataInterfaceCmdId, ConvertLanguageCodeToAppLanguage, (u64 langcode, ams::sf::Out langentry), (langcode, langentry)) \ + AMS_SF_METHOD_INFO_F(C, H, NsROAppControlDataInterfaceCmdId, SelectApplicationDesiredLanguage, (), ()) \ + AMS_SF_METHOD_INFO_F(C, H, NsROAppControlDataInterfaceCmdId, Unk1, (u8 flag, u64 tid, const ams::sf::OutBuffer &buffer, ams::sf::Out out_count), (flag, tid, buffer, out_count)) \ + AMS_SF_METHOD_INFO_F(C, H, NsROAppControlDataInterfaceCmdId, Unk2, (u8 flag, u64 tid, const ams::sf::OutBuffer &buffer, ams::sf::Out out_count), (flag, tid, buffer, out_count)) AMS_SF_DEFINE_INTERFACE_F(NsROAppControlDataInterface, NS_RO_APP_CONTROL_DATA_INTERFACE_INFO);