Skip to content

Commit

Permalink
Psmf: Correct errors in current stream num.
Browse files Browse the repository at this point in the history
  • Loading branch information
unknownbrackets committed May 31, 2016
1 parent cd2e486 commit 24802d8
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Core/HLE/scePsmf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -925,16 +925,15 @@ static u32 scePsmfGetPresentationEndTime(u32 psmfStruct, u32 endTimeAddr)
return 0;
}

static u32 scePsmfGetCurrentStreamNumber(u32 psmfStruct)
{
static u32 scePsmfGetCurrentStreamNumber(u32 psmfStruct) {
Psmf *psmf = getPsmf(psmfStruct);
if (!psmf) {
ERROR_LOG(ME, "scePsmfGetCurrentStreamNumber(%08x): invalid psmf", psmfStruct);
return ERROR_PSMF_NOT_FOUND;
return hleLogError(ME, ERROR_PSMF_NOT_INITIALIZED, "invalid psmf");
}

DEBUG_LOG(ME, "scePsmfGetCurrentStreamNumber(%08x)", psmfStruct);
return psmf->currentStreamNum;
if (psmf->currentStreamNum < 0) {
return hleLogError(ME, psmf->currentStreamNum, "invalid stream");
}
return hleLogSuccessI(ME, psmf->currentStreamNum);
}

static u32 scePsmfCheckEPMap(u32 psmfStruct)
Expand Down

0 comments on commit 24802d8

Please sign in to comment.