Merge pull request #247 from Zapeth/master

Make logging for SBI file loading more helpful
This commit is contained in:
rz5 2017-10-19 08:11:46 +01:00 committed by GitHub
commit 8fb566d2e5
3 changed files with 15 additions and 6 deletions

View File

@ -523,7 +523,7 @@ int CDAccess_CHD::LoadSBI(const char* sbi_path)
#if 0
MDFN_printf(_("Loaded Q subchannel replacements for %zu sectors.\n"), SubQReplaceMap.size());
#endif
log_cb(RETRO_LOG_DEBUG, "[PBP] Loaded SBI file %s\n", sbi_path);
log_cb(RETRO_LOG_INFO, "[CHD] Loaded SBI file %s\n", sbi_path);
return 0;
}

View File

@ -349,7 +349,7 @@ int CDAccess_Image::LoadSBI(const char* sbi_path)
}
//MDFN_printf(_("Loaded Q subchannel replacements for %zu sectors.\n"), SubQReplaceMap.size());
log_cb(RETRO_LOG_INFO, "[Image] Loaded SBI file %s\n", sbi_path);
return 0;
}

View File

@ -659,12 +659,21 @@ bool CDAccess_PBP::Read_TOC(TOC *toc)
if(PBP_DiscCount > 1 && PBP_DiscCount < 10)
sbi_path[sbi_path.length()-5] = (CD_SelectedDisc+1) + '0';
if(!SubQReplaceMap.empty())
SubQReplaceMap.clear();
// Load SBI file, if present
if (path_is_valid(sbi_path.c_str()))
{
if(!SubQReplaceMap.empty())
SubQReplaceMap.clear();
LoadSBI(sbi_path.c_str());
}
else if (!SubQReplaceMap.empty())
{
SubQReplaceMap.clear();
// SBI should probably be loaded in this case but file path is invalid
log_cb(RETRO_LOG_WARN, "[PBP] Invalid path/filename for SBI file %s\n", sbi_path);
}
return true;
}
@ -706,7 +715,7 @@ int CDAccess_PBP::LoadSBI(const char* sbi_path)
#if 0
MDFN_printf(_("Loaded Q subchannel replacements for %zu sectors.\n"), SubQReplaceMap.size());
#endif
log_cb(RETRO_LOG_DEBUG, "[PBP] Loaded SBI file %s\n", sbi_path);
log_cb(RETRO_LOG_INFO, "[PBP] Loaded SBI file %s\n", sbi_path);
return 0;
}