-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add line handling in fb_printStr #196
Conversation
src/kernel/framebuffer/framebuffer.c
Outdated
void _fb_printStr( const char *string, uint32_t fg, uint32_t bg ) { | ||
_fb_printStrAt(string, 0, cur_fb_line, fg, bg); | ||
cur_fb_line++; | ||
if ( cur_fb_line > framebuffer_data.number_of_lines ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldnt this be >=
?
@@ -74,15 +74,16 @@ void logline(log_level_t level, const char* msg){ | |||
fbCurrentLine++; | |||
} | |||
else { | |||
_fb_printStr(logLevelStrings[level], 0, fbCurrentLine, 0xFFFFFFFF, 0); | |||
_fb_printStr(msg, logLevelStrLen, fbCurrentLine, 0xFFFFFFFF, 0); | |||
//TODO: fbCurrentLine should be aligned with cur_fbLine in the framebuffer case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm yeah, this is an interesting one - I remember doing that because there no state tracking a current line number for the terminal output.
Now that the framebuffer keeps track of that itself, fbCurrentLine
can be removed I reckon, and just use the new codepath. Log messages will work nicely with other things that print directly to the framebuffer now too.
Close #92