MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / disableMusic

Function disableMusic

src/OpenLoco/src/Jukebox.cpp:279–295  ·  view source on GitHub ↗

When the player disables "Play Music" from the top toolbar, or clicks the stop button in the music options.

Source from the content-addressed store, hash-verified

277
278 // When the player disables "Play Music" from the top toolbar, or clicks the stop button in the music options.
279 bool disableMusic()
280 {
281 auto& cfg = Config::get().audio;
282
283 if (cfg.playJukeboxMusic == 0)
284 {
285 return false;
286 }
287
288 cfg.playJukeboxMusic = 0;
289 Config::write();
290
291 Audio::stopMusic();
292 currentTrack = kNoSong;
293
294 return true;
295 }
296
297 bool enableMusic()
298 {

Callers 2

audioMenuDropdownFunction · 0.85
stopMusicFunction · 0.85

Calls 3

writeFunction · 0.85
getFunction · 0.70
stopMusicFunction · 0.50

Tested by

no test coverage detected