BIOS sets video mode from emulator configuration. Fixed iteration in DX VShaderCache::Cleanup.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@644 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
donkopunchstania 2008-09-23 20:55:01 +00:00
parent d8f8167613
commit 17cff80f2b
2 changed files with 8 additions and 2 deletions

View File

@ -298,9 +298,11 @@ bool CBoot::EmulatedBIOS_Wii(bool _bDebug)
Memory::Write_U8(0x80, 0x0000315c); // OSInit
Memory::Write_U8(0x00, 0x00000006); // DVDInit
Memory::Write_U8(0x00, 0x00000007); // DVDInit
Memory::Write_U32(0x00000005, 0x000000cc); // VIInit
Memory::Write_U16(0x0000, 0x000030e0); // PADInit
// fake the VI Init of the BIOS
Memory::Write_U32(Core::g_CoreStartupParameter.bNTSC ? 0 : 1, 0x000000CC);
// clear exception handler
for (int i = 0x3000; i <= 0x3038; i += 4)
{

View File

@ -200,7 +200,7 @@ void VShaderCache::SetShader()
void VShaderCache::Cleanup()
{
for (VSCache::iterator iter=vshaders.begin(); iter!=vshaders.end();iter++)
for (VSCache::iterator iter=vshaders.begin(); iter!=vshaders.end();)
{
VSCacheEntry &entry = iter->second;
if (entry.frameCount < frameCount - 30)
@ -208,6 +208,10 @@ void VShaderCache::Cleanup()
entry.Destroy();
iter = vshaders.erase(iter);
}
else
{
++iter;
}
}
SETSTAT(stats.numVertexShadersAlive, (int)vshaders.size());
}