hle: Add proper type for result code

This should clean up all HLE errorcode in the codebase.

I didn't removed Rust::Result as this should be a cleanup for another
iteration.
This commit is contained in:
Mary 2023-06-16 19:42:02 +02:00
parent c6f5d19983
commit 122b1b2727
73 changed files with 540 additions and 419 deletions

View file

@ -13,13 +13,6 @@ namespace HIDCommands {
};
}
namespace Result {
enum : u32 {
Success = 0,
Failure = 0xFFFFFFFF
};
}
void HIDService::reset() {
sharedMem = nullptr;
accelerometerEnabled = false;
@ -155,7 +148,7 @@ void HIDService::updateInputs(u64 currentTick) {
writeSharedMem<u16>(touchEntryOffset, touchScreenX);
writeSharedMem<u16>(touchEntryOffset + 2, touchScreenY);
writeSharedMem<u8>(touchEntryOffset + 4, touchScreenPressed ? 1 : 0);
// Next, update accelerometer state
if (nextAccelerometerIndex == 0) {
writeSharedMem<u64>(0x110, readSharedMem<u64>(0x108)); // Copy previous tick count