Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIF: Get rid of assertion with side effects #10465

Merged
merged 1 commit into from
Dec 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pcsx2/Gif_Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ bool Gif_HandlerAD(u8* pMem)
return false;
}

bool Gif_HandlerAD_MTVU(u8* pMem)
void Gif_HandlerAD_MTVU(u8* pMem)
{
// Note: Atomic communication is with MTVU.cpp Get_GSChanges
const u8 reg = pMem[8] & 0x7f;
Expand Down Expand Up @@ -129,7 +129,6 @@ bool Gif_HandlerAD_MTVU(u8* pMem)
{
DevCon.Warning("GIF Handler Debug - Write to unknown register! [reg=%x]", reg);
}
return 0;
}

// Returns true if pcsx2 needed to process the packet...
Expand Down
5 changes: 3 additions & 2 deletions pcsx2/Gif_Unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct GS_Packet;
extern void Gif_MTGS_Wait(bool isMTVU);
extern void Gif_FinishIRQ();
extern bool Gif_HandlerAD(u8* pMem);
extern bool Gif_HandlerAD_MTVU(u8* pMem);
extern void Gif_HandlerAD_MTVU(u8* pMem);
extern bool Gif_HandlerAD_Debug(u8* pMem);
extern void Gif_AddBlankGSPacket(u32 size, GIF_PATH path);
extern void Gif_AddGSPacketMTVU(GS_Packet& gsPack, GIF_PATH path);
Expand Down Expand Up @@ -450,7 +450,8 @@ struct Gif_Path
break; // Exit Early
if (gifTag.curReg() == GIF_REG_A_D)
{
pxAssert(!Gif_HandlerAD_MTVU(&buffer[curOffset]));
pxAssertMsg(Gif_HandlerAD_Debug(&buffer[curOffset]), "Unhandled GIF packet");
Gif_HandlerAD_MTVU(&buffer[curOffset]);
}
incTag(curOffset, gsPack.size, 16); // 1 QWC
gifTag.packedStep();
Expand Down