From d45044239e72c015a31f8972c8c4c9ca730c44ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=B6eh=20Matt?= Date: Mon, 24 Jul 2017 17:08:10 +0200 Subject: [PATCH] Fix #5977: Custom music files not showing up in music list --- distribution/changelog.txt | 1 + src/openrct2/audio/audio.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index cebf2712b1..3637af94d4 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -12,6 +12,7 @@ - Fix: [#5880] Leaving bumper cars without building causes assertion. - Fix: [#5920] Placing guest spawn doesn't do anything every 3rd click - Fix: [#5939] Crash when importing 'Six Flags Santa Fe'. +- Fix: [#5977] Custom music files not showing up in music list - Improved: [#4301] Leading and trailing whitespace in player name is now removed. - Improved: [#5859] OpenGL rendering performance - Improved: [#5863] Switching drawing engines no longer requires the application to restart. diff --git a/src/openrct2/audio/audio.cpp b/src/openrct2/audio/audio.cpp index a763a64f27..041b10d35f 100644 --- a/src/openrct2/audio/audio.cpp +++ b/src/openrct2/audio/audio.cpp @@ -370,6 +370,13 @@ void audio_init_ride_sounds_and_info() { rideMusicInfo->length = 0; } + // FIX: Custom ones have no length set and while populating the combo box + // they are ignored if 0. + if ((m == 36 || m == 37) && rideMusicInfo->length == 0) + { + // Try to get it. + rideMusicInfo->length = fs.GetLength(); + } } catch (const Exception &) {