[APT] Implement new 3DS check, [OS] Fix mem allog bug & impl more of HID

This commit is contained in:
wheremyfoodat 2022-09-25 03:35:40 +03:00
parent c4cb20f846
commit 0aaf1c317d
14 changed files with 143 additions and 60 deletions

View file

@ -7,6 +7,8 @@
class HIDService {
Handle handle = KernelHandles::HID;
Memory& mem;
u8* sharedMem; // Pointer to HID shared memory
MAKE_LOG_FUNCTION(log, hidLogger)
// Service commands
@ -16,4 +18,11 @@ public:
HIDService(Memory& mem) : mem(mem) {}
void reset();
void handleSyncRequest(u32 messagePointer);
void setSharedMem(u8* ptr) {
sharedMem = ptr;
if (ptr != nullptr) { // Zero-fill shared memory in case the process tries to read stale service data or vice versa
std::memset(ptr, 0xff, 0x2b0);
}
}
};