Add config option for skipping late video frames

This commit is contained in:
sergystepanov 2025-11-22 11:59:08 +03:00
parent 3df6a24a0a
commit 76b376aef7
3 changed files with 11 additions and 7 deletions

View file

@ -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

View file

@ -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 {

View file

@ -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
}