mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-22 05:15:51 +12:00
Stub FS service, we now get to main in libctru
This commit is contained in:
parent
083a0d04d7
commit
91356f1de9
6 changed files with 70 additions and 4 deletions
|
@ -1,10 +1,12 @@
|
|||
#include "services/service_manager.hpp"
|
||||
|
||||
ServiceManager::ServiceManager(std::array<u32, 16>& regs, Memory& mem) : regs(regs), mem(mem), apt(mem), hid(mem) {}
|
||||
ServiceManager::ServiceManager(std::array<u32, 16>& regs, Memory& mem) : regs(regs), mem(mem),
|
||||
apt(mem), hid(mem), fs(mem) {}
|
||||
|
||||
void ServiceManager::reset() {
|
||||
apt.reset();
|
||||
hid.reset();
|
||||
fs.reset();
|
||||
}
|
||||
|
||||
// Match IPC messages to a "srv:" command based on their header
|
||||
|
@ -65,6 +67,8 @@ void ServiceManager::getServiceHandle(u32 messagePointer) {
|
|||
handle = KernelHandles::APT;
|
||||
} else if (service == "hid:USER") {
|
||||
handle = KernelHandles::HID;
|
||||
} else if (service == "fs:USER") {
|
||||
handle = KernelHandles::FS;
|
||||
} else {
|
||||
Helpers::panic("srv: GetServiceHandle with unknown service %s", service.c_str());
|
||||
}
|
||||
|
@ -77,6 +81,7 @@ void ServiceManager::sendCommandToService(u32 messagePointer, Handle handle) {
|
|||
switch (handle) {
|
||||
case KernelHandles::APT: apt.handleSyncRequest(messagePointer); break;
|
||||
case KernelHandles::HID: hid.handleSyncRequest(messagePointer); break;
|
||||
case KernelHandles::FS: fs.handleSyncRequest(messagePointer); break;
|
||||
default: Helpers::panic("Sent IPC message to unknown service %08X\n Command: %08X", handle, mem.read32(messagePointer));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue