diff options
| author | 2014-12-19 19:20:02 +0100 | |
|---|---|---|
| committer | 2014-12-20 18:06:56 +0100 | |
| commit | 88e9efe4b8b370a93bae688dcbe3c03eda905379 (patch) | |
| tree | 97e2e48b32fbe3d758764786a5eb272a3eb2bd85 /src/video_core/debug_utils | |
| parent | Pica/DebugUtils: Better document LookupTexture. (diff) | |
| download | yuzu-88e9efe4b8b370a93bae688dcbe3c03eda905379.tar.gz yuzu-88e9efe4b8b370a93bae688dcbe3c03eda905379.tar.xz yuzu-88e9efe4b8b370a93bae688dcbe3c03eda905379.zip | |
Pica/DebugUtils: Fix two warnings.
Diffstat (limited to 'src/video_core/debug_utils')
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 1c08ba350..d9fed58bf 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp | |||
| @@ -346,7 +346,7 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture | |||
| 346 | case Regs::TextureFormat::RGBA8: | 346 | case Regs::TextureFormat::RGBA8: |
| 347 | { | 347 | { |
| 348 | const u8* source_ptr = source + coarse_x * block_height * 4 + coarse_y * info.stride + texel_index_within_tile * 4; | 348 | const u8* source_ptr = source + coarse_x * block_height * 4 + coarse_y * info.stride + texel_index_within_tile * 4; |
| 349 | return { source_ptr[3], source_ptr[2], source_ptr[1], disable_alpha ? 255 : source_ptr[0] }; | 349 | return { source_ptr[3], source_ptr[2], source_ptr[1], disable_alpha ? (u8)255 : source_ptr[0] }; |
| 350 | } | 350 | } |
| 351 | 351 | ||
| 352 | case Regs::TextureFormat::RGB8: | 352 | case Regs::TextureFormat::RGB8: |
| @@ -385,7 +385,7 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture | |||
| 385 | g = (g << 4) | g; | 385 | g = (g << 4) | g; |
| 386 | b = (b << 4) | b; | 386 | b = (b << 4) | b; |
| 387 | a = (a << 4) | a; | 387 | a = (a << 4) | a; |
| 388 | return { r, g, b, disable_alpha ? 255 : a }; | 388 | return { r, g, b, disable_alpha ? (u8)255 : a }; |
| 389 | } | 389 | } |
| 390 | 390 | ||
| 391 | case Regs::TextureFormat::IA8: | 391 | case Regs::TextureFormat::IA8: |