Stub CloseHandle

This commit is contained in:
wheremyfoodat 2022-09-16 16:18:12 +03:00
parent 0fbc5f210f
commit 6219abd17a
2 changed files with 8 additions and 1 deletions

View file

@ -57,6 +57,7 @@ class Kernel {
void getResourceLimit();
void getResourceLimitLimitValues();
void getResourceLimitCurrentValues();
void svcCloseHandle();
public:
Kernel(std::array<u32, 16>& regs, Memory& mem) : regs(regs), mem(mem), handleCounter(0) {

View file

@ -5,6 +5,7 @@
void Kernel::serviceSVC(u32 svc) {
switch (svc) {
case 0x21: createAddressArbiter(); break;
case 0x23: svcCloseHandle(); break;
case 0x38: getResourceLimit(); break;
case 0x39: getResourceLimitLimitValues(); break;
case 0x3A: getResourceLimitCurrentValues(); break;
@ -51,12 +52,17 @@ void Kernel::reset() {
}
// Result CreateAddressArbiter(Handle* arbiter)
// out: r0 -> result
void Kernel::createAddressArbiter() {
printf("Stubbed call to CreateAddressArbiter. Handle address: %08X\n", regs[0]);
regs[0] = SVCResult::Success;
}
// Result CloseHandle(Handle handle)
void Kernel::svcCloseHandle() {
printf("CloseHandle(handle = %d) (Unimplemented)\n", regs[0]);
regs[0] = SVCResult::Success;
}
std::string Kernel::getProcessName(u32 pid) {
if (pid == KernelHandles::CurrentProcess) {
return "current";