system/settings: use integers for shutdown_count/_min

Signed-off-by: Jacek Jendrzej <crashdvb@googlemail.com>
This commit is contained in:
martii
2013-12-24 09:53:20 +01:00
committed by Jacek Jendrzej
parent 2cee6929d6
commit d125301ede
5 changed files with 31 additions and 24 deletions

View File

@@ -61,7 +61,7 @@ int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &actionKey)
parent->hide();
if(permanent) {
strcpy(value,g_settings.shutdown_min);
sprintf(value,"%03d", g_settings.shutdown_min);
} else {
shutdown_min = g_Timerd->getSleepTimerRemaining(); // remaining shutdown time?
sprintf(value,"%03d", shutdown_min);
@@ -100,8 +100,8 @@ int CSleepTimerWidget::exec(CMenuTarget* parent, const std::string &actionKey)
int new_val = atoi(value);
if(permanent) {
sprintf(g_settings.shutdown_min,"%03d", new_val);
printf("permanent sleeptimer min: %s\n", g_settings.shutdown_min);
g_settings.shutdown_min = new_val;
printf("permanent sleeptimer min: %d\n", g_settings.shutdown_min);
}
else if(shutdown_min != new_val) {
shutdown_min = new_val;