mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 01:48:21 -07:00
pit_fast: fix off by one error with mode 2 counter
This commit is contained in:
@@ -145,6 +145,8 @@ pitf_dump_and_disable_timer(ctrf_t *ctr)
|
||||
{
|
||||
if (ctr->using_timer && timer_is_enabled(&ctr->timer)) {
|
||||
ctr->count = pitf_read_timer(ctr);
|
||||
if (ctr->m == 2)
|
||||
ctr->count--; /* Don't store the offset from pitf_read_timer */
|
||||
timer_disable(&ctr->timer);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user