mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 14:15:47 -04:00
CDImage: Use Error class for complex errors
This commit is contained in:
@ -816,7 +816,7 @@ void GameChanged()
|
||||
if (path.empty() || s_game_path == path)
|
||||
return;
|
||||
|
||||
std::unique_ptr<CDImage> cdi = CDImage::Open(path.c_str());
|
||||
std::unique_ptr<CDImage> cdi = CDImage::Open(path.c_str(), nullptr);
|
||||
if (!cdi)
|
||||
{
|
||||
Log_ErrorPrintf("Failed to open temporary CD image '%s'", path.c_str());
|
||||
@ -855,7 +855,7 @@ void GameChanged(const std::string& path, CDImage* image)
|
||||
if (playlist_index > 0 && playlist_index < playlist_count)
|
||||
{
|
||||
const std::string& first_disc_path(System::GetMediaPlaylistPath(0));
|
||||
std::unique_ptr<CDImage> first_disc_image(CDImage::Open(first_disc_path.c_str()));
|
||||
std::unique_ptr<CDImage> first_disc_image(CDImage::Open(first_disc_path.c_str(), nullptr));
|
||||
if (first_disc_image)
|
||||
{
|
||||
Log_InfoPrintf("Using first disc '%s' from playlist (currently '%s')", first_disc_path.c_str(), path.c_str());
|
||||
|
@ -168,7 +168,7 @@ bool GameList::GetM3UListEntry(const char* path, GameListEntry* entry)
|
||||
|
||||
for (size_t i = 0; i < entries.size(); i++)
|
||||
{
|
||||
std::unique_ptr<CDImage> entry_image = CDImage::Open(entries[i].c_str());
|
||||
std::unique_ptr<CDImage> entry_image = CDImage::Open(entries[i].c_str(), nullptr);
|
||||
if (!entry_image)
|
||||
{
|
||||
Log_ErrorPrintf("Failed to open entry %zu ('%s') in playlist %s", i, entries[i].c_str(), path);
|
||||
@ -203,7 +203,7 @@ bool GameList::GetGameListEntry(const std::string& path, GameListEntry* entry)
|
||||
if (System::IsM3UFileName(path.c_str()))
|
||||
return GetM3UListEntry(path.c_str(), entry);
|
||||
|
||||
std::unique_ptr<CDImage> cdi = CDImage::Open(path.c_str());
|
||||
std::unique_ptr<CDImage> cdi = CDImage::Open(path.c_str(), nullptr);
|
||||
if (!cdi)
|
||||
return false;
|
||||
|
||||
|
Reference in New Issue
Block a user