-rw-r--r-- | library/qpeapplication.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp index 5f61c0c..cf437da 100644 --- a/library/qpeapplication.cpp +++ b/library/qpeapplication.cpp @@ -151,70 +151,70 @@ public: if ( !r ) { int sl = abs_name.length(); do { sl = abs_name.findRev('/',sl-1); QString name = sl>=0 ? abs_name.mid(sl+1) : abs_name; int dot = name.findRev('.'); if ( dot >= 0 ) name = name.left(dot); QImage img = Resource::loadImage(name); if ( !img.isNull() ) r = new QImageDrag(img); } while (!r && sl>0); } return r; } }; static int muted=0; static int micMuted=0; static void setVolume(int t=0, int percent=-1) { switch (t) { case 0: { - Config cfg("Sound"); - cfg.setGroup("System"); + Config cfg("qpe"); + cfg.setGroup("Volume"); if ( percent < 0 ) - percent = cfg.readNumEntry("Volume",50); + percent = cfg.readNumEntry("VolumePercent",50); int fd = 0; if ((fd = open("/dev/mixer", O_RDWR))>=0) { int vol = muted ? 0 : percent; // set both channels to same volume vol |= vol << 8; ioctl(fd, MIXER_WRITE(0), &vol); ::close(fd); } } break; } } static void setMic(int t=0, int percent=-1) { switch (t) { case 0: { - Config cfg("Sound"); - cfg.setGroup("System"); + Config cfg("qpe"); + cfg.setGroup("Volume"); if ( percent < 0 ) percent = cfg.readNumEntry("Mic",50); int fd = 0; int mic = micMuted ? 0 : percent; if ((fd = open("/dev/mixer", O_RDWR))>=0) { ioctl(fd, MIXER_WRITE(SOUND_MIXER_MIC), &mic); ::close(fd); } } break; } } int qpe_sysBrightnessSteps() { #if defined(QT_QWS_IPAQ) return 255; #elif defined(QT_QWS_EBX) return 4; #else return 255; // ? #endif } |