Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /xbmc/utils/LCD.cpp [078e1b] .. [4670a1] Maximize Restore

Repo status: analyzing...

  Switch to unified view

a/xbmc/utils/LCD.cpp b/xbmc/utils/LCD.cpp
...
...
23
#include "GUISettings.h"
23
#include "GUISettings.h"
24
#include "AdvancedSettings.h"
24
#include "AdvancedSettings.h"
25
#include "Settings.h"
25
#include "Settings.h"
26
#include "CharsetConverter.h"
26
#include "CharsetConverter.h"
27
#include "log.h"
27
#include "log.h"
28
#include "XMLUtils.h"
28
29
29
using namespace std;
30
using namespace std;
30
31
31
void ILCD::StringToLCDCharSet(CStdString& strText)
32
void ILCD::StringToLCDCharSet(CStdString& strText)
32
{
33
{
33
34
34
  //0 = HD44780, 1=KS0073
35
  //0 = HD44780, 1=KS0073
35
  unsigned int iLCDContr = g_guiSettings.GetInt("lcd.type") == LCD_TYPE_LCD_KS0073 ? 1 : 0;
36
  unsigned int iLCDContr = 0;
36
  //the timeline is using blocks
37
  //the timeline is using blocks
37
  //a block is used at address 0xA0, smallBlocks at address 0xAC-0xAF
38
  //a block is used at address 0xA0, smallBlocks at address 0xAC-0xAF
38
39
39
  unsigned char LCD[2][256] = {
40
  unsigned char LCD[2][256] = {
40
                                { //HD44780 charset ROM code A00
41
                                { //HD44780 charset ROM code A00
...
...
421
  {
422
  {
422
    TiXmlBase::SetCondenseWhiteSpace(condensed);
423
    TiXmlBase::SetCondenseWhiteSpace(condensed);
423
    return;
424
    return;
424
  }
425
  }
425
426
427
  // load our settings
428
  CStdString disableOnPlay;
429
  XMLUtils::GetString(element, "disableonplay", disableOnPlay);
430
  if (disableOnPlay.Find("video") != CStdString::npos)
431
    m_disableOnPlay |= DISABLE_ON_PLAY_VIDEO;
432
  if (disableOnPlay.Find("music") != CStdString::npos)
433
    m_disableOnPlay |= DISABLE_ON_PLAY_MUSIC;
434
426
  TiXmlElement *mode = element->FirstChildElement();
435
  TiXmlElement *mode = element->FirstChildElement();
427
  while (mode)
436
  while (mode)
428
  {
437
  {
429
    if (strcmpi(mode->Value(), "music") == 0)
438
    if (strcmpi(mode->Value(), "music") == 0)
430
    { // music mode
439
    { // music mode
...
...
467
  }
476
  }
468
}
477
}
469
478
470
void ILCD::Reset()
479
void ILCD::Reset()
471
{
480
{
481
  m_disableOnPlay = DISABLE_ON_PLAY_NONE;
472
  for (unsigned int i = 0; i < LCD_MODE_MAX; i++)
482
  for (unsigned int i = 0; i < LCD_MODE_MAX; i++)
473
    m_lcdMode[i].clear();
483
    m_lcdMode[i].clear();
474
}
484
}
475
485
476
void ILCD::Render(LCD_MODE mode)
486
void ILCD::Render(LCD_MODE mode)
...
...
489
  }
499
  }
490
  // fill remainder with empty space
500
  // fill remainder with empty space
491
  while (outLine < 4)
501
  while (outLine < 4)
492
    SetLine(outLine++, "");
502
    SetLine(outLine++, "");
493
}
503
}
504
505
void ILCD::DisableOnPlayback(bool playingVideo, bool playingAudio)
506
{
507
  if ((playingVideo && (m_disableOnPlay & DISABLE_ON_PLAY_VIDEO)) ||
508
      (playingAudio && (m_disableOnPlay & DISABLE_ON_PLAY_MUSIC)))
509
    SetBackLight(0);
510
}