A little iterator bug and a compiler warning in the OpenGL code.

Use -fvisibility-inlines-hidden on OS X as well.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5875 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Soren Jorvang
2010-07-12 20:11:19 +00:00
parent 9cb41e7c70
commit 61bd545f80
4 changed files with 24 additions and 20 deletions

View File

@ -193,17 +193,17 @@ void TextureMngr::Shutdown()
void TextureMngr::ProgressiveCleanup()
{
TexCache::iterator iter = textures.begin();
while (iter != textures.end())
TexCache::iterator iter = textures.begin();
while (iter != textures.end())
{
if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second.frameCount)
if (frameCount > TEXTURE_KILL_THRESHOLD + iter->second.frameCount)
{
iter->second.Destroy(false);
iter = textures.erase(iter);
}
else
++iter;
}
iter->second.Destroy(false);
textures.erase(iter++);
}
else
++iter;
}
}
void TextureMngr::InvalidateRange(u32 start_address, u32 size)
@ -368,9 +368,11 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
// instead of destroying it and having to create a new one.
// Might speed up movie playback very, very slightly.
TextureIsDinamic = (entry.isRenderTarget || entry.isDinamic) && !g_ActiveConfig.bCopyEFBToTexture;
if (!entry.isRenderTarget &&
((!entry.isDinamic && width == entry.w && height==entry.h && FullFormat == entry.fmt)
|| (entry.isDinamic && entry.w == width && entry.h == height)))
if (!entry.isRenderTarget && ((!entry.isDinamic &&
width == entry.w && height == entry.h &&
(int)FullFormat == entry.fmt) ||
(entry.isDinamic &&
entry.w == width && entry.h == height)))
{
glBindTexture(entry.isRectangle ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D, entry.texture);
GL_REPORT_ERRORD();