Skip to content

Commit

Permalink
Merge pull request #13077 from unknownbrackets/savestate
Browse files Browse the repository at this point in the history
SaveState: Make sure to default init net data
  • Loading branch information
hrydgard authored Jun 30, 2020
2 parents 1943722 + e6b42f3 commit 9aab3d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Core/HLE/proAdhoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -778,11 +778,10 @@ class AfterMatchingMipsCall : public PSPAction {
}
void run(MipsCall &call) override;
void SetContextID(u32 ContextID, u32 eventId);
void SetContext(SceNetAdhocMatchingContext *Context, u32 eventId) { context = Context; EventID = eventId; }

private:
u32 EventID;
SceNetAdhocMatchingContext *context;
u32 EventID = 0;
SceNetAdhocMatchingContext *context = nullptr;
};

extern int actionAfterMatchingMipsCall;
Expand Down
5 changes: 4 additions & 1 deletion Core/HLE/sceFont.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ class PostAllocCallback : public PSPAction {
p.Do(fontLibID_);
if (s >= 2) {
p.Do(errorCodePtr_);
} else {
errorCodePtr_ = 0;
}
}
void run(MipsCall &call) override;
Expand Down Expand Up @@ -721,7 +723,8 @@ void PostAllocCallback::run(MipsCall &call) {
u32 v0 = currentMIPS->r[MIPS_REG_V0];
if (v0 == 0) {
// TODO: Who deletes fontLib?
Memory::Write_U32(ERROR_FONT_OUT_OF_MEMORY, errorCodePtr_);
if (errorCodePtr_)
Memory::Write_U32(ERROR_FONT_OUT_OF_MEMORY, errorCodePtr_);
call.setReturnValue(0);
} else {
FontLib *fontLib = fontLibList[fontLibID_];
Expand Down

0 comments on commit 9aab3d9

Please sign in to comment.