diff options
| author | roeming <brother64youyou@gmail.com> | 2026-01-28 22:38:20 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-28 19:38:20 -0800 |
| commit | c161523338fedf22e206a1c85d2777b4e6f667d0 (patch) | |
| tree | e574b095a1b222ceb1b397da9a32765bb1309175 /src/JSystem/JUtility/JUTGraphFifo.cpp | |
| parent | 46951b63e8775f86d6e62898924eb6def6a76127 (diff) | |
JUtility matching for debug (#3074)
* Jut cleanup work
* data section fix
* match the last of JUtility
* added more helpful comment
* Add missed null terminator
* do while -> while loop
* replace more do whiles
* Fix wii regression
* Add suggestions
* fix null check
---------
Co-authored-by: roeming <roeming@users.noreply.github.com>
Diffstat (limited to 'src/JSystem/JUtility/JUTGraphFifo.cpp')
| -rw-r--r-- | src/JSystem/JUtility/JUTGraphFifo.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/JSystem/JUtility/JUTGraphFifo.cpp b/src/JSystem/JUtility/JUTGraphFifo.cpp index a30a0aeace..6792e10f8c 100644 --- a/src/JSystem/JUtility/JUTGraphFifo.cpp +++ b/src/JSystem/JUtility/JUTGraphFifo.cpp @@ -9,16 +9,16 @@ static bool data_804514B8; JUTGraphFifo* JUTGraphFifo::sCurrentFifo; JUTGraphFifo::JUTGraphFifo(u32 size) { - mSize = size + 0x1F & ~0x1F; + mSize = ROUND(size, 0x20); if (data_804514B8) { - u32 r29 = sizeof(GXFifoObj); - mFifo = (GXFifoObj*)JKRAllocFromSysHeap(mSize + r29, 32); - mBase = (u8*)mFifo + r29; + u32 fifoSize = sizeof(GXFifoObj); + mFifo = (GXFifoObj*)JKRAllocFromSysHeap(fifoSize + mSize, 32); + mBase = (u8*)mFifo + fifoSize; GXInitFifoBase(mFifo, mBase, mSize); GXInitFifoPtrs(mFifo, mBase, mBase); } else { mBase = JKRAllocFromSysHeap(mSize + 0xA0, 32); - mBase = (void*)((intptr_t)mBase + 0x1F & ~0x1F); + mBase = (void*)ROUND((intptr_t)mBase, 0x20); mFifo = GXInit(mBase, mSize); data_804514B8 = true; sCurrentFifo = this; @@ -30,8 +30,9 @@ bool JUTGraphFifo::mGpStatus[5]; JUTGraphFifo::~JUTGraphFifo() { sCurrentFifo->save(); - do { - } while (isGPActive()); + while (isGPActive()) { + // nop + } if (sCurrentFifo == this) { sCurrentFifo = NULL; |
