From 94809a1e15d09295b842bc1016b58cadcd4d21d6 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Mon, 20 Nov 2017 20:44:54 -0500 Subject: [PATCH] Return pixel offset instead of byte offset in gfxGetFramebufferDisplayOffset(). --- nx/source/gfx/gfx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx/source/gfx/gfx.c b/nx/source/gfx/gfx.c index f1d7abad..3b296cfa 100644 --- a/nx/source/gfx/gfx.c +++ b/nx/source/gfx/gfx.c @@ -259,6 +259,6 @@ u32 gfxGetFramebufferDisplayOffset(u32 x, u32 y) { tmp_pos = ((y%16)/8)*512 + ((x%16)/8)*256 + ((y%8)/2)*64 + ((x%8)/4)*32 + (y%2)*16 + (x%4)*4;//This line is a modified version of code from the Tegra X1 datasheet. - return tilepos + tmp_pos; + return (tilepos + tmp_pos) / 4; }