summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
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());
}