mirror of
https://github.com/holub/mame
synced 2025-05-22 21:58:57 +03:00
Fix 02766: topgunnr: Hangs
Corrected cpu_attomtime_to_clocks() calculation.
This commit is contained in:
parent
185ba3c941
commit
6497510da6
@ -912,7 +912,7 @@ attotime cpu_clocks_to_attotime(const device_config *device, UINT64 clocks)
|
|||||||
UINT64 cpu_attotime_to_clocks(const device_config *device, attotime duration)
|
UINT64 cpu_attotime_to_clocks(const device_config *device, attotime duration)
|
||||||
{
|
{
|
||||||
cpu_class_data *classdata = get_class_data(device);
|
cpu_class_data *classdata = get_class_data(device);
|
||||||
return mulu_32x32(duration.seconds, classdata->cycles_per_second) + (UINT64)duration.attoseconds * (UINT64)classdata->attoseconds_per_cycle;
|
return mulu_32x32(duration.seconds, classdata->cycles_per_second) + (UINT64)duration.attoseconds / (UINT64)classdata->attoseconds_per_cycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user