diff --git a/devices/video/atimach64gx.cpp b/devices/video/atimach64gx.cpp index 3f0c7b7..8e7e0df 100644 --- a/devices/video/atimach64gx.cpp +++ b/devices/video/atimach64gx.cpp @@ -25,7 +25,6 @@ along with this program. If not, see . */ #include -#include #include #include #include @@ -307,17 +306,8 @@ void AtiMach64Gx::enable_crtc_internal() ABORT_F("%s: unsupported pixel depth %d", this->name.c_str(), this->pixel_depth); } - if (this->refresh_task_id) { - TimerManager::get_instance()->cancel_timer(this->refresh_task_id); - } - - uint64_t refresh_interval = static_cast(1.0f / this->refresh_rate * NS_PER_SEC + 0.5); - this->refresh_task_id = TimerManager::get_instance()->add_cyclic_timer( - refresh_interval, - [this]() { - this->update_screen(); - } - ); + this->stop_refresh_task(); + this->start_refresh_task(); this->crtc_on = true;