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

@ -14,12 +14,6 @@ namespace FileOps {
};
}
namespace Result {
enum : u32 {
Success = 0
};
}
void Kernel::handleFileOperation(u32 messagePointer, Handle file) {
const u32 cmd = mem.read32(messagePointer);
@ -90,7 +84,7 @@ void Kernel::readFile(u32 messagePointer, Handle fileHandle) {
if (!file->isOpen) {
Helpers::panic("Tried to read closed file");
}
// Handle files with their own file descriptors by just fread'ing the data
if (file->fd) {
std::unique_ptr<u8[]> data(new u8[size]);