Movie: Simplify ChangeDisc path handling

This commit is contained in:
JosJuice 2016-07-05 21:13:43 +02:00
parent 1da866d7de
commit 865be48ee3
1 changed files with 6 additions and 8 deletions

View File

@ -1211,16 +1211,15 @@ void PlayController(GCPadStatus* PadStatus, int controllerID)
PadStatus->button |= PAD_TRIGGER_R;
if (s_padState.disc)
{
// This implementation assumes the disc change will only happen once. Trying to change more than
// that will cause
// it to load the last disc every time. As far as i know though, there are no 3+ disc games, so
// this should be fine.
// This implementation assumes the disc change will only happen once. Trying
// to change more than that will cause it to load the last disc every time.
// As far as I know, there are no 3+ disc games, so this should be fine.
bool found = false;
std::string path;
for (size_t i = 0; i < SConfig::GetInstance().m_ISOFolder.size(); ++i)
for (const std::string& iso_folder : SConfig::GetInstance().m_ISOFolder)
{
path = SConfig::GetInstance().m_ISOFolder[i];
if (File::Exists(path + '/' + g_discChange))
path = iso_folder + '/' + g_discChange;
if (File::Exists(path))
{
found = true;
break;
@ -1228,7 +1227,6 @@ void PlayController(GCPadStatus* PadStatus, int controllerID)
}
if (found)
{
path += '/' + g_discChange;
DVDInterface::ChangeDiscAsCPU(path);
}
else