Skip to content

Commit 9b3f377

Browse files
committed
console: don't write garbage into the video framebuffer
1 parent 0a35583 commit 9b3f377

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

libogc/console.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void __console_vipostcb(u32 retraceCnt)
8585
do_xfb_copy = true;
8686

8787
offset = (curr_con->target_y*curr_con->tgt_stride) + curr_con->target_x*VI_DISPLAY_PIX_SZ;
88-
ptr = curr_con->destbuffer+offset;
88+
ptr = curr_con->destbuffer;
8989
fb = VIDEO_GetCurrentFramebuffer()+offset;
9090
fb_stride = curr_con->tgt_stride/4 - (curr_con->con_xres/VI_DISPLAY_PIX_SZ);
9191

@@ -117,8 +117,8 @@ static void __console_drawc(int c)
117117
if(!curr_con) return;
118118
con = curr_con;
119119

120-
ptr = (unsigned int*)(con->destbuffer + ( con->con_stride * con->cursor_row * FONT_YSIZE ) + ((con->cursor_col * FONT_XSIZE / 2) * 4) +
121-
(curr_con->target_y*curr_con->tgt_stride) + curr_con->target_x*VI_DISPLAY_PIX_SZ);
120+
ptr = (unsigned int*)(con->destbuffer + ( con->con_stride * con->cursor_row * FONT_YSIZE ) + ((con->cursor_col * FONT_XSIZE / 2) * 4)
121+
+ (_console_buffer != NULL ? 0 : (curr_con->target_y*curr_con->tgt_stride) + curr_con->target_x*VI_DISPLAY_PIX_SZ));
122122
pbits = &con->font[c * FONT_YSIZE];
123123
nextline = con->con_stride/4 - 4;
124124
fgcolor = con->foreground;

0 commit comments

Comments
 (0)