forked from len0rd/rockbox
Fix the colour selector. The only colours not allowed should be when trying to set the fg and bg to the same colour.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17395 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5b33a417e3
commit
c95adecb07
1 changed files with 9 additions and 2 deletions
|
@ -79,9 +79,16 @@ static struct colour_info
|
|||
*/
|
||||
static int set_color_func(void* color)
|
||||
{
|
||||
int res, c = (intptr_t)color;
|
||||
int res, c = (intptr_t)color, banned_color=-1;
|
||||
|
||||
/* Don't let foreground be set the same as background and vice-versa */
|
||||
if (c == COLOR_BG)
|
||||
banned_color = *colors[COLOR_FG].setting;
|
||||
else if (c == COLOR_FG)
|
||||
banned_color = *colors[COLOR_BG].setting;
|
||||
|
||||
res = (int)set_color(&screens[SCREEN_MAIN],str(colors[c].lang_id),
|
||||
colors[c].setting,*colors[c].setting);
|
||||
colors[c].setting, banned_color);
|
||||
settings_save();
|
||||
settings_apply(false);
|
||||
return res;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue