Set pit constant after PIT reset.

This commit is contained in:
OBattler
2024-03-23 06:48:53 +01:00
parent 4884f8664c
commit 1d2a7e3bca
2 changed files with 3 additions and 2 deletions

View File

@@ -908,6 +908,7 @@ static void *
pit_init(const device_t *info)
{
pit_t *dev = (pit_t *) malloc(sizeof(pit_t));
pit_reset(dev);
pit_set_pit_const(dev, PITCONST);

View File

@@ -697,10 +697,10 @@ pitf_init(const device_t *info)
{
pitf_t *dev = (pitf_t *) malloc(sizeof(pitf_t));
pitf_set_pit_const(dev, PITCONST);
pitf_reset(dev);
pitf_set_pit_const(dev, PITCONST);
dev->flags = info->local;
if (!(dev->flags & PIT_PS2) && !(dev->flags & PIT_CUSTOM_CLOCK)) {