1
0
Fork 0

Fix some adlib detection issues when cycles is too high

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1741
This commit is contained in:
Sjoerd van der Berg 2004-03-28 13:04:45 +00:00
parent 5b60224768
commit 1c2bf685d7
3 changed files with 60 additions and 31 deletions

View file

@ -55,7 +55,8 @@ namespace OPL2 {
YM3812TimerOver(val>>8,val & 0xff);
}
void TimerHandler(int channel,double interval_Sec) {
PIC_AddEvent(TimerOver,1000000*interval_Sec,channel);
if (interval_Sec==0.0) return;
PIC_AddEvent(TimerOver,(Bitu)(1000000.0*interval_Sec),channel);
}
}
#undef OSD_CPU_H
@ -67,7 +68,8 @@ namespace THEOPL3 {
YMF262TimerOver(val>>8,val & 0xff);
}
void TimerHandler(int channel,double interval_Sec) {
PIC_AddEvent(TimerOver,1000000*interval_Sec,channel);
if (interval_Sec==0.0) return;
PIC_AddEvent(TimerOver,(Bitu)(1000000.0*interval_Sec),channel);
}
}