Load apps after rendering 1 frame

This is mandatory for Mupen and DOSBox save states. Enabled for all emulators.
This commit is contained in:
Sergey Stepanov 2024-02-23 21:06:55 +03:00
parent 9308e1b388
commit 000bc4f661
No known key found for this signature in database
GPG key ID: A56B4929BAA8556B

View file

@ -261,10 +261,9 @@ func (f *Frontend) Start() {
defer f.mui.Unlock()
if f.HasSave() {
// advance 1 frame for Mupen save state
if f.nano.LibCo {
f.Tick()
}
// advance 1 frame for Mupen, DOSBox save states
// loading will work if autostart is selected for DOSBox apps
f.Tick()
if err := f.RestoreGameState(); err != nil {
f.log.Error().Err(err).Msg("couldn't load a save file")
}