Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

Rasterizer: Fixed a warning in GetWrappedTexCoord.

Subv5410367ebfc0
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp
index 94873f4062..81df09baf4 100644
--- a/src/video_core/rasterizer.cpp
+++ b/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: