summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/EfbInterface.cpp
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2014-02-16 16:59:26 +0100
committerTillmann Karras <tilkax@gmail.com>2014-02-16 16:59:45 +0100
commit0d6ab2c65809054730d7301d60d517661f39602d (patch)
tree45e6a0e88e62f3884c0b9e6c5bc26a8e8162bb74 /Source/Core/VideoBackends/Software/EfbInterface.cpp
parent1e94853301b15fcce23db311f480b64d12ac4d41 (diff)
Silence some Windows compiler warnings
by adding explicit type casts.
Diffstat (limited to 'Source/Core/VideoBackends/Software/EfbInterface.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/EfbInterface.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbInterface.cpp b/Source/Core/VideoBackends/Software/EfbInterface.cpp
index 8fdcb5fa04..4b10ba43ee 100644
--- a/Source/Core/VideoBackends/Software/EfbInterface.cpp
+++ b/Source/Core/VideoBackends/Software/EfbInterface.cpp
@@ -473,9 +473,9 @@ namespace EfbInterface
// GameCube/Wii uses the BT.601 standard algorithm for converting to YCbCr; see
// http://www.equasys.de/colorconversion.html#YCbCr-RGBColorFormatConversion
- out->Y = 0.257f * color[RED_C] + 0.504f * color[GRN_C] + 0.098f * color[BLU_C];
- out->U = -0.148f * color[RED_C] + -0.291f * color[GRN_C] + 0.439f * color[BLU_C];
- out->V = 0.439f * color[RED_C] + -0.368f * color[GRN_C] + -0.071f * color[BLU_C];
+ out->Y = (u8)( 0.257f * color[RED_C] + 0.504f * color[GRN_C] + 0.098f * color[BLU_C]);
+ out->U = (u8)(-0.148f * color[RED_C] + -0.291f * color[GRN_C] + 0.439f * color[BLU_C]);
+ out->V = (u8)( 0.439f * color[RED_C] + -0.368f * color[GRN_C] + -0.071f * color[BLU_C]);
}
u32 GetDepth(u16 x, u16 y)