mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-12-22 15:29:58 +00:00
atimach64gx: Make sure refresh rate is reasonable.
This commit is contained in:
parent
a190d5cbd9
commit
eb1d5d0a6d
@ -548,6 +548,12 @@ void AtiMach64Gx::crtc_update()
|
||||
// calculate display refresh rate
|
||||
this->refresh_rate = this->pixel_clock / this->hori_total / this->vert_total;
|
||||
|
||||
if (this->refresh_rate < 24 || this->refresh_rate > 120) {
|
||||
LOG_F(ERROR, "%s: Refresh rate is weird. Will try 60 Hz", this->name.c_str());
|
||||
this->refresh_rate = 60;
|
||||
this->pixel_clock = this->refresh_rate * this->hori_total / this->vert_total;
|
||||
}
|
||||
|
||||
// set up frame buffer converter
|
||||
switch (this->pixel_format) {
|
||||
case 2:
|
||||
|
Loading…
Reference in New Issue
Block a user