platinum: Validity check before enable display.

This commit is contained in:
joevt 2024-02-18 18:14:31 -08:00 committed by dingusdev
parent 8aaf211c5b
commit bd63d1dcda
1 changed files with 7 additions and 0 deletions

View File

@ -444,6 +444,13 @@ void PlatinumCtrl::enable_display() {
this->stop_refresh_task();
if (this->active_width <= 0 || this->active_height <= 0 || this->pixel_clock <= 0) {
this->blank_on = true;
this->crtc_on = false;
this->blank_display();
return;
}
this->refresh_rate = (double)(this->pixel_clock) / (this->hori_total * this->vert_total);
this->start_refresh_task();