summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authordonkopunchstania <donkopunchstania@gmail.com>2008-09-23 20:55:01 +0000
committerdonkopunchstania <donkopunchstania@gmail.com>2008-09-23 20:55:01 +0000
commit17cff80f2be8987b861e6acced055cb3b80581ff (patch)
tree734f437faf19286311b67908a191f2be73965ea6 /Source
parentd8f816761306f07d169bb27b6363ae1f71355b1f (diff)
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
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/Src/Boot/Boot.cpp4
-rw-r--r--Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.cpp6
2 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/Core/Src/Boot/Boot.cpp b/Source/Core/Core/Src/Boot/Boot.cpp
index 269596ef55..2379a12aed 100644
--- a/Source/Core/Core/Src/Boot/Boot.cpp
+++ b/Source/Core/Core/Src/Boot/Boot.cpp
@@ -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)
{
diff --git a/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.cpp b/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.cpp
index c28128f11c..70e7936380 100644
--- a/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.cpp
+++ b/Source/Plugins/Plugin_VideoDX9/Src/ShaderManager.cpp
@@ -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());
}