Handle selections that we have no matches for, so we don't assert
out in ScreenJukebox
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include "GameState.h"
|
||||
#include "RageSoundManager.h"
|
||||
#include "ThemeManager.h"
|
||||
#include "ScreenJukebox.h"
|
||||
|
||||
|
||||
//
|
||||
@@ -52,6 +53,8 @@ ScreenJukeboxMenu::ScreenJukeboxMenu()
|
||||
m_textExplanation.SetZoom( 0.7f );
|
||||
this->AddChild( &m_textExplanation );
|
||||
|
||||
m_soundInvalid.Load( THEME->GetPathTo("Sounds","Common invalid") );
|
||||
|
||||
SOUNDMAN->PlayMusic( THEME->GetPathTo("Sounds","ScreenJukeboxMenu music") );
|
||||
}
|
||||
|
||||
@@ -124,6 +127,15 @@ void ScreenJukeboxMenu::MenuStart( PlayerNumber pn )
|
||||
GAMESTATE->m_PreferredDifficulty[p] = dc;
|
||||
GAMESTATE->m_bJukeboxUsesModifiers = bModifiers;
|
||||
|
||||
if(!ScreenJukebox::SetSong())
|
||||
{
|
||||
/* No songs are available for the selected style, group, and difficulty. */
|
||||
|
||||
m_soundInvalid.Play();
|
||||
SCREENMAN->SystemMessage( "No songs available with these settings" );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SOUNDMAN->StopMusic();
|
||||
SOUNDMAN->PlayOnce( THEME->GetPathTo("Sounds","Common start") );
|
||||
|
||||
Reference in New Issue
Block a user