videoctrl: Add cursor_dirty flag.

If the flag is set when it comes time to draw the cursor again, then call setup_hw_cursor to update the cursor before drawing the cursor.
This commit is contained in:
joevt 2024-03-20 04:38:01 -07:00 committed by dingusdev
parent d134107aba
commit e3411670cb
2 changed files with 5 additions and 0 deletions

View File

@ -75,6 +75,10 @@ void VideoCtrlBase::update_screen()
}
if (draw_fb) {
if (this->cursor_dirty) {
this->setup_hw_cursor();
this->cursor_dirty = false;
}
this->display.update(
this->convert_fb_cb, this->cursor_ovl_cb,
this->cursor_on, cursor_x, cursor_y);

View File

@ -75,6 +75,7 @@ protected:
bool crtc_on = false;
bool blank_on = true;
bool cursor_on = false;
bool cursor_dirty = false;
int active_width; // width of the visible display area
int active_height; // height of the visible display area
int hori_total = 0;