Sfoglia il codice sorgente

Rasterizer: Fixed a warning in GetWrappedTexCoord.

Redeclaring the variable inside the switch was causing weird behavior.
Subv 11 anni fa
parent
commit
5410367ebf
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      src/video_core/rasterizer.cpp

+ 4 - 4
src/video_core/rasterizer.cpp

@@ -266,10 +266,10 @@ static void ProcessTriangleInternal(const VertexShader::OutputVertex& v0,
 
                         case Regs::TextureConfig::MirroredRepeat:
                         {
-                            int val = (int)((unsigned)val % (2 * size));
-                            if (val >= size)
-                                val = 2 * size - 1 - val;
-                            return val;
+                            int coord = (int)((unsigned)val % (2 * size));
+                            if (coord >= size)
+                                coord = 2 * size - 1 - coord;
+                            return coord;
                         }
 
                         default: