mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Return pixel offset instead of byte offset in gfxGetFramebufferDisplayOffset().
This commit is contained in:
parent
353faed782
commit
94809a1e15
@ -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.
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user