mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-12 11:31:16 +00:00
atimach64gx: use new refresh task control.
This commit is contained in:
parent
632479b1ba
commit
0ca1ebf724
@ -25,7 +25,6 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <core/bitops.h>
|
||||
#include <core/timermanager.h>
|
||||
#include <devices/deviceregistry.h>
|
||||
#include <devices/video/atimach64defs.h>
|
||||
#include <devices/video/atimach64gx.h>
|
||||
@ -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<uint64_t>(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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user