mirror of
https://github.com/italicsjenga/gba.git
synced 2024-12-23 10:51:30 +11:00
mGBA output wasn't resetting its length used
This commit is contained in:
parent
8ff32b0304
commit
0e363477b7
|
@ -6,6 +6,7 @@ use super::*;
|
|||
#[repr(u16)]
|
||||
#[allow(missing_docs)]
|
||||
pub enum MGBADebugLevel {
|
||||
/// Warning! This causes the emulator to halt emulation!
|
||||
Fatal = 0,
|
||||
Error = 1,
|
||||
Warning = 2,
|
||||
|
@ -51,9 +52,12 @@ impl MGBADebug {
|
|||
pub fn send(&mut self, level: MGBADebugLevel) {
|
||||
if level == MGBADebugLevel::Fatal {
|
||||
Self::SEND_ADDRESS.write(Self::SEND_FLAG | MGBADebugLevel::Error as u16);
|
||||
|
||||
// Note(Lokathor): A Fatal send causes the emulator to halt!
|
||||
Self::SEND_ADDRESS.write(Self::SEND_FLAG | MGBADebugLevel::Fatal as u16);
|
||||
} else {
|
||||
Self::SEND_ADDRESS.write(Self::SEND_FLAG | level as u16);
|
||||
self.bytes_written = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue