ingnore invalid scancodes
This commit is contained in:
@@ -51,9 +51,10 @@ void TextWindow::getPos(int& rel_x, int& rel_y) const {
|
||||
}
|
||||
|
||||
void TextWindow::scrollUp(){
|
||||
for(uint8_t row = from_row; row < to_row; row++){
|
||||
for(uint8_t row = from_row; row < to_row-1; row++){
|
||||
memmove(&CGA::TEXT_BUFFER_BASE[row*CGA::COLUMNS + from_col], &CGA::TEXT_BUFFER_BASE[(row+1)*CGA::COLUMNS + from_col], 2*(to_col-from_col));
|
||||
}
|
||||
memset(&CGA::TEXT_BUFFER_BASE[(to_row-1)*CGA::COLUMNS + from_col] , 0, 2*(to_col-from_col));
|
||||
}
|
||||
|
||||
void TextWindow::print(const char* str, size_t length, CGA::Attribute attrib) {
|
||||
@@ -76,7 +77,7 @@ void TextWindow::print(const char* str, size_t length, CGA::Attribute attrib) {
|
||||
if(from_col+x_now >= to_col-1){
|
||||
x_now = 0;
|
||||
if(from_row + y_now >= to_row-1){
|
||||
//TODO scrollUp()
|
||||
scrollUp();
|
||||
}
|
||||
else{
|
||||
y_now++;
|
||||
|
||||
Reference in New Issue
Block a user