Compare commits
3 Commits
1c146590fe
...
58bb34e3cc
Author | SHA1 | Date |
---|---|---|
|
58bb34e3cc | |
|
132d494cc2 | |
|
30ee8c06f7 |
|
@ -154,14 +154,14 @@ fn extract_isx_symbols(input: &[u8]) -> Option<Vec<Symbol>> {
|
|||
// Range (Virtual Boy)
|
||||
let count_bytes;
|
||||
(count_bytes, buf) = buf.split_first_chunk()?;
|
||||
let count = u16::from_le_bytes(*count_bytes) + 1;
|
||||
let count = u16::from_le_bytes(*count_bytes);
|
||||
(_, buf) = buf.split_at_checked(count as usize * 9)?;
|
||||
}
|
||||
0x14 => {
|
||||
// Symbol (Virtual Boy)
|
||||
let count_bytes;
|
||||
(count_bytes, buf) = buf.split_first_chunk()?;
|
||||
let count = u16::from_le_bytes(*count_bytes) + 1;
|
||||
let count = u16::from_le_bytes(*count_bytes);
|
||||
for _ in 0..count {
|
||||
let name_len;
|
||||
(name_len, buf) = buf.split_first()?;
|
||||
|
|
|
@ -88,6 +88,7 @@ impl GameWindow {
|
|||
Command::OpenRom => {
|
||||
let rom = rfd::FileDialog::new()
|
||||
.add_filter("Virtual Boy ROMs", &["vb", "vbrom"])
|
||||
.add_filter("Executable files", &["", "elf", "isx"])
|
||||
.pick_file();
|
||||
if let Some(path) = rom {
|
||||
self.client
|
||||
|
@ -140,6 +141,7 @@ impl GameWindow {
|
|||
{
|
||||
let rom = rfd::FileDialog::new()
|
||||
.add_filter("Virtual Boy ROMs", &["vb", "vbrom"])
|
||||
.add_filter("Executable files", &["", "elf", "isx"])
|
||||
.pick_file();
|
||||
if let Some(path) = rom {
|
||||
self.client
|
||||
|
|
|
@ -65,6 +65,7 @@ impl ProfileWindow {
|
|||
.save_file();
|
||||
if let Some(path) = file {
|
||||
let bytes = pollster::block_on(bytes_receiver)?;
|
||||
let _ = fs::remove_file(&path);
|
||||
fs::write(&path, bytes)?;
|
||||
Ok(Some(path.display().to_string()))
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue