Skip to content

Commit

Permalink
GPU: Fix a bug on big-endian systems where setting the backdrop color…
Browse files Browse the repository at this point in the history
… could cause a crash.
  • Loading branch information
rogerman committed Jul 2, 2024
1 parent fe0ae83 commit fc6ff8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion desmume/src/GPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ void GPUEngineBase::UpdateRenderStates(const size_t l)
{
currRenderState.workingBackdropColor16 = currRenderState.backdropColor16;
}
currRenderState.workingBackdropColor32.value = LOCAL_TO_LE_32( (this->_targetDisplay->GetColorFormat() == NDSColorFormat_BGR666_Rev) ? COLOR555TO666(LOCAL_TO_LE_16(currRenderState.workingBackdropColor16)) : COLOR555TO888(LOCAL_TO_LE_16(currRenderState.workingBackdropColor16)) );
currRenderState.workingBackdropColor32.value = LOCAL_TO_LE_32( (this->_targetDisplay->GetColorFormat() == NDSColorFormat_BGR666_Rev) ? COLOR555TO666(currRenderState.workingBackdropColor16) : COLOR555TO888(currRenderState.workingBackdropColor16) );

// Save the current render states to this line's compositor info.
compInfo.renderState = currRenderState;
Expand Down

0 comments on commit fc6ff8e

Please sign in to comment.