mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 02:34:42 +00:00
Add config option for logging dropped frames
This commit is contained in:
parent
76b376aef7
commit
baaeaf43b1
3 changed files with 15 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue