almost looks like something?
This commit is contained in:
parent
3f6af2ce3b
commit
7e705b6b41
|
@ -1156,16 +1156,16 @@ void EmuInstance::reset()
|
||||||
{
|
{
|
||||||
std::string oldsave = firmwareSave->GetPath();
|
std::string oldsave = firmwareSave->GetPath();
|
||||||
string newsave;
|
string newsave;
|
||||||
if (Config::ExternalBIOSEnable)
|
if (globalCfg.GetBool("Emu.ExternalBIOSEnable"))
|
||||||
{
|
{
|
||||||
if (Config::ConsoleType == 1)
|
if (nds->ConsoleType == 1)
|
||||||
newsave = Config::DSiFirmwarePath + Platform::InstanceFileSuffix();
|
newsave = globalCfg.GetString("DSi.FirmwarePath") + Platform::InstanceFileSuffix();
|
||||||
else
|
else
|
||||||
newsave = Config::FirmwarePath + Platform::InstanceFileSuffix();
|
newsave = globalCfg.GetString("DS.FirmwarePath") + Platform::InstanceFileSuffix();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
newsave = Config::WifiSettingsPath + Platform::InstanceFileSuffix();
|
newsave = kWifiSettingsPath + Platform::InstanceFileSuffix();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldsave != newsave)
|
if (oldsave != newsave)
|
||||||
|
@ -1176,7 +1176,7 @@ void EmuInstance::reset()
|
||||||
|
|
||||||
if (!baseROMName.empty())
|
if (!baseROMName.empty())
|
||||||
{
|
{
|
||||||
if (Config::DirectBoot || nds->NeedsDirectBoot())
|
if (globalCfg.GetBool("Emu.DirectBoot") || nds->NeedsDirectBoot())
|
||||||
{
|
{
|
||||||
nds->SetupDirectBoot(baseROMName);
|
nds->SetupDirectBoot(baseROMName);
|
||||||
}
|
}
|
||||||
|
@ -1187,7 +1187,7 @@ void EmuInstance::reset()
|
||||||
bool EmuInstance::bootToMenu()
|
bool EmuInstance::bootToMenu()
|
||||||
{
|
{
|
||||||
// Keep whatever cart is in the console, if any.
|
// Keep whatever cart is in the console, if any.
|
||||||
if (!thread->UpdateConsole(Keep {}, Keep {}))
|
if (!updateConsole(Keep {}, Keep {}))
|
||||||
// Try to update the console, but keep the existing cart. If that fails...
|
// Try to update the console, but keep the existing cart. If that fails...
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -1300,12 +1300,12 @@ pair<unique_ptr<Firmware>, string> EmuInstance::generateDefaultFirmware()
|
||||||
{
|
{
|
||||||
// Construct the default firmware...
|
// Construct the default firmware...
|
||||||
string settingspath;
|
string settingspath;
|
||||||
std::unique_ptr<Firmware> firmware = std::make_unique<Firmware>(Config::ConsoleType);
|
std::unique_ptr<Firmware> firmware = std::make_unique<Firmware>(nds->ConsoleType);
|
||||||
assert(firmware->Buffer() != nullptr);
|
assert(firmware->Buffer() != nullptr);
|
||||||
|
|
||||||
// Try to open the instanced Wi-fi settings, falling back to the regular Wi-fi settings if they don't exist.
|
// Try to open the instanced Wi-fi settings, falling back to the regular Wi-fi settings if they don't exist.
|
||||||
// We don't need to save the whole firmware, just the part that may actually change.
|
// We don't need to save the whole firmware, just the part that may actually change.
|
||||||
std::string wfcsettingspath = Config::WifiSettingsPath;
|
std::string wfcsettingspath = kWifiSettingsPath;
|
||||||
settingspath = wfcsettingspath + Platform::InstanceFileSuffix();
|
settingspath = wfcsettingspath + Platform::InstanceFileSuffix();
|
||||||
FileHandle* f = Platform::OpenLocalFile(settingspath, FileMode::Read);
|
FileHandle* f = Platform::OpenLocalFile(settingspath, FileMode::Read);
|
||||||
if (!f)
|
if (!f)
|
||||||
|
@ -1331,7 +1331,7 @@ pair<unique_ptr<Firmware>, string> EmuInstance::generateDefaultFirmware()
|
||||||
Platform::Log(Platform::LogLevel::Warn, "Failed to read Wi-fi settings from \"%s\"; using defaults instead\n", wfcsettingspath.c_str());
|
Platform::Log(Platform::LogLevel::Warn, "Failed to read Wi-fi settings from \"%s\"; using defaults instead\n", wfcsettingspath.c_str());
|
||||||
|
|
||||||
firmware->GetAccessPoints() = {
|
firmware->GetAccessPoints() = {
|
||||||
Firmware::WifiAccessPoint(Config::ConsoleType),
|
Firmware::WifiAccessPoint(nds->ConsoleType),
|
||||||
Firmware::WifiAccessPoint(),
|
Firmware::WifiAccessPoint(),
|
||||||
Firmware::WifiAccessPoint(),
|
Firmware::WifiAccessPoint(),
|
||||||
};
|
};
|
||||||
|
@ -1634,7 +1634,7 @@ bool EmuInstance::loadROM(QStringList filepath, bool reset)
|
||||||
|
|
||||||
if (reset)
|
if (reset)
|
||||||
{
|
{
|
||||||
if (!emuthread->UpdateConsole(std::move(cart), Keep {}))
|
if (!updateConsole(std::move(cart), Keep {}))
|
||||||
{
|
{
|
||||||
QMessageBox::critical(mainWindow, "melonDS", "Failed to load the DS ROM.");
|
QMessageBox::critical(mainWindow, "melonDS", "Failed to load the DS ROM.");
|
||||||
return false;
|
return false;
|
||||||
|
@ -1643,7 +1643,7 @@ bool EmuInstance::loadROM(QStringList filepath, bool reset)
|
||||||
initFirmwareSaveManager();
|
initFirmwareSaveManager();
|
||||||
nds->Reset();
|
nds->Reset();
|
||||||
|
|
||||||
if (Config::DirectBoot || nds->NeedsDirectBoot())
|
if (globalCfg.GetBool("Emu.DirectBoot") || nds->NeedsDirectBoot())
|
||||||
{ // If direct boot is enabled or forced...
|
{ // If direct boot is enabled or forced...
|
||||||
nds->SetupDirectBoot(romname);
|
nds->SetupDirectBoot(romname);
|
||||||
}
|
}
|
||||||
|
@ -1775,7 +1775,7 @@ bool EmuInstance::loadGBAROM(QStringList filepath)
|
||||||
|
|
||||||
void EmuInstance::loadGBAAddon(int type)
|
void EmuInstance::loadGBAAddon(int type)
|
||||||
{
|
{
|
||||||
if (Config::ConsoleType == 1) return;
|
if (nds->ConsoleType == 1) return;
|
||||||
|
|
||||||
gbaSave = nullptr;
|
gbaSave = nullptr;
|
||||||
|
|
||||||
|
@ -1806,7 +1806,7 @@ bool EmuInstance::gbaCartInserted()
|
||||||
|
|
||||||
QString EmuInstance::gbaCartLabel()
|
QString EmuInstance::gbaCartLabel()
|
||||||
{
|
{
|
||||||
if (Config::ConsoleType == 1) return "none (DSi)";
|
if (nds->ConsoleType == 1) return "none (DSi)";
|
||||||
|
|
||||||
switch (gbaCartType)
|
switch (gbaCartType)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue