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

Removed last bits of the "volume" feature.

This commit is contained in:
Paul Cercueil 2012-06-14 23:59:39 +02:00
parent dd047010ed
commit 21fee6ccd1
2 changed files with 0 additions and 42 deletions

View File

@ -99,16 +99,6 @@ using namespace fastdelegate;
GMENU2X_SYSTEM_DIR "/skins/Default/wallpapers/default.png" GMENU2X_SYSTEM_DIR "/skins/Default/wallpapers/default.png"
#endif #endif
const int MAX_VOLUME_SCALE_FACTOR = 200;
// Default values - going to add settings adjustment, saving, loading and such
const int VOLUME_SCALER_MUTE = 0;
const int VOLUME_SCALER_PHONES = 65;
const int VOLUME_SCALER_NORMAL = 100;
const int VOLUME_MODE_MUTE = 0;
const int VOLUME_MODE_PHONES = 1;
const int VOLUME_MODE_NORMAL = 2;
const int BATTERY_READS = 10;
#ifdef _CARD_ROOT #ifdef _CARD_ROOT
const char *CARD_ROOT = _CARD_ROOT; const char *CARD_ROOT = _CARD_ROOT;
#elif defined(PLATFORM_DINGUX) #elif defined(PLATFORM_DINGUX)
@ -760,14 +750,6 @@ void GMenu2X::main() {
drawScrollBar(linkRows,menu->sectionLinks()->size()/linkColumns + ((menu->sectionLinks()->size()%linkColumns==0) ? 0 : 1),menu->firstDispRow(),43,resY-81); drawScrollBar(linkRows,menu->sectionLinks()->size()/linkColumns + ((menu->sectionLinks()->size()%linkColumns==0) ? 0 : 1),menu->firstDispRow(),43,resY-81);
/*
switch(volumeMode) {
case VOLUME_MODE_MUTE: sc.skinRes("imgs/mute.png")->blit(s,279,bottomBarIconY); break;
case VOLUME_MODE_PHONES: sc.skinRes("imgs/phones.png")->blit(s,279,bottomBarIconY); break;
default: sc.skinRes("imgs/volume.png")->blit(s,279,bottomBarIconY); break;
}
*/
if (menu->selLink()!=NULL) { if (menu->selLink()!=NULL) {
s->write ( font, menu->selLink()->getDescription(), halfX, resY-19, ASFont::HAlignCenter, ASFont::VAlignBottom ); s->write ( font, menu->selLink()->getDescription(), halfX, resY-19, ASFont::HAlignCenter, ASFont::VAlignBottom );
if (menu->selLinkApp()!=NULL) { if (menu->selLinkApp()!=NULL) {
@ -1555,25 +1537,6 @@ void GMenu2X::setClock(unsigned mhz) {
#endif #endif
} }
void GMenu2X::setVolumeScaler(int scale) {
scale = constrain(scale,0,MAX_VOLUME_SCALE_FACTOR);
unsigned long soundDev = open("/dev/mixer", O_WRONLY);
if (soundDev) {
ioctl(soundDev, SOUND_MIXER_PRIVATE2, &scale);
close(soundDev);
}
}
int GMenu2X::getVolumeScaler() {
int currentscalefactor = -1;
unsigned long soundDev = open("/dev/mixer", O_RDONLY);
if (soundDev) {
ioctl(soundDev, SOUND_MIXER_PRIVATE1, &currentscalefactor);
close(soundDev);
}
return currentscalefactor;
}
const string &GMenu2X::getExePath() { const string &GMenu2X::getExePath() {
if (path.empty()) { if (path.empty()) {
char buf[255]; char buf[255];

View File

@ -173,11 +173,6 @@ public:
void setClock(unsigned mhz); void setClock(unsigned mhz);
void setVolume(int vol);
int getVolume();
void setVolumeScaler(int scaler);
int getVolumeScaler();
void setBacklight(int val); void setBacklight(int val);
int getBackLight(); int getBackLight();