explicitly eject the cart before a load with reset, preventing a spurious cart-eject IRQ on startup
also fix possible KEY1 issues when using internal BIOS
This commit is contained in:
parent
e665e25bd3
commit
80564ba947
|
@ -137,6 +137,8 @@ void Key1_LoadKeyBuf(bool dsi)
|
|||
// it is possible that this gets called before the BIOSes are loaded
|
||||
// so we will read from the BIOS files directly
|
||||
|
||||
if (Platform::GetConfigBool(Platform::ExternalBIOSEnable))
|
||||
{
|
||||
std::string path = Platform::GetConfigString(dsi ? Platform::DSi_BIOS7Path : Platform::BIOS7Path);
|
||||
FILE* f = Platform::OpenLocalFile(path, "rb");
|
||||
if (f)
|
||||
|
@ -146,6 +148,12 @@ void Key1_LoadKeyBuf(bool dsi)
|
|||
fclose(f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// well
|
||||
memset(Key1_KeyBuf, 0, 0x1048);
|
||||
}
|
||||
}
|
||||
|
||||
void Key1_InitKeycode(bool dsi, u32 idcode, u32 level, u32 mod)
|
||||
{
|
||||
|
|
|
@ -535,6 +535,7 @@ bool LoadROM(QStringList filepath, bool reset)
|
|||
if (reset)
|
||||
{
|
||||
NDS::SetConsoleType(Config::ConsoleType);
|
||||
NDS::EjectCart();
|
||||
NDS::Reset();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue