1 From 75efe27cbb03f2883e53e7a7f68386d93e2c1874 Mon Sep 17 00:00:00 2001
2 From: Emily <hello@emily.moe>
3 Date: Sat, 3 Aug 2024 12:17:19 +0100
4 Subject: [PATCH 2/4] Fix build with C++17
7 musly/main.cpp | 5 ++++-
8 1 file changed, 4 insertions(+), 1 deletion(-)
10 diff --git a/musly/main.cpp b/musly/main.cpp
11 index a9644f2..bb8b7ae 100644
22 @@ -239,7 +240,9 @@ tracks_initialize(
24 // use a random subset of 1000 tracks
25 std::vector<musly_track*> tracks2(tracks);
26 - std::random_shuffle(tracks2.begin(), tracks2.end());
27 + std::random_device seeder;
28 + std::default_random_engine rng(seeder());
29 + std::shuffle(tracks2.begin(), tracks2.end(), rng);
30 ret = musly_jukebox_setmusicstyle(mj, tracks2.data(), 1000);