Fix another bug with falling back

This commit is contained in:
Jesse Talavera 2024-03-21 10:28:35 -04:00
parent 716a88d356
commit cbe7752e1f
2 changed files with 10 additions and 3 deletions

View File

@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0),
and this project roughly adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Fixed
- Fixed a bug where native BIOS images would be used
when the core was supposed to fall back to built-in system files.
## [1.1.1] - 2024-02-29
### Fixed

View File

@ -199,7 +199,8 @@ static melonDS::NDSArgs MelonDsDs::GetNdsArgs(
firmware = make_optional<Firmware>(static_cast<int>(ConsoleType::DS));
}
if (config.SysfileMode() == SysfileMode::BuiltIn) {
bool isFirmwareGenerated = firmware->GetHeader().Identifier == melonDS::GENERATED_FIRMWARE_IDENTIFIER;
if (isFirmwareGenerated) {
retro::debug("Not loading native ARM BIOS files");
}
@ -208,8 +209,7 @@ static melonDS::NDSArgs MelonDsDs::GetNdsArgs(
ApplyCommonArgs(config, ndsargs);
// Try to load the ARM7 and ARM9 BIOS files (but don't bother with the ARM9 BIOS if the ARM7 BIOS failed)
bool bios7Loaded = (config.SysfileMode() == SysfileMode::Native) && LoadBios(
config.Bios7Path(), BiosType::Arm7, ndsargs.ARM7BIOS);
bool bios7Loaded = !isFirmwareGenerated && LoadBios(config.Bios7Path(), BiosType::Arm7, ndsargs.ARM7BIOS);
bool bios9Loaded = bios7Loaded && LoadBios(config.Bios9Path(), BiosType::Arm9, ndsargs.ARM9BIOS);
if (config.SysfileMode() == SysfileMode::Native && !(bios7Loaded && bios9Loaded)) {