mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
ConfigManager: GetBootROMPath added
This commit is contained in:
parent
95ea721f06
commit
2d75a99426
3 changed files with 21 additions and 4 deletions
|
@ -885,6 +885,15 @@ const char* SConfig::GetDirectoryForRegion(DiscIO::Region region)
|
|||
}
|
||||
}
|
||||
|
||||
std::string SConfig::GetBootROMPath(const std::string& region_directory) const
|
||||
{
|
||||
const std::string path =
|
||||
File::GetUserPath(D_GCUSER_IDX) + DIR_SEP + region_directory + DIR_SEP GC_IPL;
|
||||
if (!File::Exists(path))
|
||||
return File::GetSysDirectory() + GC_SYS_DIR + DIR_SEP + region_directory + DIR_SEP GC_IPL;
|
||||
return path;
|
||||
}
|
||||
|
||||
// Sets m_region to the region parameter, or to PAL if the region parameter
|
||||
// is invalid. Set directory_name to the value returned by GetDirectoryForRegion
|
||||
// for m_region. Returns false if the region parameter is invalid.
|
||||
|
@ -1030,10 +1039,7 @@ bool SConfig::AutoSetup(EBootBS2 _BootBS2)
|
|||
{
|
||||
if (!bHLE_BS2)
|
||||
{
|
||||
m_strBootROM = File::GetUserPath(D_GCUSER_IDX) + DIR_SEP + set_region_dir + DIR_SEP GC_IPL;
|
||||
if (!File::Exists(m_strBootROM))
|
||||
m_strBootROM =
|
||||
File::GetSysDirectory() + GC_SYS_DIR + DIR_SEP + set_region_dir + DIR_SEP GC_IPL;
|
||||
m_strBootROM = GetBootROMPath(set_region_dir);
|
||||
|
||||
if (!File::Exists(m_strBootROM))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue