Project

General

Profile

Bug #348 » xblastlcd.patch

psyko_chewbacca, 03/10/2015 11:47 PM

View differences:

language/English (US)/strings.po (working copy)
msgctxt "#34005"
msgid "Flac"
msgstr "Flac"
msgctxt "#34010"
msgid "Power off on exit"
msgstr "Power off on exit"
language/English/strings.po (working copy)
msgctxt "#34005"
msgid "Flac"
msgstr ""
msgctxt "#34010"
msgid "Power off on exit"
msgstr ""
language/French/strings.po (working copy)
msgctxt "#34005"
msgid "Flac"
msgstr "Flac"
msgctxt "#34010"
msgid "Éteindre à la sortie"
msgstr "Éteindre à la sortie"
xbmc.vcproj (working copy)
RelativePath=".\xbmc\lib\x3lcd\x3lcd.h">
</File>
<File
RelativePath=".\xbmc\lib\XBlast\xblastLCD.cpp">
</File>
<File
RelativePath=".\xbmc\lib\XBlast\xblastLCD.h">
</File>
<File
RelativePath=".\xbmc\lib\libXenium\Xenium.cpp">
</File>
<File
xbmc/Application.cpp (working copy)
g_pythonParser.FreeResources();
#ifdef HAS_LCD
if (g_lcd && bLCDStop)
if (g_lcd)
{
g_lcd->Stop();
CLog::Log(LOGNOTICE, "Stop LCD addon.");
g_lcd->Stop(g_guiSettings.GetBool("lcd.poweroffonexit"));
delete g_lcd;
g_lcd=NULL;
}
xbmc/lib/libXenium/XeniumLCD.cpp (working copy)
}
//*************************************************************************************************************
void CXeniumLCD::Stop()
void CXeniumLCD::Stop(bool TurnOffLCD)
{
if (g_guiSettings.GetInt("lcd.type") == LCD_TYPE_NONE) return;
if(TurnOffLCD)
{
DisplaySetBacklight(0);
m_xenium.HideDisplay();
}
StopThread();
}
......
}
}
}
/*
//This code clears the screen when stopping thread.
for (int i=0; i < (int)m_iRows; i++)
{
DisplayClearChars(0,i,m_iColumns);
}
m_xenium.HideDisplay();
*/
}
xbmc/lib/libXenium/XeniumLCD.h (working copy)
CXeniumLCD();
virtual ~CXeniumLCD(void);
virtual void Initialize();
virtual void Stop();
virtual void Stop(bool TurnOffLCD);
virtual void SetBackLight(int iLight);
virtual void SetContrast(int iContrast);
protected:
xbmc/lib/smartXX/smartxxlcd.cpp (working copy)
}
//*************************************************************************************************************
void CSmartXXLCD::Stop()
void CSmartXXLCD::Stop(bool TurnOffLCD)
{
if (g_guiSettings.GetInt("lcd.type") == LCD_TYPE_NONE) return;
if(TurnOffLCD)
{
DisplaySetBacklight(0);
DisplayOut(DISP_CLEAR,CMD);
}
StopThread();
}
......
}
}
}
/*
//This code clears the screen when stopping thread.
for (int i=0; i < (int)m_iRows; i++)
{
DisplayClearChars(0,i,m_iColumns);
}
DisplayOut(DISP_CONTROL ,CMD); // Display off
*/
}
xbmc/lib/smartXX/smartxxLCD.h (working copy)
CSmartXXLCD();
virtual ~CSmartXXLCD(void);
virtual void Initialize();
virtual void Stop();
virtual void Stop(bool TurnOffLCD);
virtual void SetBackLight(int iLight);
virtual void SetContrast(int iContrast);
......
virtual void Process();
virtual void SetLine(int iLine, const CStdString& strLine);
void DisplayInit();
void DisplaySetBacklight(unsigned char level) ;
void DisplaySetContrast(unsigned char level) ;
virtual void DisplaySetBacklight(unsigned char level) ;
virtual void DisplaySetContrast(unsigned char level) ;
void DisplayProgressBar(unsigned char percent, unsigned char charcnt);
void DisplayClearChars(unsigned char startpos , unsigned char line, unsigned char lenght) ;
void DisplayWriteString(char *pointer) ;
xbmc/lib/x3lcd/x3lcd.cpp (working copy)
}
void CX3LCD::SetContrast(int iContrast) { }
//*************************************************************************************************************
void CX3LCD::Stop()
void CX3LCD::Stop(bool TurnOffLCD)
{
if (g_guiSettings.GetInt("lcd.type") == LCD_TYPE_NONE)
return;
if(TurnOffLCD)
{
DisplaySetBacklight(0);
DisplayOut(DISP_CLEAR,CMD);
}
StopThread();
}
......
}
}
}
/*
//This code clears the screen when stopping thread.
for (int i = 0; i < (int)m_iRows; i++)
{
DisplayClearChars(0, i, m_iColumns);
}
DisplayOut(DISP_CONTROL, CMD); // Display off
*/
}
xbmc/lib/x3lcd/x3lcd.h (working copy)
CX3LCD();
virtual ~CX3LCD(void);
virtual void Initialize();
virtual void Stop();
virtual void Stop(bool TurnOffLCD);
virtual void SetBackLight(int iLight);
virtual void SetContrast(int iContrast);
protected:
xbmc/settings/GUISettings.cpp (working copy)
AddCategory(4, "lcd", 448);
AddInt(2, "lcd.type", 4501, LCD_TYPE_NONE, LCD_TYPE_NONE, 1, LCD_TYPE_VFD, SPIN_CONTROL_TEXT);
AddInt(3, "lcd.modchip", 471, MODCHIP_SMARTXX, MODCHIP_SMARTXX, 1, MODCHIP_XECUTER3, SPIN_CONTROL_TEXT);
AddInt(3, "lcd.modchip", 471, MODCHIP_SMARTXX, MODCHIP_SMARTXX, 1, MODCHIP_XBLAST, SPIN_CONTROL_TEXT);
AddInt(4, "lcd.backlight", 463, 80, 0, 5, 100, SPIN_CONTROL_INT_PLUS, MASK_PERCENT);
AddInt(5, "lcd.contrast", 465, 100, 0, 5, 100, SPIN_CONTROL_INT_PLUS, MASK_PERCENT);
AddSeparator(6, "lcd.sep1");
AddInt(7, "lcd.disableonplayback", 20310, LED_PLAYBACK_OFF, LED_PLAYBACK_OFF, 1, LED_PLAYBACK_VIDEO_MUSIC, SPIN_CONTROL_TEXT);
AddBool(8, "lcd.enableonpaused", 20312, true);
AddBool(7, "lcd.poweroffonexit", 34010, false);
AddInt(8, "lcd.disableonplayback", 20310, LED_PLAYBACK_OFF, LED_PLAYBACK_OFF, 1, LED_PLAYBACK_VIDEO_MUSIC, SPIN_CONTROL_TEXT);
AddBool(9, "lcd.enableonpaused", 20312, true);
AddCategory(4, "debug", 14092);
AddBool(1, "debug.showloginfo", 20191, false);
xbmc/settings/GUISettings.h (working copy)
#define MODCHIP_SMARTXX 0
#define MODCHIP_XENIUM 1
#define MODCHIP_XECUTER3 2
#define MODCHIP_XBLAST 3
// LED settings
#define LED_COLOUR_NO_CHANGE 0
xbmc/settings/GUIWindowSettingsCategory.cpp (working copy)
pControl->AddLabel("SmartXX", MODCHIP_SMARTXX);
pControl->AddLabel("Xenium", MODCHIP_XENIUM);
pControl->AddLabel("Xecuter3", MODCHIP_XECUTER3);
pControl->AddLabel("XBlast", MODCHIP_XBLAST);
pControl->SetValue(pSettingInt->GetData());
}
else if (strSetting.Equals("harddisk.aamlevel"))
......
CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID());
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);
}
else if (strSetting.Equals("lcd.modchip") || strSetting.Equals("lcd.backlight") || strSetting.Equals("lcd.disableonplayback"))
else if (strSetting.Equals("lcd.modchip") || strSetting.Equals("lcd.backlight") || strSetting.Equals("lcd.disableonplayback") || strSetting.Equals("lcd.poweroffonexit"))
{
CGUIControl *pControl = (CGUIControl *)GetControl(pSettingControl->GetID());
if (pControl) pControl->SetEnabled(g_guiSettings.GetInt("lcd.type") != LCD_TYPE_NONE);
......
}
else if (strSetting.Equals("lcd.modchip"))
{
g_lcd->Stop();
g_lcd->Stop(true);
CLCDFactory factory;
delete g_lcd;
g_lcd = factory.Create();
......
{
g_lcd->SetContrast(((CSettingInt *)pSettingControl->GetSetting())->GetData());
}
/*
//Not useful right now. Will be later if parameter can be set in advancedsettings xml file.
else if (strSetting.Equals("lcd.poweroffonexit"))
{
g_advancedSettings.m_PowerOffOnExit = ((CSettingBool *)pSettingControl->GetSetting())->GetData();
}
*/
#endif
#ifdef HAS_XBOX_HARDWARE
else if (strSetting.Equals("system.targettemperature"))
xbmc/Util.cpp (working copy)
}
ourmemaddr=(PVOID *)(((unsigned int) ourmemaddr) + sizeof(igk_main_toy));
if (g_guiSettings.GetInt("lcd.mode") > 0 && g_guiSettings.GetInt("lcd.type") == MODCHIP_SMARTXX)
if (g_guiSettings.GetInt("lcd.mode") > 0 && (g_guiSettings.GetInt("lcd.type") == MODCHIP_SMARTXX || g_guiSettings.GetInt("lcd.type") == MODCHIP_XBLAST))
{
memcpy(ourmemaddr, lcd_toy_xx, sizeof(lcd_toy_xx));
_asm
xbmc/utils/LCD.h (working copy)
CUSTOM_CHARSET_MAX
};
virtual void Initialize();
virtual void Stop() = 0;
virtual void Stop(bool TurnOffLCD) = 0;
virtual void SetBackLight(int iLight) = 0;
virtual void SetContrast(int iContrast) = 0;
virtual void SetLine(int iLine, const CStdString& strLine) = 0;
xbmc/utils/LCDFactory.cpp (working copy)
#include "lib/smartxx/smartxxLCD.h"
#include "lib/libXenium/XeniumLCD.h"
#include "lib/x3lcd/x3lcd.h"
#include "lib/xblast/xblastLCD.h"
#include "settings/GUISettings.h"
ILCD* g_lcd = NULL;
......
return new CX3LCD();
break;
case MODCHIP_XBLAST:
return new CXBlastLCD();
break;
}
return new CSmartXXLCD();
}
    (1-1/1)