test fixes
This commit is contained in:
@@ -509,7 +509,7 @@ impl NativeInterface for VmRuntimeHost<'_> {
|
||||
ret.push_int(0);
|
||||
return Ok(());
|
||||
}
|
||||
let stat = self.memcard.slot_stat(&self.fs, self.current_app_id, slot);
|
||||
let stat = self.memcard.slot_stat(self.fs, self.current_app_id, slot);
|
||||
let status = if stat.state == MemcardSlotState::Corrupt {
|
||||
MemcardStatus::Corrupt
|
||||
} else {
|
||||
@@ -533,7 +533,7 @@ impl NativeInterface for VmRuntimeHost<'_> {
|
||||
return Ok(());
|
||||
}
|
||||
let read =
|
||||
self.memcard.slot_read(&self.fs, self.current_app_id, slot, offset, max_bytes);
|
||||
self.memcard.slot_read(self.fs, self.current_app_id, slot, offset, max_bytes);
|
||||
ret.push_int(read.status as i64);
|
||||
ret.push_string(hex_encode(&read.bytes));
|
||||
ret.push_int(read.bytes_read as i64);
|
||||
@@ -550,7 +550,7 @@ impl NativeInterface for VmRuntimeHost<'_> {
|
||||
}
|
||||
let payload = hex_decode(&payload_hex)?;
|
||||
let app_id = self.current_app_id;
|
||||
let write = self.memcard.slot_write(&self.fs, app_id, slot, offset, &payload);
|
||||
let write = self.memcard.slot_write(self.fs, app_id, slot, offset, &payload);
|
||||
ret.push_int(write.status as i64);
|
||||
ret.push_int(write.bytes_written as i64);
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user