mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-03-12 09:29:47 +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/bitops.h>
|
||||||
#include <core/timermanager.h>
|
|
||||||
#include <devices/deviceregistry.h>
|
#include <devices/deviceregistry.h>
|
||||||
#include <devices/video/atimach64defs.h>
|
#include <devices/video/atimach64defs.h>
|
||||||
#include <devices/video/atimach64gx.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);
|
ABORT_F("%s: unsupported pixel depth %d", this->name.c_str(), this->pixel_depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->refresh_task_id) {
|
this->stop_refresh_task();
|
||||||
TimerManager::get_instance()->cancel_timer(this->refresh_task_id);
|
this->start_refresh_task();
|
||||||
}
|
|
||||||
|
|
||||||
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->crtc_on = true;
|
this->crtc_on = true;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user