diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-11-26 23:17:55 +0100 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-11-26 23:17:55 +0100 |
| commit | 7393db6692c861bc66164c0dd9b83f23a554775b (patch) | |
| tree | d60c9deb33630d5fb6117c7c1bbc098e62a66f28 /video/console.c | |
| parent | 9c8cfc2e52b0446f7cab14325028075760869b45 (diff) | |
changes, improvements and cleanup
Diffstat (limited to 'video/console.c')
| -rw-r--r-- | video/console.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/video/console.c b/video/console.c index 5b6e103..743aaac 100644 --- a/video/console.c +++ b/video/console.c @@ -1,4 +1,5 @@ #include "console.h" +#include "kernel/spinlock.h" #include "kernel/config.h" //#define FOOLOS_CONSOLE @@ -109,11 +110,12 @@ void scr_nextline() void scr_put_char(char ch,char col) { + lock_spin(6); if(ch=='\n')scr_nextline(); else if(posx<SCR_WIDTH) { - print_char_col(posx,posy,ch,SCR_GREEN); + print_char_col(posx,posy,ch,col); posx++; } @@ -121,6 +123,8 @@ void scr_put_char(char ch,char col) if(posx>=SCR_WIDTH)scr_nextline(); #endif + lock_release(6); + } @@ -161,7 +165,7 @@ void scr_put_string(char *str) void scr_backspace() { if(posx==0)return; - print_char_col(posx-1,posy,'@',SCR_LGREEN); + print_char_col(posx-1,posy,' ',SCR_LGREEN); posx--; } |
