Fixed bug where menu song wasn't repeated.

This commit is contained in:
Sander Schobers 2021-08-19 21:37:29 +02:00
parent 65db973699
commit 5935a7fea8

View File

@ -13,6 +13,7 @@ type appContext struct {
Settings *tins2021.Settings
Score *tins2021.ScoreState
Virtual *VirtualControls
Debug bool
StarTexture tins2021.AnimatedTexture
@ -192,7 +193,7 @@ func (app *appContext) switchToMenuMusic(ctx ui.Context) {
if app.MenuMusic != nil {
return
}
app.MenuMusic, _ = app.Audio.PlayMusic("song_menu.mp3", func(m *Music) {})
app.MenuMusic, _ = app.Audio.PlayMusic("song_menu.mp3", func(m *Music) { m.AutoRepeat = true })
gameMusic := app.GameMusic
app.GameMusic = nil
if gameMusic != nil {