summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-03-16 15:14:04 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-03-16 15:14:04 +0100
commit92fd2a1ee30b4c0b5af9ebb268f8f1ace649f371 (patch)
tree938f6f5769675df5df6dc153df6f50b4500840e8 /src
parentMerge pull request #657 from Subv/flip (diff)
downloadyuzu-92fd2a1ee30b4c0b5af9ebb268f8f1ace649f371.tar
yuzu-92fd2a1ee30b4c0b5af9ebb268f8f1ace649f371.tar.gz
yuzu-92fd2a1ee30b4c0b5af9ebb268f8f1ace649f371.tar.bz2
yuzu-92fd2a1ee30b4c0b5af9ebb268f8f1ace649f371.tar.lz
yuzu-92fd2a1ee30b4c0b5af9ebb268f8f1ace649f371.tar.xz
yuzu-92fd2a1ee30b4c0b5af9ebb268f8f1ace649f371.tar.zst
yuzu-92fd2a1ee30b4c0b5af9ebb268f8f1ace649f371.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/color.h2
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/color.h b/src/video_core/color.h
index 14ade74f2..43d635e2c 100644
--- a/src/video_core/color.h
+++ b/src/video_core/color.h
@@ -124,7 +124,7 @@ inline u32 DecodeD24(const u8* bytes) {
* @return Resulting values stored as a Math::Vec2
*/
inline const Math::Vec2<u32> DecodeD24S8(const u8* bytes) {
- return { (bytes[2] << 16) | (bytes[1] << 8) | bytes[0], bytes[3] };
+ return { static_cast<u32>((bytes[2] << 16) | (bytes[1] << 8) | bytes[0]), bytes[3] };
}
/**
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 745c4f4ed..83982b4f2 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -322,7 +322,7 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
case Regs::TextureFormat::RGBA8:
{
auto res = Color::DecodeRGBA8(source + VideoCore::GetMortonOffset(x, y, 4));
- return { res.r(), res.g(), res.b(), disable_alpha ? 255 : res.a() };
+ return { res.r(), res.g(), res.b(), static_cast<u8>(disable_alpha ? 255 : res.a()) };
}
case Regs::TextureFormat::RGB8:
@@ -334,7 +334,7 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
case Regs::TextureFormat::RGB5A1:
{
auto res = Color::DecodeRGB5A1(source + VideoCore::GetMortonOffset(x, y, 2));
- return { res.r(), res.g(), res.b(), disable_alpha ? 255 : res.a() };
+ return { res.r(), res.g(), res.b(), static_cast<u8>(disable_alpha ? 255 : res.a()) };
}
case Regs::TextureFormat::RGB565:
@@ -346,7 +346,7 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
case Regs::TextureFormat::RGBA4:
{
auto res = Color::DecodeRGBA4(source + VideoCore::GetMortonOffset(x, y, 2));
- return { res.r(), res.g(), res.b(), disable_alpha ? 255 : res.a() };
+ return { res.r(), res.g(), res.b(), static_cast<u8>(disable_alpha ? 255 : res.a()) };
}
case Regs::TextureFormat::IA8: