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
|
# 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
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue