Add config option for logging dropped frames

This commit is contained in:
sergystepanov 2025-11-22 12:32:56 +03:00
parent 76b376aef7
commit baaeaf43b1
3 changed files with 15 additions and 8 deletions

View file

@ -143,6 +143,9 @@ emulator:
# do not send late video frames # do not send late video frames
skipLateFrames: false skipLateFrames: false
# log dropped frames (temp)
logDroppedFrames: false
libretro: libretro:
# use zip compression for emulator save states # use zip compression for emulator save states
saveCompression: true saveCompression: true

View file

@ -9,13 +9,14 @@ import (
) )
type Emulator struct { type Emulator struct {
FailFast bool FailFast bool
Threads int Threads int
Storage string Storage string
LocalPath string LocalPath string
Libretro LibretroConfig Libretro LibretroConfig
AutosaveSec int AutosaveSec int
SkipLateFrames bool SkipLateFrames bool
LogDroppedFrames bool
} }
type LibretroConfig struct { type LibretroConfig struct {

View file

@ -343,7 +343,10 @@ func (f *Frontend) Start() {
f.skipVideo = false f.skipVideo = false
} else { } else {
// lagging behind the target framerate so we don't sleep // lagging behind the target framerate so we don't sleep
f.log.Debug().Msgf("[] Frame drop: %v", elapsed) if f.conf.LogDroppedFrames {
// !to make some stats counter instead
f.log.Debug().Msgf("[] Frame drop: %v", elapsed)
}
f.skipVideo = true f.skipVideo = true
} }