1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-11-22 14:20:37 +02:00

When adding a new link, the default brightness is now -1.

Note that the brightness values between -1 and 5 won't be accepted, and will be set back to 5.
This commit is contained in:
Ayla 2010-10-13 22:15:55 +02:00
parent 5cd92b76ae
commit 69c702f88c
2 changed files with 5 additions and 3 deletions

View File

@ -1503,7 +1503,7 @@ void GMenu2X::editLink() {
sd.addSetting(new MenuSettingInt(this,tr["Clock (default: 336)"],tr["Cpu clock frequency to set when launching this link"],&linkClock,200,confInt["maxClock"]));
// sd.addSetting(new MenuSettingBool(this,tr["Tweak RAM Timings"],tr["This usually speeds up the application at the cost of stability"],&linkUseRamTimings));
sd.addSetting(new MenuSettingInt(this,tr["Volume (default: -1)"],tr["Volume to set for this link"],&linkVolume,-1,100));
sd.addSetting(new MenuSettingInt(this,tr["Backlight (default: 100)"],tr["LCD backlight value to set when launching this link"],&linkBacklight,5,100));
sd.addSetting(new MenuSettingInt(this,tr["Backlight (default: -1)"],tr["LCD backlight value to set when launching this link"],&linkBacklight,-1,100));
sd.addSetting(new MenuSettingString(this,tr["Parameters"],tr["Parameters to pass to the application"],&linkParams, diagTitle,diagIcon));
sd.addSetting(new MenuSettingDir(this,tr["Selector Directory"],tr["Directory to scan for the selector"],&linkSelDir));
sd.addSetting(new MenuSettingBool(this,tr["Selector Browser"],tr["Allow the selector to change directory"],&linkSelBrowser));
@ -1531,6 +1531,8 @@ void GMenu2X::editLink() {
menu->selLinkApp()->setClock(linkClock);
menu->selLinkApp()->setVolume(linkVolume);
//G
if ((linkBacklight < 5) && (linkBacklight > -1))
linkBacklight = 5;
menu->selLinkApp()->setBacklight(linkBacklight);
INFO("New Section: '%s'\n", newSection.c_str());

View File

@ -45,7 +45,7 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, InputManager &inputMgr_,
setVolume(-1);
//G
//setGamma(0);
setBacklight(100);
setBacklight(-1);
selectordir = "";
selectorfilter = "";
icon = iconPath = "";
@ -185,7 +185,7 @@ const string &LinkApp::backlightStr()
void LinkApp::setBacklight(int val)
{
ibacklight = constrain(val,5,100);
ibacklight = constrain(val,-1,100);
stringstream ss;
sbacklight = "";
ss << ibacklight;