Skip to content

Commit

Permalink
GIF: Get rid of assertion with side effects
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 24, 2023
1 parent 8b7c69c commit 4608579
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 4608579

Please sign in to comment.