Merge pull request #12727 from shenweip/mipscall

Correcting return value of some mipscalls without after action.
This commit is contained in:
Henrik Rydgård 2020-03-21 00:47:21 +01:00 committed by GitHub
commit 7d13d2e863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -961,6 +961,7 @@ static int sceFontDoneLib(u32 fontLibHandle) {
INFO_LOG(SCEFONT, "sceFontDoneLib(%08x)", fontLibHandle);
FontLib *fl = GetFontLib(fontLibHandle);
if (fl) {
currentMIPS->r[MIPS_REG_V0] = 0;
fl->Done();
}
return 0;
@ -1094,8 +1095,10 @@ static int sceFontClose(u32 fontHandle) {
if (font) {
DEBUG_LOG(SCEFONT, "sceFontClose(%x)", fontHandle);
FontLib *fontLib = font->GetFontLib();
if (fontLib)
if (fontLib) {
currentMIPS->r[MIPS_REG_V0] = 0;
fontLib->CloseFont(font);
}
} else
ERROR_LOG(SCEFONT, "sceFontClose(%x) - font not open?", fontHandle);
return 0;
@ -1420,6 +1423,7 @@ static int sceFontFlush(u32 fontHandle) {
return ERROR_FONT_INVALID_PARAMETER;
}
currentMIPS->r[MIPS_REG_V0] = 0;
font->GetFontLib()->flushFont();
return 0;

View File

@ -474,6 +474,7 @@ static int sceNetApctlDisconnect() {
ERROR_LOG(SCENET, "UNIMPL %s()", __FUNCTION__);
// Like its 'sister' function sceNetAdhocctlDisconnect, we need to alert Apctl handlers that a disconnect took place
// or else games like Phantasy Star Portable 2 will hang at certain points (e.g. returning to the main menu after trying to connect to PSN).
currentMIPS->r[MIPS_REG_V0] = 0;
__UpdateApctlHandlers(0, 0, PSP_NET_APCTL_EVENT_DISCONNECT_REQUEST, 0);
return 0;
}