diff --git a/pkg/config/config.yaml b/pkg/config/config.yaml index 1a1d2803..d34c55a8 100644 --- a/pkg/config/config.yaml +++ b/pkg/config/config.yaml @@ -140,6 +140,9 @@ emulator: # checks if the system supports running an emulator at startup failFast: true + # do not send late video frames + skipLateFrames: false + libretro: # use zip compression for emulator save states saveCompression: true diff --git a/pkg/config/emulator.go b/pkg/config/emulator.go index 013225f7..3f4f6190 100644 --- a/pkg/config/emulator.go +++ b/pkg/config/emulator.go @@ -9,12 +9,13 @@ import ( ) type Emulator struct { - FailFast bool - Threads int - Storage string - LocalPath string - Libretro LibretroConfig - AutosaveSec int + FailFast bool + Threads int + Storage string + LocalPath string + Libretro LibretroConfig + AutosaveSec int + SkipLateFrames bool } type LibretroConfig struct { diff --git a/pkg/worker/caged/libretro/frontend.go b/pkg/worker/caged/libretro/frontend.go index ff4b6432..033a2c91 100644 --- a/pkg/worker/caged/libretro/frontend.go +++ b/pkg/worker/caged/libretro/frontend.go @@ -204,7 +204,7 @@ func (f *Frontend) handleAudio(audio unsafe.Pointer, samples int) { } func (f *Frontend) handleVideo(data []byte, delta int32, fi nanoarch.FrameInfo) { - if f.skipVideo { + if f.conf.SkipLateFrames && f.skipVideo { return }