Fix nasty race condition with menu background audio. Fixes #12365

This commit is contained in:
Henrik Rydgård committed 2019-09-27 23:53:31 +02:00
1 parent 701d740207
commit 22ee875ffc
4 files changed
+41 -27

No files matched your search

+6
View File
@@ -959,6 +959,12 @@ void RenderOverlays(UIContext *dc, void *userdata) {
void NativeRender(GraphicsContext *graphicsContext) {
g_GameManager.Update();
if (GetUIState() != UISTATE_INGAME) {
// Note: We do this from NativeRender so that the graphics context is
// guaranteed valid, to be safe - g_gameInfoCache messes around with textures.
UpdateBackgroundAudio();
}
float xres = dp_xres;
float yres = dp_yres;