add check for infinite framerate, which I saw on gambatte/windows

This commit is contained in:
Vivian Lim 2019-12-23 21:24:45 -08:00
parent 3a37efea02
commit 6ae54e8ea2
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ impl MyEmulator {
// similar hack to the sample rate, make sure we don't divide by zero.
let mut spf = 1.0 / self.av_info.timing.fps;
if spf.is_nan() {
if spf.is_nan() || spf.is_infinite() {
spf = 1.0 / 60.0;
}
Duration::from_secs_f64(spf)