mirror of
https://github.com/PabloMK7/citra
synced 2024-11-15 05:08:23 +00:00
added a stub for GetLockHandle
This commit is contained in:
parent
9f4d677cdf
commit
18766b9e69
3 changed files with 44 additions and 9 deletions
|
@ -4,17 +4,42 @@
|
||||||
|
|
||||||
|
|
||||||
#include "common/log.h"
|
#include "common/log.h"
|
||||||
|
|
||||||
|
#include "core/hle/hle.h"
|
||||||
#include "core/hle/service/apt.h"
|
#include "core/hle/service/apt.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
namespace Service {
|
namespace Service {
|
||||||
|
|
||||||
|
// Returns handle to APT Mutex. Not imlemented.
|
||||||
|
Syscall::Result APT::GetLockHandle() {
|
||||||
|
return 0x00000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when svcSendSyncRequest is called, loads command buffer and executes comand
|
||||||
|
* @return Return result of svcSendSyncRequest passed back to user app
|
||||||
|
*/
|
||||||
Syscall::Result APT::Sync() {
|
Syscall::Result APT::Sync() {
|
||||||
NOTICE_LOG(HLE, "APT::Sync - Initialize");
|
Syscall::Result res = 0;
|
||||||
return 0;
|
u32* cmd_buff = (u32*)HLE::GetPointer(HLE::CMD_BUFFER_ADDR + CMD_OFFSET);
|
||||||
|
|
||||||
|
switch(cmd_buff[0]) {
|
||||||
|
case CMD_HEADER_INIT:
|
||||||
|
NOTICE_LOG(OSHLE, "APT::Sync - Initialize");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CMD_HEADER_GET_LOCK_HANDLE:
|
||||||
|
NOTICE_LOG(OSHLE, "APT::Sync - GetLockHandle");
|
||||||
|
cmd_buff[5] = GetLockHandle();
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
ERROR_LOG(OSHLE, "APT::Sync - Unknown command 0x%08X", cmd_buff[0]);
|
||||||
|
res = -1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,13 @@ public:
|
||||||
* Called when svcSendSyncRequest is called, loads command buffer and executes comand
|
* Called when svcSendSyncRequest is called, loads command buffer and executes comand
|
||||||
* @return Return result of svcSendSyncRequest passed back to user app
|
* @return Return result of svcSendSyncRequest passed back to user app
|
||||||
*/
|
*/
|
||||||
virtual Syscall::Result Sync();
|
Syscall::Result Sync();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
|
||||||
|
Syscall::Result GetLockHandle();
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -104,9 +104,7 @@ public:
|
||||||
* @return Return result of svcSendSyncRequest passed back to user app
|
* @return Return result of svcSendSyncRequest passed back to user app
|
||||||
*/
|
*/
|
||||||
Syscall::Result Sync() {
|
Syscall::Result Sync() {
|
||||||
u32 header = 0;
|
|
||||||
Syscall::Result res = 0;
|
Syscall::Result res = 0;
|
||||||
|
|
||||||
u32* cmd_buff = (u32*)HLE::GetPointer(HLE::CMD_BUFFER_ADDR + CMD_OFFSET);
|
u32* cmd_buff = (u32*)HLE::GetPointer(HLE::CMD_BUFFER_ADDR + CMD_OFFSET);
|
||||||
|
|
||||||
switch (cmd_buff[0]) {
|
switch (cmd_buff[0]) {
|
||||||
|
@ -116,6 +114,7 @@ public:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CMD_HEADER_GET_HANDLE:
|
case CMD_HEADER_GET_HANDLE:
|
||||||
|
{
|
||||||
const char* port_name = (const char*)&cmd_buff[1];
|
const char* port_name = (const char*)&cmd_buff[1];
|
||||||
Interface* service = g_manager->FetchFromPortName(port_name);
|
Interface* service = g_manager->FetchFromPortName(port_name);
|
||||||
|
|
||||||
|
@ -128,7 +127,12 @@ public:
|
||||||
ERROR_LOG(OSHLE, "Service %s does not exist", port_name);
|
ERROR_LOG(OSHLE, "Service %s does not exist", port_name);
|
||||||
res = -1;
|
res = -1;
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
ERROR_LOG(OSHLE, "SRV::Sync - Unknown command 0x%08X", cmd_buff[0]);
|
||||||
|
res = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue