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