Date:2011-09-23 01:36:56 (12 years 6 months ago)
Author:Maarten ter Huurne
Commit:7a978222b8013719ab12e6823c780d4e40bb301f
Message:Use existing brightness value instead of overriding it.

Files: src/gmenu2x.cpp (4 diffs)

Change Details

src/gmenu2x.cpp
424424
425425    setInputSpeed();
426426    initServices();
427    setBacklight(confInt["backlight"]);
428427    setVolume(confInt["globalVolume"]);
429428    applyDefaultTimings();
430429    setClock(confInt["menuClock"]);
...... 
705704                 cpuFreqMenuDefault, cpuFreqMin, cpuFreqSafeMax );
706705    evalIntConf( &confInt["globalVolume"], 67, 0,100 );
707706    evalIntConf( &confInt["backlightTimeout"], 15, 0,120 );
708    evalIntConf( &confInt["backlight"], 100, 5,100 );
709707    evalIntConf( &confInt["videoBpp"], 32, 16, 32 );
710708
711709    if (confStr["tvoutEncoding"] != "PAL") confStr["tvoutEncoding"] = "NTSC";
...... 
12641262    int curMenuClock = confInt["menuClock"];
12651263    int curGlobalVolume = confInt["globalVolume"];
12661264    //G
1267    int prevbacklight = confInt["backlight"];
1265    int oldBacklight = getBackLight();
1266    int newBacklight = oldBacklight;
12681267    bool showRootFolder = fileExists(CARD_ROOT);
12691268
12701269    FileLister fl_tr(getHome() + "/translations");
...... 
12871286    sd.addSetting(new MenuSettingInt(this,tr["Global Volume"],tr["Set the default volume for the gp2x soundcard"],&confInt["globalVolume"],0,100));
12881287    sd.addSetting(new MenuSettingBool(this,tr["Output logs"],tr["Logs the output of the links. Use the Log Viewer to read them."],&confInt["outputLogs"]));
12891288    //G
1290    sd.addSetting(new MenuSettingInt(this,tr["Lcd Backlight"],tr["Set dingoo's Lcd Backlight value (default: 100)"],&confInt["backlight"],5,100));
1289    sd.addSetting(new MenuSettingInt(this,tr["Lcd Backlight"],tr["Set dingoo's Lcd Backlight value (default: 100)"],&newBacklight,5,100));
12911290    sd.addSetting(new MenuSettingInt(this,tr["Screen Timeout"],tr["Set screen's backlight timeout in seconds"],&confInt["backlightTimeout"],0,120));
12921291// sd.addSetting(new MenuSettingMultiString(this,tr["Tv-Out encoding"],tr["Encoding of the tv-out signal"],&confStr["tvoutEncoding"],&encodings));
12931292    sd.addSetting(new MenuSettingBool(this,tr["Show root"],tr["Show root folder in the file selection dialogs"],&showRootFolder));
12941293
12951294    if (sd.exec() && sd.edited()) {
12961295        //G
1297        if (prevbacklight != confInt["backlight"]) setBacklight(confInt["backlight"]);
1296        if (newBacklight != oldBacklight) setBacklight(newBacklight);
12981297        if (curMenuClock!=confInt["menuClock"]) setClock(confInt["menuClock"]);
12991298        if (curGlobalVolume!=confInt["globalVolume"]) setVolume(confInt["globalVolume"]);
13001299

Archive Download the corresponding diff file



interactive