Skip to content

Commit f8e014a

Browse files
committed
adjust for 1-based windows - switchbrew/libnx#682
1 parent bf9df10 commit f8e014a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

graphics/deko3d/deko_console/source/gpu_console.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -443,8 +443,8 @@ static void GpuRenderer_scrollWindow(PrintConsole* con)
443443
// Perform the scrolling
444444
for (int y = 0; y < con->windowHeight-1; y ++) {
445445
memcpy(
446-
&r->charBuf[(con->windowY+y+0)*con->consoleWidth + con->windowX],
447-
&r->charBuf[(con->windowY+y+1)*con->consoleWidth + con->windowX],
446+
&r->charBuf[(con->windowY-1+y+0)*con->consoleWidth + con->windowX - 1],
447+
&r->charBuf[(con->windowY-1+y+1)*con->consoleWidth + con->windowX - 1],
448448
sizeof(ConsoleChar)*con->windowWidth);
449449
}
450450
}

0 commit comments

Comments
 (0)