Unverified Commit 3f45fe7d authored by SeventySixx's avatar SeventySixx Committed by GitHub
Browse files

Fixed problem of chrashes on nvm/mec creation with fastboot enabled (#164)

* - BIOS in game config now is stored by name instead of full path, making it more portable

* - added check if bios folder is empty, logging in that case an explicit message

* fixed problem wich prevented to load selected memory cards when starting core without content

* removed a forgotten debug log

* disabled fast boot when entering bios menu

* forced to boot into bios setup also when fast boot enabled and if nvm not exists
parent d5446c6c
Pipeline #54103 passed with stage
in 4 minutes and 7 seconds
......@@ -614,6 +614,22 @@ bool retro_load_game(const struct retro_game_info* game)
log_cb(RETRO_LOG_INFO, "Loading selected BIOS: %s\n", selected_bios);
// we check if nvm file exists, if not it means that it's a new bios.
// in this case whe bypass the fastboot option, forcing to enter the bios first run setup
wxFileName nvmFileCheck;
nvmFileCheck.Assign(sel_bios_path);
nvmFileCheck.SetExt("nvm");
bool fastboot_option = option_value(BOOL_PCSX2_OPT_FASTBOOT, KeyOptionBool::return_type);
if (! nvmFileCheck.FileExists()) {
fastboot_option = false;
}
const char* system = nullptr;
environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &system);
......@@ -702,7 +718,7 @@ bool retro_load_game(const struct retro_game_info* game)
{
LanguageInjector::Inject(
(std::string)option_value(STRING_PCSX2_OPT_BIOS, KeyOptionString::return_type),
sel_bios_path,
option_value(STRING_PCSX2_OPT_SYSTEM_LANGUAGE, KeyOptionString::return_type)
);
......@@ -745,7 +761,7 @@ bool retro_load_game(const struct retro_game_info* game)
else
{
g_Conf->EmuOptions.UseBOOT2Injection = option_value(BOOL_PCSX2_OPT_FASTBOOT, KeyOptionBool::return_type);
g_Conf->EmuOptions.UseBOOT2Injection = fastboot_option;
g_Conf->CdvdSource = CDVD_SourceType::Iso;
g_Conf->CurrentIso = game_paths[0];
......@@ -760,7 +776,7 @@ bool retro_load_game(const struct retro_game_info* game)
// we enter here in the bios, so we have the correct memcards loaded
log_cb(RETRO_LOG_INFO, "Entrerning BIOS Menu.....\n");
RetroMessager::Notification("Boot to BIOS enabled", true);
g_Conf->EmuOptions.UseBOOT2Injection = option_value(BOOL_PCSX2_OPT_FASTBOOT, KeyOptionBool::return_type);
g_Conf->EmuOptions.UseBOOT2Injection = false;
g_Conf->CdvdSource = CDVD_SourceType::NoDisc;
g_Conf->CurrentIso = "";
pcsx2->SysExecute(g_Conf->CdvdSource);
......@@ -772,7 +788,7 @@ bool retro_load_game(const struct retro_game_info* game)
else
{
log_cb(RETRO_LOG_INFO, "Enterning BIOS Menu.....\n");
g_Conf->EmuOptions.UseBOOT2Injection = option_value(BOOL_PCSX2_OPT_FASTBOOT, KeyOptionBool::return_type);
g_Conf->EmuOptions.UseBOOT2Injection = false;
g_Conf->CdvdSource = CDVD_SourceType::NoDisc;
g_Conf->CurrentIso = "";
pcsx2->SysExecute(g_Conf->CdvdSource);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment