summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp
diff options
context:
space:
mode:
authorhrydgard <hrydgard@gmail.com>2008-08-31 13:36:52 +0000
committerhrydgard <hrydgard@gmail.com>2008-08-31 13:36:52 +0000
commit09406d76c44d3a8efb1932b8d7f1345ae0e4c604 (patch)
tree3149bf6c83f7d010ce291b7df832660c6dd00db2 /Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp
parentd9e129ae99bb11edfc59053c97c1d798e1ab4dad (diff)
Fix/workaround at least one class of buffer underruns in the GL plugin. Fix some bad deletes (instead of delete []). etc.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@404 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp
index 6055240867..5a9b60caed 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/OpcodeDecoding.cpp
@@ -269,8 +269,8 @@ void Decode(void)
// draw primitives
default:
if (Cmd&0x80)
- {
- // load vertices
+ {
+ // load vertices (use computed vertex size from FifoCommandRunnable above)
u16 numVertices = g_pDataReader->Read16();
if (numVertices > 0) {
g_VertexLoaders[Cmd & GX_VAT_MASK].RunVertices((Cmd & GX_PRIMITIVE_MASK) >> GX_PRIMITIVE_SHIFT, numVertices);
@@ -301,11 +301,6 @@ void OpcodeDecoder_Shutdown()
void OpcodeDecoder_Run()
{
- // just a small check
- if (g_pDataReader != &g_fifoReader) {
- SysMessage("very strange");
- }
-
DVSTARTPROFILE();
while (FifoCommandRunnable())