Skip to content

Commit

Permalink
handle dlist segment addresses with new macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez committed Feb 27, 2024
1 parent 5c2ecd5 commit 4c1a36b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions OTRExporter/DisplayListExporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,12 @@ void OTRExporter_DisplayList::Save(ZResource* res, const fs::path& outPath, Bina

u32 dListVal = (data & 0x0FFFFFFF) + 1;

// Using custom macro to signal to the render to perform segment offset adjustments
// This preserves portability of segment addresses on 32bit and 64bit machines
if (pp != 0)
value = {gsSPBranchList(dListVal)};
value = {gsSPBranchListSegment(dListVal)};
else
value = {gsSPDisplayList(dListVal)};
value = {gsSPDisplayListSegment(dListVal)};

word0 = value.words.w0;
word1 = value.words.w1;
Expand Down

0 comments on commit 4c1a36b

Please sign in to comment.