mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-23 04:29:41 +02:00
Removed per-app gamma setting.
This functionality was half-removed already: some code missing, other essential parts commented out. I don't see the point of this either: RGB graphics are created for a certain gamma value; if that differs from the screen gamma it is up to the application to do something about it: gamma correct the graphics and/or change the screen gamma. It doesn't make sense to make this user configurable.
This commit is contained in:
parent
0622c4227f
commit
d90ed635be
@ -1269,7 +1269,6 @@ void GMenu2X::explorer() {
|
||||
|
||||
void GMenu2X::options() {
|
||||
int curMenuClock = confInt["menuClock"];
|
||||
//G
|
||||
int oldBacklight = getBackLight();
|
||||
int newBacklight = oldBacklight;
|
||||
bool showRootFolder = fileExists(CARD_ROOT);
|
||||
@ -1292,14 +1291,12 @@ void GMenu2X::options() {
|
||||
sd.addSetting(new MenuSettingInt(this, ts, tr["Clock for GMenu2X"], tr["Set the cpu working frequency when running GMenu2X"], &confInt["menuClock"], cpuFreqMin, cpuFreqSafeMax, cpuFreqMultiple));
|
||||
sd.addSetting(new MenuSettingInt(this, ts, tr["Maximum overclock"], tr["Set the maximum overclock for launching links"], &confInt["maxClock"], cpuFreqMin, cpuFreqMax, cpuFreqMultiple));
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Output logs"], tr["Logs the output of the links. Use the Log Viewer to read them."], &confInt["outputLogs"]));
|
||||
//G
|
||||
sd.addSetting(new MenuSettingInt(this, ts, tr["Lcd Backlight"], tr["Set Lcd Backlight value (default: 100)"], &newBacklight, 5, 100));
|
||||
sd.addSetting(new MenuSettingInt(this, ts, tr["Screen Timeout"], tr["Set screen's backlight timeout in seconds"], &confInt["backlightTimeout"], 0, 120));
|
||||
// sd.addSetting(new MenuSettingMultiString(this, ts, tr["Tv-Out encoding"], tr["Encoding of the tv-out signal"], &confStr["tvoutEncoding"], &encodings));
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Show root"], tr["Show root folder in the file selection dialogs"], &showRootFolder));
|
||||
|
||||
if (sd.exec() && sd.edited()) {
|
||||
//G
|
||||
if (newBacklight != oldBacklight) setBacklight(newBacklight);
|
||||
if (curMenuClock != confInt["menuClock"]) setClock(confInt["menuClock"]);
|
||||
|
||||
@ -1685,8 +1682,6 @@ void GMenu2X::editLink() {
|
||||
string linkSelScreens = menu->selLinkApp()->getSelectorScreens();
|
||||
string linkSelAliases = menu->selLinkApp()->getAliasFile();
|
||||
int linkClock = menu->selLinkApp()->clock();
|
||||
//G
|
||||
//int linkGamma = menu->selLinkApp()->gamma();
|
||||
|
||||
string diagTitle = tr.translate("Edit link: $1",linkTitle.c_str(),NULL);
|
||||
string diagIcon = menu->selLinkApp()->getIconPath();
|
||||
@ -1705,7 +1700,6 @@ void GMenu2X::editLink() {
|
||||
sd.addSetting(new MenuSettingString(this, ts, tr["Selector Filter"], tr["Selector filter (Separate values with a comma)"], &linkSelFilter, diagTitle, diagIcon));
|
||||
sd.addSetting(new MenuSettingDir(this, ts, tr["Selector Screenshots"], tr["Directory of the screenshots for the selector"], &linkSelScreens));
|
||||
sd.addSetting(new MenuSettingFile(this, ts, tr["Selector Aliases"], tr["File containing a list of aliases for the selector"], &linkSelAliases));
|
||||
//G
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Wrapper"], tr["Explicitly relaunch GMenu2X after execution"], &menu->selLinkApp()->needsWrapperRef()));
|
||||
sd.addSetting(new MenuSettingBool(this, ts, tr["Don't Leave"], tr["Don't quit GMenu2X when launching this link"], &menu->selLinkApp()->runsInBackgroundRef()));
|
||||
|
||||
|
@ -48,8 +48,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
wrapper = false;
|
||||
dontleave = false;
|
||||
setClock(336);
|
||||
//G
|
||||
//setGamma(0);
|
||||
selectordir = "";
|
||||
selectorfilter = "";
|
||||
icon = iconPath = "";
|
||||
@ -84,9 +82,6 @@ LinkApp::LinkApp(GMenu2X *gmenu2x_, Touchscreen &ts, InputManager &inputMgr_,
|
||||
if (value=="true") dontleave = true;
|
||||
} else if (name == "clock") {
|
||||
setClock( atoi(value.c_str()) );
|
||||
//G
|
||||
} else if (name == "gamma") {
|
||||
setGamma( atoi(value.c_str()) );
|
||||
} else if (name == "selectordir") {
|
||||
setSelectorDir( value );
|
||||
} else if (name == "selectorbrowser") {
|
||||
@ -150,26 +145,6 @@ void LinkApp::setClock(int mhz) {
|
||||
edited = true;
|
||||
}
|
||||
|
||||
//G
|
||||
int LinkApp::gamma() {
|
||||
return igamma;
|
||||
}
|
||||
|
||||
const string &LinkApp::gammaStr() {
|
||||
return sgamma;
|
||||
}
|
||||
|
||||
void LinkApp::setGamma(int gamma) {
|
||||
igamma = constrain(gamma,0,100);
|
||||
stringstream ss;
|
||||
sgamma = "";
|
||||
ss << igamma;
|
||||
ss >> sgamma;
|
||||
|
||||
edited = true;
|
||||
}
|
||||
// /G
|
||||
|
||||
bool LinkApp::targetExists()
|
||||
{
|
||||
return fileExists(exec);
|
||||
@ -188,8 +163,6 @@ bool LinkApp::save() {
|
||||
if (manual!="" ) f << "manual=" << manual << endl;
|
||||
if (iclock!=0 ) f << "clock=" << iclock << endl;
|
||||
if (useRamTimings ) f << "useramtimings=true" << endl;
|
||||
//G
|
||||
if (igamma!=0 ) f << "gamma=" << igamma << endl;
|
||||
if (selectordir!="" ) f << "selectordir=" << selectordir << endl;
|
||||
if (selectorbrowser ) f << "selectorbrowser=true" << endl;
|
||||
if (selectorfilter!="" ) f << "selectorfilter=" << selectorfilter << endl;
|
||||
@ -444,8 +417,6 @@ void LinkApp::launch(const string &selectedFile, const string &selectedDir) {
|
||||
gmenu2x->setClock(clock());
|
||||
}
|
||||
gmenu2x->quit();
|
||||
//if (gamma()!=0 && gamma()!=gmenu2x->confInt["gamma"])
|
||||
// gmenu2x->setGamma(gamma());
|
||||
|
||||
/* Make the terminal we're connected to (via stdin/stdout) our
|
||||
controlling terminal again. Else many console programs are
|
||||
|
@ -39,10 +39,6 @@ private:
|
||||
InputManager &inputMgr;
|
||||
std::string sclock;
|
||||
int iclock;
|
||||
//G
|
||||
std::string sgamma;
|
||||
//G
|
||||
int igamma;
|
||||
std::string exec, params, workdir, manual, selectordir, selectorfilter, selectorscreens;
|
||||
bool selectorbrowser, useRamTimings;
|
||||
void drawRun();
|
||||
@ -81,11 +77,6 @@ public:
|
||||
const std::string &clockStr(int maxClock);
|
||||
void setClock(int mhz);
|
||||
|
||||
//G
|
||||
int gamma();
|
||||
const std::string &gammaStr();
|
||||
void setGamma(int gamma);
|
||||
|
||||
bool save();
|
||||
void run();
|
||||
void showManual();
|
||||
|
Loading…
Reference in New Issue
Block a user