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
skipLateFrames: false
# log dropped frames (temp)
logDroppedFrames: false
libretro:
# use zip compression for emulator save states
saveCompression: true

View file

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

View file

@ -343,7 +343,10 @@ func (f *Frontend) Start() {
f.skipVideo = false
} else {
// 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
}