fix build when using --without-audio
This was SVN commit r13389.
This commit is contained in:
parent
683f22cdb1
commit
bf959e1c46
@ -72,14 +72,18 @@ InReaction GlobalsInputHandler(const SDL_Event_* ev)
|
||||
if(ev->ev.active.state & SDL_APPACTIVE)
|
||||
{
|
||||
g_app_minimized = (ev->ev.active.gain == 0); // negated
|
||||
#if CONFIG2_AUDIO
|
||||
if ( g_SoundManager )
|
||||
g_SoundManager->Pause( g_app_minimized && g_PauseOnFocusLoss && !g_NetClient );
|
||||
#endif
|
||||
}
|
||||
if(ev->ev.active.state & SDL_APPINPUTFOCUS)
|
||||
{
|
||||
g_app_has_focus = (ev->ev.active.gain != 0);
|
||||
#if CONFIG2_AUDIO
|
||||
if ( g_SoundManager )
|
||||
g_SoundManager->Pause( !g_app_has_focus && g_PauseOnFocusLoss && !g_NetClient );
|
||||
#endif
|
||||
}
|
||||
if(ev->ev.active.state & SDL_APPMOUSEFOCUS)
|
||||
g_mouse_active = (ev->ev.active.gain != 0);
|
||||
|
@ -341,8 +341,10 @@ JSBool SetPaused(JSContext* cx, uintN argc, jsval* vp)
|
||||
try
|
||||
{
|
||||
g_Game->m_Paused = ToPrimitive<bool> (JS_ARGV(cx, vp)[0]);
|
||||
#if CONFIG2_AUDIO
|
||||
if ( g_SoundManager )
|
||||
g_SoundManager->Pause(g_Game->m_Paused);
|
||||
#endif
|
||||
}
|
||||
catch (PSERROR_Scripting_ConversionFailed)
|
||||
{
|
||||
|
@ -33,7 +33,9 @@
|
||||
|
||||
JMusicList::JMusicList()
|
||||
{
|
||||
#if CONFIG2_AUDIO
|
||||
g_SoundManager->ClearPlayListItems();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool JMusicList::AddItem(JSContext* cx, uintN UNUSED(argc), jsval* vp)
|
||||
@ -42,7 +44,10 @@ bool JMusicList::AddItem(JSContext* cx, uintN UNUSED(argc), jsval* vp)
|
||||
if (! ToPrimitive<CStrW>(cx, vp[0], filename))
|
||||
return false;
|
||||
|
||||
#if CONFIG2_AUDIO
|
||||
g_SoundManager->AddPlayListItem( new VfsPath( filename ) );
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user