Browse Source

Open music assets with threadsafe=true

Missed during #3354
pull/3427/head
Gleb Mazovetskiy 4 years ago
parent
commit
b4aa0a2093
  1. 7
      Source/sound.cpp

7
Source/sound.cpp

@ -240,7 +240,12 @@ void music_start(uint8_t nTrack)
else
trackPath = MusicTracks[nTrack];
SDL_RWops *handle = OpenAsset(trackPath);
#ifdef DISABLE_STREAMING_MUSIC
const bool threadsafe = false;
#else
const bool threadsafe = true;
#endif
SDL_RWops *handle = OpenAsset(trackPath, threadsafe);
if (handle != nullptr) {
LoadMusic(handle);
if (!music->open()) {

Loading…
Cancel
Save