Accepted FS #5474 by yours truly.
Save your settings; CONFIG_BLOCK_VERSION is increased. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10303 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3c810c4f6a
commit
c657763a23
6 changed files with 25 additions and 14 deletions
|
@ -94,7 +94,7 @@ const char rec_base_directory[] = REC_BASE_DIR;
|
|||
#include "dsp.h"
|
||||
#endif
|
||||
|
||||
#define CONFIG_BLOCK_VERSION 47
|
||||
#define CONFIG_BLOCK_VERSION 48
|
||||
#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 = lcd_default_contrast();
|
||||
global_settings.contrast = DEFAULT_CONTRAST_SETTING;
|
||||
|
||||
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 = lcd_default_contrast();
|
||||
global_settings.contrast = DEFAULT_CONTRAST_SETTING;
|
||||
#ifdef HAVE_LCD_REMOTE
|
||||
global_settings.remote_contrast = lcd_remote_default_contrast();
|
||||
#endif
|
||||
|
|
|
@ -570,6 +570,11 @@ extern const char rec_base_directory[];
|
|||
|
||||
/* system defines */
|
||||
|
||||
#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
|
||||
#define DEFAULT_CONTRAST_SETTING 30
|
||||
|
@ -578,7 +583,7 @@ extern const char rec_base_directory[];
|
|||
#define DEFAULT_CONTRAST_SETTING 38
|
||||
#endif
|
||||
#define MIN_CONTRAST_SETTING 5
|
||||
|
||||
#endif // X5
|
||||
|
||||
/* argument bits for settings_load() */
|
||||
#define SETTINGS_RTC 1 /* only the settings from the RTC nonvolatile RAM */
|
||||
|
|
|
@ -266,7 +266,7 @@ static bool remote_caption_backlight(void)
|
|||
}
|
||||
#endif /* HAVE_REMOTE_LCD */
|
||||
|
||||
#ifndef HAVE_LCD_COLOR
|
||||
#if !defined(HAVE_LCD_COLOR) || defined(IAUDIO_X5)
|
||||
static bool contrast(void)
|
||||
{
|
||||
return set_int( str(LANG_CONTRAST), "", UNIT_INT,
|
||||
|
@ -1775,13 +1775,13 @@ static bool lcd_settings_menu(void)
|
|||
#if defined(HAVE_BACKLIGHT_PWM_FADING) && !defined(SIMULATOR)
|
||||
{ ID2P(LANG_BACKLIGHT_FADE_IN), backlight_fade_in },
|
||||
{ ID2P(LANG_BACKLIGHT_FADE_OUT), backlight_fade_out },
|
||||
#endif
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
{ ID2P(LANG_BRIGHTNESS), brightness },
|
||||
#endif
|
||||
{ ID2P(LANG_BACKLIGHT_FILTER_FIRST_KEYPRESS), set_bl_filter_first_keypress },
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
{ ID2P(LANG_BRIGHTNESS), brightness },
|
||||
#endif
|
||||
#endif /* CONFIG_BACKLIGHT */
|
||||
#ifndef HAVE_LCD_COLOR
|
||||
#if !defined(HAVE_LCD_COLOR) || defined(IAUDIO_X5)
|
||||
{ ID2P(LANG_CONTRAST), contrast },
|
||||
#endif
|
||||
#ifdef HAVE_LCD_BITMAP
|
||||
|
|
|
@ -655,7 +655,7 @@ bool is_remote_backlight_on(void) {return true;}
|
|||
#endif /* #ifdef CONFIG_BACKLIGHT */
|
||||
|
||||
#ifdef HAVE_BACKLIGHT_BRIGHTNESS
|
||||
#ifdef IRIVER_H300_SERIES
|
||||
#if defined(IRIVER_H300_SERIES) || defined(IAUDIO_X5)
|
||||
void backlight_set_brightness(int val)
|
||||
{
|
||||
/* set H300 brightness by changing the PWM
|
||||
|
|
|
@ -42,7 +42,8 @@
|
|||
#define CONFIG_LCD LCD_X5
|
||||
|
||||
/* Define this for LCD backlight available */
|
||||
#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled */
|
||||
#define CONFIG_BACKLIGHT BL_IRIVER_H100 /* port controlled !?!? */
|
||||
#define HAVE_BACKLIGHT_BRIGHTNESS
|
||||
|
||||
/* Define this if you have a software controlled poweroff */
|
||||
#define HAVE_SW_POWEROFF
|
||||
|
|
|
@ -38,8 +38,8 @@ static bool display_on=false; /* is the display turned on? */
|
|||
/* register defines for the Renesas HD66773R */
|
||||
#define R_HORIZ_RAM_ADDR_POS 0x16
|
||||
#define R_VERT_RAM_ADDR_POS 0x17
|
||||
#define R_RAM_ADDR_SET 0x21
|
||||
#define R_WRITE_DATA_2_GRAM 0x22
|
||||
#define R_RAM_ADDR_SET 0x21
|
||||
#define R_WRITE_DATA_2_GRAM 0x22
|
||||
|
||||
/*****************************************************
|
||||
The table below was generated by the following script:
|
||||
|
@ -139,7 +139,12 @@ inline void lcd_write_data(const unsigned short* p_bytes, int count)
|
|||
|
||||
void lcd_set_contrast(int val)
|
||||
{
|
||||
(void)val;
|
||||
if (val >= 15) // val must'nt be 15 or 31
|
||||
++val;
|
||||
if (val > 30)
|
||||
return;
|
||||
|
||||
lcd_write_reg(0x0e, 0x201e + (val << 8));
|
||||
}
|
||||
|
||||
void lcd_set_invert_display(bool yesno)
|
||||
|
|
Loading…
Reference in a new issue