mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-30 08:51:10 +02:00
- fix scart_osd_fix
Conflicts: src/gui/osd_setup.cpp src/system/setting_helpers.cpp Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -723,8 +723,8 @@ int COsdSetup::showOsdSetup()
|
||||
mc->setHint("", LOCALE_MENU_HINT_OSD_PRESET);
|
||||
osd_menu->addItem(mc);
|
||||
}
|
||||
#if 0
|
||||
#if !defined BOXMODEL_CST_HD2
|
||||
|
||||
#if defined BOXMODEL_CST_HD1
|
||||
int scart_osd_fix_exist = 0;
|
||||
if (file_exists("/var/etc/.scart_osd_fix"))
|
||||
scart_osd_fix_exist = 1;
|
||||
@@ -734,7 +734,7 @@ int COsdSetup::showOsdSetup()
|
||||
mc->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_SCART_OSD_FIX);
|
||||
osd_menu->addItem(mc);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
// round corners
|
||||
mc = new CMenuOptionChooser(LOCALE_EXTRA_ROUNDED_CORNERS, &g_settings.theme.rounded_corners, MENU_CORNERSETTINGS_TYPE_OPTIONS, MENU_CORNERSETTINGS_TYPE_OPTION_COUNT, true, this);
|
||||
@@ -776,9 +776,9 @@ int COsdSetup::showOsdSetup()
|
||||
CAudioMute::getInstance()->enableMuteIcon(true);
|
||||
}
|
||||
|
||||
// #if !defined BOXMODEL_CST_HD2
|
||||
// delete scartFileNotifier;
|
||||
// #endif
|
||||
#if defined BOXMODEL_CST_HD1
|
||||
delete scartFileNotifier;
|
||||
#endif
|
||||
delete colorInfoclockNotifier;
|
||||
delete screensaverNotifier;
|
||||
delete channellistNotifier;
|
||||
|
@@ -137,6 +137,78 @@ bool CTouchFileNotifier::changeNotify(const neutrino_locale_t, void * data)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CFlagFileNotifier::changeNotify(const neutrino_locale_t, void * data)
|
||||
{
|
||||
std::string flagfile = FLAGDIR;
|
||||
flagfile += "/.";
|
||||
flagfile += filename;
|
||||
|
||||
if ((*(int *)data) != 0)
|
||||
{
|
||||
FILE * fd = fopen(flagfile.c_str(), "w");
|
||||
if (fd)
|
||||
{
|
||||
fclose(fd);
|
||||
if (strstr(filename, "scart_osd_fix"))
|
||||
{
|
||||
//change to scart-osd-fix values
|
||||
g_settings.screen_StartX_b_0 = 30;
|
||||
g_settings.screen_StartY_b_0 = 45;
|
||||
g_settings.screen_EndX_b_0 = 690;
|
||||
g_settings.screen_EndY_b_0 = 535;
|
||||
g_settings.screen_preset = 1;
|
||||
|
||||
//set values
|
||||
g_settings.screen_StartX = g_settings.screen_StartX_b_0;
|
||||
g_settings.screen_StartY = g_settings.screen_StartY_b_0;
|
||||
g_settings.screen_EndX = g_settings.screen_EndX_b_0;
|
||||
g_settings.screen_EndY = g_settings.screen_EndY_b_0;
|
||||
|
||||
CFrameBuffer::getInstance()->Clear();
|
||||
|
||||
g_settings.font_scaling_x = 100;
|
||||
g_settings.font_scaling_y = 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("[CFlagFileNotifier] executing \"service %s start\"\n", filename);
|
||||
if (my_system(3, "service", filename, "start") != 0)
|
||||
printf("[CFlagFileNotifier] executing failed\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strstr(filename, "scart_osd_fix"))
|
||||
{
|
||||
//reset to defaults
|
||||
g_settings.screen_StartX_b_0 = 22;
|
||||
g_settings.screen_StartY_b_0 = 12;
|
||||
g_settings.screen_EndX_b_0 = 1259 - g_settings.screen_StartX_b_0 - 1;
|
||||
g_settings.screen_EndY_b_0 = 708 - g_settings.screen_StartY_b_0 - 1;
|
||||
|
||||
//set values
|
||||
g_settings.screen_StartX = g_settings.screen_preset ? g_settings.screen_StartX_b_0 : g_settings.screen_StartX_a_0;
|
||||
g_settings.screen_StartY = g_settings.screen_preset ? g_settings.screen_StartY_b_0 : g_settings.screen_StartY_a_0;
|
||||
g_settings.screen_EndX = g_settings.screen_preset ? g_settings.screen_EndX_b_0 : g_settings.screen_EndX_a_0;
|
||||
g_settings.screen_EndY = g_settings.screen_preset ? g_settings.screen_EndY_b_0 : g_settings.screen_EndY_a_0;
|
||||
|
||||
CFrameBuffer::getInstance()->Clear();
|
||||
|
||||
g_settings.font_scaling_x = 105;
|
||||
g_settings.font_scaling_y = 105;
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("[CFlagFileNotifier] executing \"service %s stop\"\n", filename);
|
||||
if (my_system(3, "service", filename, "stop") != 0)
|
||||
printf("[CFlagFileNotifier] executing failed\n");
|
||||
}
|
||||
remove(flagfile.c_str());
|
||||
}
|
||||
return menu_return::RETURN_REPAINT;
|
||||
}
|
||||
|
||||
void CColorSetupNotifier::setPalette()
|
||||
{
|
||||
CFrameBuffer *frameBuffer = CFrameBuffer::getInstance();
|
||||
|
@@ -82,6 +82,14 @@ class CTouchFileNotifier : public CChangeObserver
|
||||
bool changeNotify(const neutrino_locale_t, void * data);
|
||||
};
|
||||
|
||||
class CFlagFileNotifier : public CChangeObserver
|
||||
{
|
||||
const char * filename;
|
||||
public:
|
||||
inline CFlagFileNotifier(const char * _filename) { filename = _filename; };
|
||||
bool changeNotify(const neutrino_locale_t, void * data);
|
||||
};
|
||||
|
||||
class CColorSetupNotifier : public CChangeObserver
|
||||
{
|
||||
public:
|
||||
|
Reference in New Issue
Block a user