forked from len0rd/rockbox
Restore the default backlight settings broken by Rani
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10314 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
943ff8dc67
commit
52aaa75e83
4 changed files with 10 additions and 4 deletions
|
|
@ -94,7 +94,7 @@ const char rec_base_directory[] = REC_BASE_DIR;
|
|||
#include "dsp.h"
|
||||
#endif
|
||||
|
||||
#define CONFIG_BLOCK_VERSION 48
|
||||
#define CONFIG_BLOCK_VERSION 49
|
||||
#define CONFIG_BLOCK_SIZE 512
|
||||
#define RTC_BLOCK_SIZE 44
|
||||
|
||||
|
|
@ -1260,7 +1260,7 @@ void settings_load(int which)
|
|||
}
|
||||
|
||||
if ( global_settings.contrast < MIN_CONTRAST_SETTING )
|
||||
global_settings.contrast = DEFAULT_CONTRAST_SETTING;
|
||||
global_settings.contrast = lcd_default_contrast();
|
||||
|
||||
i = 0xb8;
|
||||
strncpy((char *)global_settings.wps_file, (char *)&config_block[i],
|
||||
|
|
@ -1722,7 +1722,7 @@ void settings_reset(void) {
|
|||
global_settings.mdb_enable = sound_default(SOUND_MDB_ENABLE);
|
||||
global_settings.superbass = sound_default(SOUND_SUPERBASS);
|
||||
#endif
|
||||
global_settings.contrast = DEFAULT_CONTRAST_SETTING;
|
||||
global_settings.contrast = lcd_default_contrast();
|
||||
#ifdef HAVE_LCD_REMOTE
|
||||
global_settings.remote_contrast = lcd_remote_default_contrast();
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -573,7 +573,6 @@ extern const char rec_base_directory[];
|
|||
#ifdef IAUDIO_X5
|
||||
#define MIN_CONTRAST_SETTING 0
|
||||
#define MAX_CONTRAST_SETTING 29
|
||||
#define DEFAULT_CONTRAST_SETTING 15
|
||||
#else
|
||||
#ifdef HAVE_LCD_CHARCELLS
|
||||
#define MAX_CONTRAST_SETTING 31
|
||||
|
|
|
|||
|
|
@ -72,11 +72,13 @@ static const char scroll_tick_table[16] = {
|
|||
100, 80, 64, 50, 40, 32, 25, 20, 16, 12, 10, 8, 6, 5, 4, 3
|
||||
};
|
||||
|
||||
#ifndef TARGET_TREE
|
||||
/* probably just a dummy */
|
||||
int lcd_default_contrast(void)
|
||||
{
|
||||
return 28;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* LCD init */
|
||||
void lcd_init(void)
|
||||
|
|
|
|||
|
|
@ -137,6 +137,11 @@ inline void lcd_write_data(const unsigned short* p_bytes, int count)
|
|||
|
||||
/*** hardware configuration ***/
|
||||
|
||||
int lcd_default_contrast(void)
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
|
||||
void lcd_set_contrast(int val)
|
||||
{
|
||||
if (val >= 15) // val must'nt be 15 or 31
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue