diff --git a/src/GBI.cpp b/src/GBI.cpp index b99a1195..af62bb4d 100644 --- a/src/GBI.cpp +++ b/src/GBI.cpp @@ -415,9 +415,10 @@ void GBIInfo::loadMicrocode(u32 uc_start, u32 uc_dstart, u16 uc_dsize) type = F3DTEXA; else if (strncmp(&uc_str[14], "F3DAM", 5) == 0) type = F3DAM; - else if (strncmp(&uc_str[14], "F3DLX.Rej", 9) == 0) + else if (strncmp(&uc_str[14], "F3DLX.Rej", 9) == 0) { current.NoN = true; - else if (strncmp(&uc_str[14], "F3DLP.Rej", 9) == 0) { + current.cullBoth = false; + } else if (strncmp(&uc_str[14], "F3DLP.Rej", 9) == 0) { current.texturePersp = false; current.NoN = true; } diff --git a/src/GBI.h b/src/GBI.h index 2810ddbc..b80e2caf 100644 --- a/src/GBI.h +++ b/src/GBI.h @@ -503,6 +503,7 @@ struct MicrocodeInfo u16 dataSize; u32 type; bool NoN = false; + bool cullBoth = true; bool negativeY = true; bool fast3DPersp = false; bool texturePersp = true; @@ -522,6 +523,7 @@ struct GBIInfo bool isHWLSupported() const; void setHWLSupported(bool _supported); bool isNoN() const { return m_pCurrent != nullptr ? m_pCurrent->NoN : false; } + bool isCullBoth() const { return m_pCurrent != nullptr ? m_pCurrent->cullBoth : false; } bool isNegativeY() const { return m_pCurrent != nullptr ? m_pCurrent->negativeY : true; } bool isTexturePersp() const { return m_pCurrent != nullptr ? m_pCurrent->texturePersp: true; } bool isCombineMatrices() const { return m_pCurrent != nullptr ? m_pCurrent->combineMatrices: false; } diff --git a/src/GraphicsDrawer.cpp b/src/GraphicsDrawer.cpp index 07742ec3..52d89782 100644 --- a/src/GraphicsDrawer.cpp +++ b/src/GraphicsDrawer.cpp @@ -101,7 +101,7 @@ void GraphicsDrawer::_updateCullFace() const if (gSP.geometryMode & G_CULL_BOTH) { gfxContext.enable(enable::CULL_FACE, true); - if ((gSP.geometryMode & G_CULL_BOTH) == G_CULL_BOTH && !GBI.isNoN()) + if ((gSP.geometryMode & G_CULL_BOTH) == G_CULL_BOTH && GBI.isCullBoth()) gfxContext.cullFace(cullMode::FRONT_AND_BACK); else if ((gSP.geometryMode & G_CULL_BACK) == G_CULL_BACK) gfxContext.cullFace(cullMode::BACK);