Skip to content

Commit

Permalink
Latte: rendertarget is a bitmask
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts committed Aug 16, 2023
1 parent 85aa4f0 commit 437fe33
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/Cafe/HW/Latte/Core/Latte.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ extern uint8* gxRingBufferReadPtr; // currently active read pointer (gx2 ring bu
void LatteTextureLoader_estimateAccessedDataRange(LatteTexture* texture, sint32 sliceIndex, sint32 mipIndex, uint32& addrStart, uint32& addrEnd);

// render target

#define RENDER_TARGET_TV (1 << 0)
#define RENDER_TARGET_DRC (1 << 2)

void LatteRenderTarget_updateScissorBox();

void LatteRenderTarget_trackUpdates();
Expand Down
4 changes: 2 additions & 2 deletions src/Cafe/HW/Latte/Core/LatteRenderTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,9 +1048,9 @@ void LatteRenderTarget_itHLECopyColorBufferToScanBuffer(MPTR colorBufferPtr, uin
}
}

if (renderTarget == 4 && g_renderer->IsPadWindowActive())
if ((renderTarget & RENDER_TARGET_DRC) && g_renderer->IsPadWindowActive())
LatteRenderTarget_copyToBackbuffer(texView, true);
if ((renderTarget == 1 && !showDRC) || (renderTarget == 4 && showDRC))
if (((renderTarget & RENDER_TARGET_TV) && !showDRC) || ((renderTarget & RENDER_TARGET_DRC) && showDRC))
LatteRenderTarget_copyToBackbuffer(texView, false);
}

Expand Down

0 comments on commit 437fe33

Please sign in to comment.