summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-02-26 03:42:42 +0100
committerbunnei <bunneidev@gmail.com>2015-02-26 03:42:42 +0100
commitc7dac73b0c4f3552882f8e7a04ffff8ead435d7b (patch)
treea159087da1d5d57754524150b265cdbbcc03aebc /src/video_core
parentMerge pull request #604 from Subv/arc_ssd (diff)
parentVideo core: Fix A4 texture decoding (diff)
downloadyuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.tar
yuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.tar.gz
yuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.tar.bz2
yuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.tar.lz
yuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.tar.xz
yuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.tar.zst
yuzu-c7dac73b0c4f3552882f8e7a04ffff8ead435d7b.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp4
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 795449423..f436aa541 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -436,9 +436,9 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
case Regs::TextureFormat::A4:
{
- const u8* source_ptr = source + offset / 2 + i / 2;
+ const u8* source_ptr = source + (offset + i) / 2;
- u8 a = (coarse_x % 2) ? ((*source_ptr)&0xF) : (((*source_ptr) & 0xF0) >> 4);
+ u8 a = (i % 2) ? ((*source_ptr & 0xF0) >> 4) : (*source_ptr & 0xF);
a = Color::Convert4To8(a);
if (disable_alpha) {