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

@ -230,6 +230,24 @@ static void IsConnected(Service::Interface* self) {
LOG_WARNING(Service_AC, "(STUBBED) called");
}
/**
* AC_U::SetClientVersion service function
* Inputs:
* 1 : Used SDK Version
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
static void SetClientVersion(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
const u32 version = cmd_buff[1];
self->SetVersion(version);
LOG_WARNING(Service_AC, "(STUBBED) called, version: 0x%08X", version);
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
}
const Interface::FunctionInfo FunctionTable[] = {
{0x00010000, CreateDefaultConfig, "CreateDefaultConfig"},
{0x00040006, ConnectAsync, "ConnectAsync"},
@ -250,7 +268,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00300004, RegisterDisconnectEvent, "RegisterDisconnectEvent"},
{0x003C0042, nullptr, "GetAPSSIDList"},
{0x003E0042, IsConnected, "IsConnected"},
{0x00400042, nullptr, "SetClientVersion"},
{0x00400042, SetClientVersion, "SetClientVersion"},
};
////////////////////////////////////////////////////////////////////////////////////////////////////