What's new

Two patches I found in a mupen64 openSUSE package

RedDwarf

New member
When packaging Mupen64Plus for openSUSE I found this in the Mupen64 package.
Code:
--- RenderExt.cpp  
+++ RenderExt.cpp       2007/11/15 14:22:48  
@@ -405,7 +405,7 @@  
        }  
   
        //RECT src = {left,top,width, height};  
-       float depth = ( gRDP.otherMode.depth_source == 1 ) ? depth = gRDP.fPrimitiveDepth : 0;  
+       float depth = ( gRDP.otherMode.depth_source == 1 ) ? gRDP.fPrimitiveDepth : 0;  
   
        float x0 = sprite.sprite.objX/4.0f;  
        float y0 = sprite.sprite.objY/4.0f;  
--- TextureFilters.cpp  
+++ TextureFilters.cpp  2007/11/15 14:24:26  
@@ -1858,7 +1858,8 @@  
                                        }  
                                        else if( entry.ti.Format == TXT_FMT_I )  
                                        {  
-                                               *pdst++ = *(pdst-1);  
+                                               *pdst = *(pdst-1);  
+                                               pdst++;  
                                        }  
                                        else  
                                        {
They still apply to Mupen64Plus 1.3. The first one is pretty stupid, but... And the seconds one, I _suppose_ the "++" from "*pdst++" applies to *pdst and not to pdst, and so there is a real bug?
 

Richard42

Emulator Developer
Thanks for the info. I'm pretty sure that I fixed the second one recently because it threw a warning when we added -Wall to the makefile. I'll take a look at the first.
 

nmn

Mupen64Plus Dev.
I believe the actual affect of such code is undefined but GCC handles it correctly.
 

Richard42

Emulator Developer
Without further context, the first change looks correct as well.

I looked at the code for the first change at the head of SVN, and someone had already modified it. But the new code was also doing some "clever" things, so I simplified it and committed it.
 

Top