~vcs-imports/xbmc/upstream

« back to all changes in this revision

Viewing changes to xbmc/Application.cpp

  • Committer: monkeyman_67156
  • Date: 2008-06-08 01:42:46 UTC
  • Revision ID: vcs-imports@canonical.com-20080608014246-4yl6chdqe8yg9psx
fixed: various warnings about ambiguous code when compiled with gcc 4.3+,  I tried to make safe judgements about the intention of the conditionals I modified and I beleive they are correct, however the original authors of these files may want to review the changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
3345
3345
    return true;
3346
3346
  }
3347
3347
 
3348
 
  if (action.wID == ACTION_INCREASE_RATING || action.wID == ACTION_DECREASE_RATING && IsPlayingAudio())
 
3348
  if ((action.wID == ACTION_INCREASE_RATING || action.wID == ACTION_DECREASE_RATING) && IsPlayingAudio())
3349
3349
  {
3350
3350
    const CMusicInfoTag *tag = g_infoManager.GetCurrentSongTag();
3351
3351
    if (tag)
4020
4020
void  CApplication::CheckForTitleChange()
4021
4021
4022
4022
  if (g_stSettings.m_HttpApiBroadcastLevel>=1)
 
4023
  {
4023
4024
    if (IsPlayingVideo())
4024
4025
    {
4025
4026
      const CVideoInfoTag* tagVal = g_infoManager.GetCurrentMovieTag();
4037
4038
    {
4038
4039
      const CMusicInfoTag* tagVal=g_infoManager.GetCurrentSongTag();
4039
4040
      if (m_pXbmcHttp && tagVal)
4040
 
          {
4041
 
            CStdString msg="";
4042
 
            if (!tagVal->GetTitle().IsEmpty())
4043
 
        msg=m_pXbmcHttp->GetOpenTag()+"AudioTitle:"+tagVal->GetTitle()+m_pXbmcHttp->GetCloseTag();
4044
 
            if (!tagVal->GetArtist().IsEmpty())
4045
 
        msg+=m_pXbmcHttp->GetOpenTag()+"AudioArtist:"+tagVal->GetArtist()+m_pXbmcHttp->GetCloseTag();
4046
 
            if (m_prevMedia!=msg)
4047
 
            {
4048
 
        getApplicationMessenger().HttpApi("broadcastlevel; MediaChanged:"+msg+";1");
4049
 
              m_prevMedia=msg;
4050
 
            }
 
4041
      {
 
4042
        CStdString msg="";
 
4043
        if (!tagVal->GetTitle().IsEmpty())
 
4044
          msg=m_pXbmcHttp->GetOpenTag()+"AudioTitle:"+tagVal->GetTitle()+m_pXbmcHttp->GetCloseTag();
 
4045
        if (!tagVal->GetArtist().IsEmpty())
 
4046
          msg+=m_pXbmcHttp->GetOpenTag()+"AudioArtist:"+tagVal->GetArtist()+m_pXbmcHttp->GetCloseTag();
 
4047
        if (m_prevMedia!=msg)
 
4048
        {
 
4049
          getApplicationMessenger().HttpApi("broadcastlevel; MediaChanged:"+msg+";1");
 
4050
          m_prevMedia=msg;
 
4051
        }
4051
4052
      }
4052
4053
    }
 
4054
  }
4053
4055
}
4054
4056
 
4055
 
 
4056
4057
bool CApplication::ProcessHTTPApiButtons()
4057
4058
{
4058
4059
#ifdef HAS_WEB_SERVER    
4307
4308
  {
4308
4309
    if (m_pXbmcHttp)
4309
4310
    {
4310
 
          if(g_stSettings.m_HttpApiBroadcastLevel>=1)
4311
 
            getApplicationMessenger().HttpApi("broadcastlevel; ShutDown;1");
4312
 
          m_pXbmcHttp->shuttingDown=true;
4313
 
     //Sleep(100);
 
4311
      if(g_stSettings.m_HttpApiBroadcastLevel>=1)
 
4312
        getApplicationMessenger().HttpApi("broadcastlevel; ShutDown;1");
 
4313
      m_pXbmcHttp->shuttingDown=true;
 
4314
      //Sleep(100);
4314
4315
    }
4315
4316
 
4316
4317
    m_gWindowManager.Delete(WINDOW_MUSIC_PLAYLIST);
5186
5187
    m_bDisplaySleeping = false;
5187
5188
  }
5188
5189
#endif
5189
 
}       
 
5190
5190
5191
 
5191
5192
bool CApplication::ResetScreenSaverWindow()
5192
5193
{
5531
5532
      // We playing some music.
5532
5533
      m_bInactive = false;
5533
5534
    }
5534
 
        else 
 
5535
  else 
5535
5536
    {
5536
5537
      // Nothing doing here, so start the timer going.
5537
5538
      m_bInactive = true;