mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
HLE: simplify some error formats
This commit is contained in:
parent
1d6fbf1c35
commit
8acb62f6ee
@ -218,7 +218,7 @@ error_code cellHddGameCheck(ppu_thread& ppu, u32 version, vm::cptr<char> dirName
|
||||
const auto cat = psf::get_string(sfo, "CATEGORY", "");
|
||||
if (!psf::is_cat_hdd(cat))
|
||||
{
|
||||
return { CELL_GAMEDATA_ERROR_BROKEN, fmt::format("CATEGORY='%s'", cat) };
|
||||
return { CELL_GAMEDATA_ERROR_BROKEN, "CATEGORY='%s'", cat };
|
||||
}
|
||||
}
|
||||
|
||||
@ -636,7 +636,7 @@ error_code cellGameDataCheck(u32 type, vm::cptr<char> dirName, vm::ptr<CellGameC
|
||||
if (psf_error != psf::error::stream)
|
||||
{
|
||||
init.cancel();
|
||||
return {CELL_GAME_ERROR_BROKEN, fmt::format("psf::error='%s', type='%d' CATEGORY='%s'", psf_error, type, cat)};
|
||||
return {CELL_GAME_ERROR_BROKEN, "psf::error='%s', type='%d' CATEGORY='%s'", psf_error, type, cat};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1477,13 +1477,13 @@ error_code cellSearchGetMusicSelectionContext(CellSearchId searchId, vm::cptr<Ce
|
||||
// Check if the type of the found content is correct
|
||||
if (content->second->type != CELL_SEARCH_CONTENTTYPE_MUSIC)
|
||||
{
|
||||
return { CELL_SEARCH_ERROR_INVALID_CONTENTTYPE, fmt::format("Type: %d, Expected: CELL_SEARCH_CONTENTTYPE_MUSIC")};
|
||||
return { CELL_SEARCH_ERROR_INVALID_CONTENTTYPE, "Type: %d, Expected: CELL_SEARCH_CONTENTTYPE_MUSIC"};
|
||||
}
|
||||
|
||||
// Check if the type of the found content matches our search content type
|
||||
if (content->second->type != first_content->type)
|
||||
{
|
||||
return { CELL_SEARCH_ERROR_NOT_SUPPORTED_CONTEXT, fmt::format("Type: %d, Expected: %d", +content->second->type, +first_content->type) };
|
||||
return { CELL_SEARCH_ERROR_NOT_SUPPORTED_CONTEXT, "Type: %d, Expected: %d", +content->second->type, +first_content->type };
|
||||
}
|
||||
|
||||
// Use the found content
|
||||
|
@ -1004,7 +1004,7 @@ error_code cellVdecDecodeAu(u32 handle, CellVdecDecodeMode mode, vm::cptr<CellVd
|
||||
|
||||
if (!vdec || !auInfo || !auInfo->size || !auInfo->startAddr)
|
||||
{
|
||||
return { CELL_VDEC_ERROR_ARG, fmt::format("vdec=%d, auInfo=%d, size=%d, startAddr=0x%x", !!vdec, !!auInfo, auInfo ? auInfo->size.value() : 0, auInfo ? auInfo->startAddr.value() : 0) };
|
||||
return { CELL_VDEC_ERROR_ARG, "vdec=%d, auInfo=%d, size=%d, startAddr=0x%x", !!vdec, !!auInfo, auInfo ? auInfo->size.value() : 0, auInfo ? auInfo->startAddr.value() : 0 };
|
||||
}
|
||||
|
||||
{
|
||||
@ -1018,14 +1018,14 @@ error_code cellVdecDecodeAu(u32 handle, CellVdecDecodeMode mode, vm::cptr<CellVd
|
||||
|
||||
if (mode < 0 || mode > (CELL_VDEC_DEC_MODE_B_SKIP | CELL_VDEC_DEC_MODE_PB_SKIP))
|
||||
{
|
||||
return { CELL_VDEC_ERROR_ARG, fmt::format("mode=%d", +mode) };
|
||||
return { CELL_VDEC_ERROR_ARG, "mode=%d", +mode };
|
||||
}
|
||||
|
||||
// TODO: what does the 3 stand for ?
|
||||
if ((mode == (CELL_VDEC_DEC_MODE_B_SKIP | CELL_VDEC_DEC_MODE_PB_SKIP) && vdec->type != 3) ||
|
||||
(mode == CELL_VDEC_DEC_MODE_PB_SKIP && vdec->type != CELL_VDEC_CODEC_TYPE_AVC))
|
||||
{
|
||||
return { CELL_VDEC_ERROR_ARG, fmt::format("mode=%d, type=%d", +mode, vdec->type) };
|
||||
return { CELL_VDEC_ERROR_ARG, "mode=%d, type=%d", +mode, vdec->type };
|
||||
}
|
||||
|
||||
if (!vdec->au_count.try_inc(4))
|
||||
@ -1046,7 +1046,7 @@ error_code cellVdecDecodeAuEx2(u32 handle, CellVdecDecodeMode mode, vm::cptr<Cel
|
||||
|
||||
if (!vdec || !auInfo || !auInfo->size || !auInfo->startAddr)
|
||||
{
|
||||
return { CELL_VDEC_ERROR_ARG, fmt::format("vdec=%d, auInfo=%d, size=%d, startAddr=0x%x", !!vdec, !!auInfo, auInfo ? auInfo->size.value() : 0, auInfo ? auInfo->startAddr.value() : 0) };
|
||||
return { CELL_VDEC_ERROR_ARG, "vdec=%d, auInfo=%d, size=%d, startAddr=0x%x", !!vdec, !!auInfo, auInfo ? auInfo->size.value() : 0, auInfo ? auInfo->startAddr.value() : 0 };
|
||||
}
|
||||
|
||||
{
|
||||
@ -1060,14 +1060,14 @@ error_code cellVdecDecodeAuEx2(u32 handle, CellVdecDecodeMode mode, vm::cptr<Cel
|
||||
|
||||
if (mode < 0 || mode > (CELL_VDEC_DEC_MODE_B_SKIP | CELL_VDEC_DEC_MODE_PB_SKIP))
|
||||
{
|
||||
return { CELL_VDEC_ERROR_ARG, fmt::format("mode=%d", +mode) };
|
||||
return { CELL_VDEC_ERROR_ARG, "mode=%d", +mode };
|
||||
}
|
||||
|
||||
// TODO: what does the 3 stand for ?
|
||||
if ((mode == (CELL_VDEC_DEC_MODE_B_SKIP | CELL_VDEC_DEC_MODE_PB_SKIP) && vdec->type != 3) ||
|
||||
(mode == CELL_VDEC_DEC_MODE_PB_SKIP && vdec->type != CELL_VDEC_CODEC_TYPE_AVC))
|
||||
{
|
||||
return { CELL_VDEC_ERROR_ARG, fmt::format("mode=%d, type=%d", +mode, vdec->type) };
|
||||
return { CELL_VDEC_ERROR_ARG, "mode=%d, type=%d", +mode, vdec->type };
|
||||
}
|
||||
|
||||
if (!vdec->au_count.try_inc(4))
|
||||
|
Loading…
Reference in New Issue
Block a user