Set client SDK version to Service APIs

This commit is contained in:
mailwl 2016-11-20 08:50:48 +03:00
parent cf5b8483fc
commit 5b136aa211
8 changed files with 88 additions and 16 deletions

View file

@ -100,6 +100,18 @@ void GetMyScreenName(Service::Interface* self) {
LOG_WARNING(Service_FRD, "(STUBBED) called");
}
void SetClientSdkVersion(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
const u32 version = cmd_buff[1];
self->SetVersion(version);
LOG_WARNING(Service_FRD, "(STUBBED) called, version: 0x%08X", version);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
}
void Init() {
using namespace Kernel;

View file

@ -95,6 +95,15 @@ void GetMyFriendKey(Service::Interface* self);
*/
void GetMyScreenName(Service::Interface* self);
/**
* FRD::SetClientSdkVersion service function
* Inputs:
* 1 : Used SDK Version
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void SetClientSdkVersion(Service::Interface* self);
/// Initialize FRD service(s)
void Init();

View file

@ -58,7 +58,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x002F0040, nullptr, "AllowHalfAwake"},
{0x00300000, nullptr, "GetServerTypes"},
{0x00310082, nullptr, "GetFriendComment"},
{0x00320042, nullptr, "SetClientSdkVersion"},
{0x00320042, SetClientSdkVersion, "SetClientSdkVersion"},
{0x00330000, nullptr, "GetMyApproachContext"},
{0x00340046, nullptr, "AddFriendWithApproach"},
{0x00350082, nullptr, "DecryptApproachContext"},