mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-26 05:53:10 +02:00
Use existing brightness value instead of overriding it.
This commit is contained in:
parent
84ec66c7ce
commit
7a978222b8
@ -424,7 +424,6 @@ GMenu2X::GMenu2X()
|
|||||||
|
|
||||||
setInputSpeed();
|
setInputSpeed();
|
||||||
initServices();
|
initServices();
|
||||||
setBacklight(confInt["backlight"]);
|
|
||||||
setVolume(confInt["globalVolume"]);
|
setVolume(confInt["globalVolume"]);
|
||||||
applyDefaultTimings();
|
applyDefaultTimings();
|
||||||
setClock(confInt["menuClock"]);
|
setClock(confInt["menuClock"]);
|
||||||
@ -705,7 +704,6 @@ void GMenu2X::readConfig(string conffile) {
|
|||||||
cpuFreqMenuDefault, cpuFreqMin, cpuFreqSafeMax );
|
cpuFreqMenuDefault, cpuFreqMin, cpuFreqSafeMax );
|
||||||
evalIntConf( &confInt["globalVolume"], 67, 0,100 );
|
evalIntConf( &confInt["globalVolume"], 67, 0,100 );
|
||||||
evalIntConf( &confInt["backlightTimeout"], 15, 0,120 );
|
evalIntConf( &confInt["backlightTimeout"], 15, 0,120 );
|
||||||
evalIntConf( &confInt["backlight"], 100, 5,100 );
|
|
||||||
evalIntConf( &confInt["videoBpp"], 32, 16, 32 );
|
evalIntConf( &confInt["videoBpp"], 32, 16, 32 );
|
||||||
|
|
||||||
if (confStr["tvoutEncoding"] != "PAL") confStr["tvoutEncoding"] = "NTSC";
|
if (confStr["tvoutEncoding"] != "PAL") confStr["tvoutEncoding"] = "NTSC";
|
||||||
@ -1264,7 +1262,8 @@ void GMenu2X::options() {
|
|||||||
int curMenuClock = confInt["menuClock"];
|
int curMenuClock = confInt["menuClock"];
|
||||||
int curGlobalVolume = confInt["globalVolume"];
|
int curGlobalVolume = confInt["globalVolume"];
|
||||||
//G
|
//G
|
||||||
int prevbacklight = confInt["backlight"];
|
int oldBacklight = getBackLight();
|
||||||
|
int newBacklight = oldBacklight;
|
||||||
bool showRootFolder = fileExists(CARD_ROOT);
|
bool showRootFolder = fileExists(CARD_ROOT);
|
||||||
|
|
||||||
FileLister fl_tr(getHome() + "/translations");
|
FileLister fl_tr(getHome() + "/translations");
|
||||||
@ -1287,14 +1286,14 @@ void GMenu2X::options() {
|
|||||||
sd.addSetting(new MenuSettingInt(this,tr["Global Volume"],tr["Set the default volume for the gp2x soundcard"],&confInt["globalVolume"],0,100));
|
sd.addSetting(new MenuSettingInt(this,tr["Global Volume"],tr["Set the default volume for the gp2x soundcard"],&confInt["globalVolume"],0,100));
|
||||||
sd.addSetting(new MenuSettingBool(this,tr["Output logs"],tr["Logs the output of the links. Use the Log Viewer to read them."],&confInt["outputLogs"]));
|
sd.addSetting(new MenuSettingBool(this,tr["Output logs"],tr["Logs the output of the links. Use the Log Viewer to read them."],&confInt["outputLogs"]));
|
||||||
//G
|
//G
|
||||||
sd.addSetting(new MenuSettingInt(this,tr["Lcd Backlight"],tr["Set dingoo's Lcd Backlight value (default: 100)"],&confInt["backlight"],5,100));
|
sd.addSetting(new MenuSettingInt(this,tr["Lcd Backlight"],tr["Set dingoo's Lcd Backlight value (default: 100)"],&newBacklight,5,100));
|
||||||
sd.addSetting(new MenuSettingInt(this,tr["Screen Timeout"],tr["Set screen's backlight timeout in seconds"],&confInt["backlightTimeout"],0,120));
|
sd.addSetting(new MenuSettingInt(this,tr["Screen Timeout"],tr["Set screen's backlight timeout in seconds"],&confInt["backlightTimeout"],0,120));
|
||||||
// sd.addSetting(new MenuSettingMultiString(this,tr["Tv-Out encoding"],tr["Encoding of the tv-out signal"],&confStr["tvoutEncoding"],&encodings));
|
// sd.addSetting(new MenuSettingMultiString(this,tr["Tv-Out encoding"],tr["Encoding of the tv-out signal"],&confStr["tvoutEncoding"],&encodings));
|
||||||
sd.addSetting(new MenuSettingBool(this,tr["Show root"],tr["Show root folder in the file selection dialogs"],&showRootFolder));
|
sd.addSetting(new MenuSettingBool(this,tr["Show root"],tr["Show root folder in the file selection dialogs"],&showRootFolder));
|
||||||
|
|
||||||
if (sd.exec() && sd.edited()) {
|
if (sd.exec() && sd.edited()) {
|
||||||
//G
|
//G
|
||||||
if (prevbacklight != confInt["backlight"]) setBacklight(confInt["backlight"]);
|
if (newBacklight != oldBacklight) setBacklight(newBacklight);
|
||||||
if (curMenuClock!=confInt["menuClock"]) setClock(confInt["menuClock"]);
|
if (curMenuClock!=confInt["menuClock"]) setClock(confInt["menuClock"]);
|
||||||
if (curGlobalVolume!=confInt["globalVolume"]) setVolume(confInt["globalVolume"]);
|
if (curGlobalVolume!=confInt["globalVolume"]) setVolume(confInt["globalVolume"]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user