Project

General

Profile

Bug #348 » xblastlcd.patch

psyko_chewbacca, 10/03/2015 11:47 PM

View differences:

language/English (US)/strings.po (working copy)
8272 8272
msgctxt "#34005"
8273 8273
msgid "Flac"
8274 8274
msgstr "Flac"
8275

  
8276
msgctxt "#34010"
8277
msgid "Power off on exit"
8278
msgstr "Power off on exit"
language/English/strings.po (working copy)
8688 8688
msgctxt "#34005"
8689 8689
msgid "Flac"
8690 8690
msgstr ""
8691

  
8692
msgctxt "#34010"
8693
msgid "Power off on exit"
8694
msgstr ""
language/French/strings.po (working copy)
8280 8280
msgctxt "#34005"
8281 8281
msgid "Flac"
8282 8282
msgstr "Flac"
8283

  
8284
msgctxt "#34010"
8285
msgid "Éteindre à la sortie"
8286
msgstr "Éteindre à la sortie"
xbmc.vcproj (working copy)
2740 2740
					RelativePath=".\xbmc\lib\x3lcd\x3lcd.h">
2741 2741
				</File>
2742 2742
				<File
2743
					RelativePath=".\xbmc\lib\XBlast\xblastLCD.cpp">
2744
				</File>
2745
				<File
2746
					RelativePath=".\xbmc\lib\XBlast\xblastLCD.h">
2747
				</File>
2748
				<File
2743 2749
					RelativePath=".\xbmc\lib\libXenium\Xenium.cpp">
2744 2750
				</File>
2745 2751
				<File
xbmc/Application.cpp (working copy)
3611 3611
    g_pythonParser.FreeResources();
3612 3612

  
3613 3613
#ifdef HAS_LCD
3614
    if (g_lcd && bLCDStop)
3614
    if (g_lcd)
3615 3615
    {
3616
      g_lcd->Stop();
3616
	  CLog::Log(LOGNOTICE, "Stop LCD addon.");
3617
      g_lcd->Stop(g_guiSettings.GetBool("lcd.poweroffonexit"));
3617 3618
      delete g_lcd;
3618 3619
      g_lcd=NULL;
3619 3620
    }
xbmc/lib/libXenium/XeniumLCD.cpp (working copy)
62 62
}
63 63

  
64 64
//*************************************************************************************************************
65
void CXeniumLCD::Stop()
65
void CXeniumLCD::Stop(bool TurnOffLCD)
66 66
{
67 67
  if (g_guiSettings.GetInt("lcd.type") == LCD_TYPE_NONE) return;
68
  if(TurnOffLCD)
69
  {
70
	  DisplaySetBacklight(0);
71
	  m_xenium.HideDisplay();
72
  }
68 73
  StopThread();
69 74
}
70 75

  
......
255 260
      }
256 261
    }
257 262
  }
263
  /*
264
  //This code clears the screen when stopping thread.
258 265
  for (int i=0; i < (int)m_iRows; i++)
259 266
  {
260 267
	  DisplayClearChars(0,i,m_iColumns);
261 268
  } 
262 269
  m_xenium.HideDisplay();
270
  */
263 271
}
xbmc/lib/libXenium/XeniumLCD.h (working copy)
11 11
  CXeniumLCD();
12 12
  virtual ~CXeniumLCD(void);
13 13
  virtual void Initialize();
14
  virtual void Stop();
14
  virtual void Stop(bool TurnOffLCD);
15 15
  virtual void SetBackLight(int iLight);
16 16
  virtual void SetContrast(int iContrast);
17 17
protected:
xbmc/lib/smartXX/smartxxlcd.cpp (working copy)
120 120
}
121 121

  
122 122
//*************************************************************************************************************
123
void CSmartXXLCD::Stop()
123
void CSmartXXLCD::Stop(bool TurnOffLCD)
124 124
{
125 125
  if (g_guiSettings.GetInt("lcd.type") == LCD_TYPE_NONE) return;
126
  if(TurnOffLCD)
127
  {
128
	  DisplaySetBacklight(0);
129
	  DisplayOut(DISP_CLEAR,CMD);
130
  }
126 131
  StopThread();
127 132
}
128 133

  
......
601 606
      }
602 607
    }
603 608
  }
609
  /*
610
  //This code clears the screen when stopping thread.
604 611
  for (int i=0; i < (int)m_iRows; i++)
605 612
  {
606 613
    DisplayClearChars(0,i,m_iColumns);
607 614
  }
608 615
  DisplayOut(DISP_CONTROL ,CMD);                      // Display off
616
  */
609 617
}
xbmc/lib/smartXX/smartxxLCD.h (working copy)
10 10
  CSmartXXLCD();
11 11
  virtual ~CSmartXXLCD(void);
12 12
  virtual void Initialize();
13
  virtual void Stop();
13
  virtual void Stop(bool TurnOffLCD);
14 14
  virtual void SetBackLight(int iLight);
15 15
  virtual void SetContrast(int iContrast);
16 16

  
......
18 18
	virtual void		Process();
19 19
  virtual void SetLine(int iLine, const CStdString& strLine);
20 20
  void    DisplayInit();
21
  void    DisplaySetBacklight(unsigned char level) ;
22
  void    DisplaySetContrast(unsigned char level) ;
21
  virtual void    DisplaySetBacklight(unsigned char level) ;
22
  virtual void    DisplaySetContrast(unsigned char level) ;
23 23
  void    DisplayProgressBar(unsigned char percent, unsigned char charcnt);
24 24
  void    DisplayClearChars(unsigned char startpos , unsigned char line, unsigned char lenght) ;
25 25
  void    DisplayWriteString(char *pointer) ;
xbmc/lib/x3lcd/x3lcd.cpp (working copy)
59 59
}
60 60
void CX3LCD::SetContrast(int iContrast) { }
61 61
//*************************************************************************************************************
62
void CX3LCD::Stop()
62
void CX3LCD::Stop(bool TurnOffLCD)
63 63
{
64 64
	if (g_guiSettings.GetInt("lcd.type") == LCD_TYPE_NONE) 
65 65
		return;
66
	if(TurnOffLCD)
67
	{
68
		DisplaySetBacklight(0);
69
		DisplayOut(DISP_CLEAR,CMD);
70
	}
66 71
	StopThread();
67 72
}
68 73

  
......
434 439
			}
435 440
		}
436 441
	}
442
	/*
443
    //This code clears the screen when stopping thread.
437 444
	for (int i = 0; i < (int)m_iRows; i++)
438 445
	{
439 446
		DisplayClearChars(0, i, m_iColumns);
440 447
	} 
441 448
	DisplayOut(DISP_CONTROL, CMD);		                  // Display off
449
	*/
442 450
}
xbmc/lib/x3lcd/x3lcd.h (working copy)
61 61
	CX3LCD();
62 62
	virtual ~CX3LCD(void);
63 63
	virtual void Initialize();
64
	virtual void Stop();
64
	virtual void Stop(bool TurnOffLCD);
65 65
	virtual void SetBackLight(int iLight);
66 66
	virtual void SetContrast(int iContrast);
67 67
protected:
xbmc/settings/GUISettings.cpp (working copy)
342 342

  
343 343
  AddCategory(4, "lcd", 448);
344 344
  AddInt(2, "lcd.type", 4501, LCD_TYPE_NONE, LCD_TYPE_NONE, 1, LCD_TYPE_VFD, SPIN_CONTROL_TEXT);
345
  AddInt(3, "lcd.modchip", 471, MODCHIP_SMARTXX, MODCHIP_SMARTXX, 1, MODCHIP_XECUTER3, SPIN_CONTROL_TEXT);
345
  AddInt(3, "lcd.modchip", 471, MODCHIP_SMARTXX, MODCHIP_SMARTXX, 1, MODCHIP_XBLAST, SPIN_CONTROL_TEXT);
346 346
  AddInt(4, "lcd.backlight", 463, 80, 0, 5, 100, SPIN_CONTROL_INT_PLUS, MASK_PERCENT);
347 347
  AddInt(5, "lcd.contrast", 465, 100, 0, 5, 100, SPIN_CONTROL_INT_PLUS, MASK_PERCENT);
348 348
  AddSeparator(6, "lcd.sep1");
349
  AddInt(7, "lcd.disableonplayback", 20310, LED_PLAYBACK_OFF, LED_PLAYBACK_OFF, 1, LED_PLAYBACK_VIDEO_MUSIC, SPIN_CONTROL_TEXT);
350
  AddBool(8, "lcd.enableonpaused", 20312, true);
349
  AddBool(7, "lcd.poweroffonexit", 34010, false);
350
  AddInt(8, "lcd.disableonplayback", 20310, LED_PLAYBACK_OFF, LED_PLAYBACK_OFF, 1, LED_PLAYBACK_VIDEO_MUSIC, SPIN_CONTROL_TEXT);
351
  AddBool(9, "lcd.enableonpaused", 20312, true);
351 352

  
352 353
  AddCategory(4, "debug", 14092);
353 354
  AddBool(1, "debug.showloginfo", 20191, false);
xbmc/settings/GUISettings.h (working copy)
62 62
#define MODCHIP_SMARTXX   0
63 63
#define MODCHIP_XENIUM    1
64 64
#define MODCHIP_XECUTER3  2
65
#define MODCHIP_XBLAST    3
65 66

  
66 67
// LED settings
67 68
#define LED_COLOUR_NO_CHANGE 0
xbmc/settings/GUIWindowSettingsCategory.cpp (working copy)
528 528
      pControl->AddLabel("SmartXX", MODCHIP_SMARTXX);
529 529
      pControl->AddLabel("Xenium", MODCHIP_XENIUM);
530 530
      pControl->AddLabel("Xecuter3", MODCHIP_XECUTER3);
531
	  pControl->AddLabel("XBlast", MODCHIP_XBLAST);
531 532
      pControl->SetValue(pSettingInt->GetData());
532 533
    }
533 534
    else if (strSetting.Equals("harddisk.aamlevel"))
......
1167 1168
      CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID());
1168 1169
      if (pControl) pControl->SetEnabled(g_guiSettings.GetInt("system.leddisableonplayback") != LED_PLAYBACK_OFF && g_guiSettings.GetInt("system.ledcolour") != LED_COLOUR_OFF && g_guiSettings.GetInt("system.ledcolour") != LED_COLOUR_NO_CHANGE);
1169 1170
    }
1170
    else if (strSetting.Equals("lcd.modchip") || strSetting.Equals("lcd.backlight") || strSetting.Equals("lcd.disableonplayback"))
1171
    else if (strSetting.Equals("lcd.modchip") || strSetting.Equals("lcd.backlight") || strSetting.Equals("lcd.disableonplayback") || strSetting.Equals("lcd.poweroffonexit"))
1171 1172
    {
1172 1173
      CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID());
1173 1174
      if (pControl) pControl->SetEnabled(g_guiSettings.GetInt("lcd.type") != LCD_TYPE_NONE);
......
1477 1478
  }
1478 1479
  else if (strSetting.Equals("lcd.modchip"))
1479 1480
  {
1480
    g_lcd->Stop();
1481
    g_lcd->Stop(true);
1481 1482
    CLCDFactory factory;
1482 1483
    delete g_lcd;
1483 1484
    g_lcd = factory.Create();
......
1487 1488
  {
1488 1489
    g_lcd->SetContrast(((CSettingInt *)pSettingControl->GetSetting())->GetData());
1489 1490
  }
1491
  /*
1492
  //Not useful right now. Will be later if parameter can be set in advancedsettings xml file.
1493
  else if (strSetting.Equals("lcd.poweroffonexit"))
1494
  {
1495
	  g_advancedSettings.m_PowerOffOnExit = ((CSettingBool *)pSettingControl->GetSetting())->GetData();
1496
  }
1497
  */
1490 1498
#endif
1491 1499
#ifdef HAS_XBOX_HARDWARE
1492 1500
  else if (strSetting.Equals("system.targettemperature"))
xbmc/Util.cpp (working copy)
1011 1011
      }
1012 1012
      ourmemaddr=(PVOID *)(((unsigned int) ourmemaddr) + sizeof(igk_main_toy));
1013 1013

  
1014
      if (g_guiSettings.GetInt("lcd.mode") > 0 && g_guiSettings.GetInt("lcd.type") == MODCHIP_SMARTXX)
1014
      if (g_guiSettings.GetInt("lcd.mode") > 0 && (g_guiSettings.GetInt("lcd.type") == MODCHIP_SMARTXX || g_guiSettings.GetInt("lcd.type") == MODCHIP_XBLAST))
1015 1015
      {
1016 1016
        memcpy(ourmemaddr, lcd_toy_xx, sizeof(lcd_toy_xx));
1017 1017
        _asm
xbmc/utils/LCD.h (working copy)
48 48
                        CUSTOM_CHARSET_MAX
49 49
                };
50 50
  virtual void Initialize();
51
  virtual void Stop() = 0;
51
  virtual void Stop(bool TurnOffLCD) = 0;
52 52
  virtual void SetBackLight(int iLight) = 0;
53 53
  virtual void SetContrast(int iContrast) = 0;
54 54
  virtual void SetLine(int iLine, const CStdString& strLine) = 0;
xbmc/utils/LCDFactory.cpp (working copy)
3 3
#include "lib/smartxx/smartxxLCD.h"
4 4
#include "lib/libXenium/XeniumLCD.h"
5 5
#include "lib/x3lcd/x3lcd.h"
6
#include "lib/xblast/xblastLCD.h"
6 7
#include "settings/GUISettings.h"
7 8

  
8 9
ILCD* g_lcd = NULL;
......
28 29
    return new CX3LCD();
29 30
    break;
30 31

  
32
  case MODCHIP_XBLAST:
33
    return new CXBlastLCD();
34
    break;
35

  
31 36
  }
32 37
  return new CSmartXXLCD();
33 38
}
    (1-1/1)