mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
More fixes.
This commit is contained in:
@@ -119,8 +119,6 @@ timer_process(void)
|
||||
if (!timer_head)
|
||||
return;
|
||||
|
||||
uint64_t old_target = timer_target;
|
||||
|
||||
while (1) {
|
||||
pc_timer_t *timer = timer_head;
|
||||
|
||||
|
||||
@@ -338,11 +338,11 @@ voodoo_readl(uint32_t addr, void *priv)
|
||||
break;
|
||||
case SST_hvRetrace:
|
||||
{
|
||||
uint32_t line_time = (uint32_t) (voodoo->line_time >> 32);
|
||||
uint32_t diff = (timer_get_ts_int(&voodoo->timer) > (tsc & 0xffffffff)) ? (timer_get_ts_int(&voodoo->timer) - (tsc & 0xffffffff)) : 0;
|
||||
uint32_t pre_div = diff * voodoo->h_total;
|
||||
uint32_t post_div = pre_div / line_time;
|
||||
uint32_t h_pos = (voodoo->h_total - 1) - post_div;
|
||||
uint64_t line_time = (uint64_t) (voodoo->line_time >> 32);
|
||||
uint64_t diff = (timer_get_ts_int(&voodoo->timer) > tsc) ? (timer_get_ts_int(&voodoo->timer) - tsc) : 0;
|
||||
uint64_t pre_div = diff * voodoo->h_total;
|
||||
uint64_t post_div = pre_div / line_time;
|
||||
uint64_t h_pos = (voodoo->h_total - 1) - post_div;
|
||||
|
||||
if (h_pos >= voodoo->h_total)
|
||||
h_pos = 0;
|
||||
|
||||
Reference in New Issue
Block a user