mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-22 09:37:09 +00:00
Advance 1 frame only with Mupen
This commit is contained in:
parent
c8eb672ecd
commit
ee58af488d
1 changed files with 6 additions and 4 deletions
|
|
@ -141,10 +141,12 @@ func (f *Frontend) Start() {
|
|||
// start time for the first frame
|
||||
lastFrameTime = time.Now().UnixNano()
|
||||
|
||||
// 1 frame in order for Mupen save state load to work
|
||||
f.mu.Lock()
|
||||
run()
|
||||
f.mu.Unlock()
|
||||
// advance 1 frame for Mupen save state
|
||||
if usesLibCo {
|
||||
f.mu.Lock()
|
||||
run()
|
||||
f.mu.Unlock()
|
||||
}
|
||||
|
||||
if err := f.LoadGameState(); err != nil {
|
||||
f.log.Error().Err(err).Msg("couldn't load a save file")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue