src/gmenu2x.cpp |
424 | 424 | |
425 | 425 | setInputSpeed(); |
426 | 426 | initServices(); |
427 | | setBacklight(confInt["backlight"]); |
428 | 427 | setVolume(confInt["globalVolume"]); |
429 | 428 | applyDefaultTimings(); |
430 | 429 | setClock(confInt["menuClock"]); |
... | ... | |
705 | 704 | cpuFreqMenuDefault, cpuFreqMin, cpuFreqSafeMax ); |
706 | 705 | evalIntConf( &confInt["globalVolume"], 67, 0,100 ); |
707 | 706 | evalIntConf( &confInt["backlightTimeout"], 15, 0,120 ); |
708 | | evalIntConf( &confInt["backlight"], 100, 5,100 ); |
709 | 707 | evalIntConf( &confInt["videoBpp"], 32, 16, 32 ); |
710 | 708 | |
711 | 709 | if (confStr["tvoutEncoding"] != "PAL") confStr["tvoutEncoding"] = "NTSC"; |
... | ... | |
1264 | 1262 | int curMenuClock = confInt["menuClock"]; |
1265 | 1263 | int curGlobalVolume = confInt["globalVolume"]; |
1266 | 1264 | //G |
1267 | | int prevbacklight = confInt["backlight"]; |
| 1265 | int oldBacklight = getBackLight(); |
| 1266 | int newBacklight = oldBacklight; |
1268 | 1267 | bool showRootFolder = fileExists(CARD_ROOT); |
1269 | 1268 | |
1270 | 1269 | FileLister fl_tr(getHome() + "/translations"); |
... | ... | |
1287 | 1286 | sd.addSetting(new MenuSettingInt(this,tr["Global Volume"],tr["Set the default volume for the gp2x soundcard"],&confInt["globalVolume"],0,100)); |
1288 | 1287 | sd.addSetting(new MenuSettingBool(this,tr["Output logs"],tr["Logs the output of the links. Use the Log Viewer to read them."],&confInt["outputLogs"])); |
1289 | 1288 | //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)); |
1291 | 1290 | sd.addSetting(new MenuSettingInt(this,tr["Screen Timeout"],tr["Set screen's backlight timeout in seconds"],&confInt["backlightTimeout"],0,120)); |
1292 | 1291 | // sd.addSetting(new MenuSettingMultiString(this,tr["Tv-Out encoding"],tr["Encoding of the tv-out signal"],&confStr["tvoutEncoding"],&encodings)); |
1293 | 1292 | sd.addSetting(new MenuSettingBool(this,tr["Show root"],tr["Show root folder in the file selection dialogs"],&showRootFolder)); |
1294 | 1293 | |
1295 | 1294 | if (sd.exec() && sd.edited()) { |
1296 | 1295 | //G |
1297 | | if (prevbacklight != confInt["backlight"]) setBacklight(confInt["backlight"]); |
| 1296 | if (newBacklight != oldBacklight) setBacklight(newBacklight); |
1298 | 1297 | if (curMenuClock!=confInt["menuClock"]) setClock(confInt["menuClock"]); |
1299 | 1298 | if (curGlobalVolume!=confInt["globalVolume"]) setVolume(confInt["globalVolume"]); |
1300 | 1299 | |