Skip to content

Commit b07b158

Browse files
committed
reword comment for readability
1 parent 0c0947e commit b07b158

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libogc/console.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,10 @@ static void __console_drawc(int c)
247247
ptr = __console_get_cursor_start_ptr();
248248

249249
pbits = &con->font.gfx[c * FONT_YSIZE];
250-
// con_stride is in bytes, but we increment ptr which isn't a byte pointer
251-
// and the work in the loop already increments ptr 4 times before needing to go to the next row
250+
// con_stride is in bytes, but we increment ptr which is an int pointer
251+
// -> we have to divide to not skip over rows we want to write to
252+
// the work in the loop already writes 4 ints before going to the next row
253+
// -> subtract that 4 here, so nextline can be directly added to ptr later
252254
nextline = con->con_stride/sizeof(*ptr) - 4;
253255

254256
fgcolor = currentConsole->fg;

0 commit comments

Comments
 (0)