Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libogc/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static inline void *__console_get_buffer_start_ptr()
// writing characters/pixels to the console buffer via stdio/etc does not involve those values otherwise
// only console dimensions (con_xres/con_yres/con_stride) and cursor/window values (cursorX/cursorY/con_cols/con_rows/...)

return _console_buffer != NULL
return _console_buffer != NULL
? _console_buffer // same as currentConsole->destbuffer, don't need to load from a struct access
: __console_offset_by_pixels(currentConsole->destbuffer, currentConsole->target_y, currentConsole->tgt_stride, currentConsole->target_x);
}
Expand Down Expand Up @@ -496,6 +496,8 @@ void __console_init(void *destbuffer,int xstart,int ystart,int xres,int yres,int

_CPU_ISR_Disable(level);

_console_buffer = NULL; // exception handler workaround

__set_default_console(destbuffer, xstart, ystart, stride, xres, yres, stride);

_CPU_ISR_Restore(level);
Expand Down
Loading