Cocoa Port: Fix a bug where mipmapped HUD font rendering would fail on very small non-Retina displays. (Regression from commit 180df28c.)
- As a positive side-effect, this fix also allows mipmapped HUD font rendering to work on the OpenEmu plug-in, so that capability has now been enabled.
This commit is contained in:
parent
25643e5f82
commit
d9c912d7fd
|
@ -6407,7 +6407,7 @@ void OGLHUDLayer::CopyHUDFont(const FT_Face &fontFace, const size_t glyphSize, c
|
|||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
|
||||
GLint texLevel = 0;
|
||||
for (size_t tileSize = glyphTileSize, texSize = glyphTileSize * 16, gSize = glyphSize; texSize >= 1; texLevel++, tileSize >>= 1, texSize >>= 1, gSize = (GLfloat)tileSize * 0.75f)
|
||||
for (size_t tileSize = glyphTileSize, texSize = glyphTileSize * 16, gSize = glyphSize; gSize >= 1; texLevel++, tileSize >>= 1, texSize >>= 1, gSize = (GLfloat)tileSize * 0.75f)
|
||||
{
|
||||
const size_t charMapBufferPixCount = texSize * texSize;
|
||||
const uint32_t fontColor = 0x00FFFFFF;
|
||||
|
@ -6422,11 +6422,6 @@ void OGLHUDLayer::CopyHUDFont(const FT_Face &fontFace, const size_t glyphSize, c
|
|||
charMapBuffer[i] = fontColor;
|
||||
}
|
||||
|
||||
if (tileSize == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
error = FT_Set_Char_Size(fontFace, gSize << 6, gSize << 6, 72, 72);
|
||||
if (error)
|
||||
{
|
||||
|
|
|
@ -376,7 +376,7 @@ volatile bool execute = true;
|
|||
_cdp = new OE_OGLDisplayPresenter(fetchObj);
|
||||
_cdp->Init();
|
||||
_cdp->SetHUDFontPath(hudFontPath);
|
||||
_cdp->SetHUDRenderMipmapped(false); // Mipmapped HUD rendering doesn't work on OpenEmu!
|
||||
_cdp->SetHUDRenderMipmapped(true);
|
||||
|
||||
// OpenEmu doesn't provide us with the backing scaling factor, which is used to
|
||||
// adapt ClientDisplayPresenter to HiDPI/Retina displays. But if OpenEmu ever
|
||||
|
|
Loading…
Reference in New Issue