use simple save extension

This commit is contained in:
Mateusz Faderewski 2024-07-03 18:36:17 +02:00
parent b915a7b4e3
commit 2bb47720e2

View File

@ -291,17 +291,7 @@ impl Handler {
let filename = &if let Some(path) = path { let filename = &if let Some(path) = path {
path.to_string_lossy().to_string() path.to_string_lossy().to_string()
} else { } else {
generate_filename( generate_filename("save", "sav")
"save",
match save_writeback.save {
sc64::SaveType::Eeprom4k | sc64::SaveType::Eeprom16k => "eep",
sc64::SaveType::Sram | sc64::SaveType::SramBanked | sc64::SaveType::Sram1m => {
"srm"
}
sc64::SaveType::Flashram => "fla",
_ => "sav",
},
)
}; };
match File::create(filename) { match File::create(filename) {
Ok(mut file) => { Ok(mut file) => {