neutrino.cpp: add g_settings.lcd_scroll option;

move rcK and umount on shutdown later to fix deep-standby clock in case of /var partition (thanks Thomas)


Origin commit data
------------------
Commit: b1f21b47ca
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-01-17 (Fri, 17 Jan 2014)
This commit is contained in:
[CST] Focus
2014-01-17 14:20:26 +04:00
parent 499cde0f38
commit f4ab14af0f
2 changed files with 8 additions and 4 deletions

View File

@@ -384,6 +384,7 @@ int CNeutrinoApp::loadSetup(const char * fname)
g_settings.backlight_tv = configfile.getInt32( "backlight_tv", 1);
g_settings.backlight_standby = configfile.getInt32( "backlight_standby", 0);
g_settings.backlight_deepstandby = configfile.getInt32( "backlight_deepstandby", 0);
g_settings.lcd_scroll = configfile.getInt32( "lcd_scroll", 1);
g_settings.hdd_fs = configfile.getInt32( "hdd_fs", 0);
g_settings.hdd_sleep = configfile.getInt32( "hdd_sleep", 120);
@@ -895,6 +896,7 @@ void CNeutrinoApp::saveSetup(const char * fname)
configfile.setInt32( "backlight_tv", g_settings.backlight_tv);
configfile.setInt32( "backlight_standby", g_settings.backlight_standby);
configfile.setInt32( "backlight_deepstandby", g_settings.backlight_deepstandby);
configfile.setInt32( "lcd_scroll", g_settings.lcd_scroll);
//misc
configfile.setInt32( "power_standby", g_settings.power_standby);
@@ -3087,10 +3089,6 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
mode = mode_off;
//CVFD::getInstance()->ShowText(g_Locale->getText(LOCALE_MAINMENU_SHUTDOWN));
my_system("/etc/init.d/rcK");
sync();
my_system(2,"/bin/umount", "-a");
sleep(1);
{
fp_standby_data_t standby;
time_t mtime = time(NULL);
@@ -3130,6 +3128,11 @@ void CNeutrinoApp::ExitRun(const bool /*write_si*/, int retcode)
standby.timer_minutes_hi = fp_timer >> 8;;
standby.timer_minutes_lo = fp_timer & 0xFF;
my_system("/etc/init.d/rcK");
sync();
my_system(2,"/bin/umount", "-a");
sleep(1);
stop_video();
int fd = open("/dev/display", O_RDONLY);

View File

@@ -578,6 +578,7 @@ struct SNeutrinoSettings
int backlight_tv;
int backlight_standby;
int backlight_deepstandby;
int lcd_scroll;
//#define FILESYSTEM_ENCODING_TO_UTF8(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
#define FILESYSTEM_ENCODING_TO_UTF8(a) (isUTF8(a) ? (a) : ZapitTools::Latin1_to_UTF8(a).c_str())
#define UTF8_TO_FILESYSTEM_ENCODING(a) (g_settings.filesystem_is_utf8 ? (a) : ZapitTools::UTF8_to_Latin1(a).c_str())