MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetCurrentSong

Method GetCurrentSong

src/music_gui.cpp:309–313  ·  view source on GitHub ↗

Return the current song, or a dummy if none */

Source from the content-addressed store, hash-verified

307
308/** Return the current song, or a dummy if none */
309MusicSystem::PlaylistEntry MusicSystem::GetCurrentSong() const
310{
311 if (!this->IsPlaying()) return PlaylistEntry(BaseMusic::GetUsedSet(), 0);
312 return this->active_playlist[this->playlist_position];
313}
314
315/** Is one of the custom playlists selected? */
316bool MusicSystem::IsCustomPlaylist() const

Callers 1

DrawWidgetMethod · 0.80

Calls 2

IsPlayingMethod · 0.95
PlaylistEntryClass · 0.85

Tested by

no test coverage detected