Boot: Re-use the disc volume

Saves some disc IO.
This commit is contained in:
Léo Lam
2017-05-30 11:16:20 +02:00
parent 6f6a18b1b0
commit d0169fe8db

View File

@ -336,10 +336,10 @@ bool CBoot::BootUp(std::unique_ptr<BootParameters> boot)
struct BootTitle struct BootTitle
{ {
BootTitle() : config(SConfig::GetInstance()) {} BootTitle() : config(SConfig::GetInstance()) {}
bool operator()(const BootParameters::Disc& disc) const bool operator()(BootParameters::Disc& disc) const
{ {
NOTICE_LOG(BOOT, "Booting from disc: %s", disc.path.c_str()); NOTICE_LOG(BOOT, "Booting from disc: %s", disc.path.c_str());
const DiscIO::Volume* volume = SetDisc(DiscIO::CreateVolumeFromFilename(disc.path)); const DiscIO::Volume* volume = SetDisc(std::move(disc.volume));
if (!volume) if (!volume)
return false; return false;