author | zecke <zecke> | 2004-09-21 16:47:16 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-21 16:47:16 (UTC) |
commit | 8d63da87b471780142f0d0431bbcb37c1afba646 (patch) (unidiff) | |
tree | 5cd367a8e33a5261fa3d9fe4397303967c13b0ab /libopie2/opiecore | |
parent | 2e877b93064d149ccafbbd86da55fbd244c3af4a (diff) | |
download | opie-8d63da87b471780142f0d0431bbcb37c1afba646.zip opie-8d63da87b471780142f0d0431bbcb37c1afba646.tar.gz opie-8d63da87b471780142f0d0431bbcb37c1afba646.tar.bz2 |
QT_NO_SOUND is defined at least on MacOS
so don't fail with error for them
-rw-r--r-- | libopie2/opiecore/device/odevice_ramses.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_ramses.cpp b/libopie2/opiecore/device/odevice_ramses.cpp index c75ea3a..a060695 100644 --- a/libopie2/opiecore/device/odevice_ramses.cpp +++ b/libopie2/opiecore/device/odevice_ramses.cpp | |||
@@ -91,53 +91,51 @@ void Ramses::init(const QString&) | |||
91 | OC(d->m_cpu_frequencies->append("354000"); ) // mem=118, run=236, turbo=354, PXbus=118 OC'd mem | 91 | OC(d->m_cpu_frequencies->append("354000"); ) // mem=118, run=236, turbo=354, PXbus=118 OC'd mem |
92 | d->m_cpu_frequencies->append("398099"); // mem= 99, run=199, turbo=398, PXbus= 99 | 92 | d->m_cpu_frequencies->append("398099"); // mem= 99, run=199, turbo=398, PXbus= 99 |
93 | d->m_cpu_frequencies->append("398100"); // mem= 99, run=398, turbo=398, PXbus=196 | 93 | d->m_cpu_frequencies->append("398100"); // mem= 99, run=398, turbo=398, PXbus=196 |
94 | OC(d->m_cpu_frequencies->append("471000"); ) // mem=118, run=471, turbo=471, PXbus=236 OC'd mem/core/bus | 94 | OC(d->m_cpu_frequencies->append("471000"); ) // mem=118, run=471, turbo=471, PXbus=236 OC'd mem/core/bus |
95 | } | 95 | } |
96 | 96 | ||
97 | 97 | ||
98 | void Ramses::playAlarmSound() | 98 | void Ramses::playAlarmSound() |
99 | { | 99 | { |
100 | #ifndef QT_NO_SOUND | 100 | #ifndef QT_NO_SOUND |
101 | static Sound snd ( "alarm" ); | 101 | static Sound snd ( "alarm" ); |
102 | if(!snd.isFinished()) | 102 | if(!snd.isFinished()) |
103 | return; | 103 | return; |
104 | 104 | ||
105 | changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd); | 105 | changeMixerForAlarm( 0, "/dev/sound/mixer" , &snd); |
106 | snd.play(); | 106 | snd.play(); |
107 | #else | ||
108 | #error QT_NO_SOUND defined | ||
109 | #endif | 107 | #endif |
110 | } | 108 | } |
111 | 109 | ||
112 | 110 | ||
113 | bool Ramses::suspend() | 111 | bool Ramses::suspend() |
114 | { | 112 | { |
115 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend | 113 | if ( !isQWS( ) ) // only qwsserver is allowed to suspend |
116 | return false; | 114 | return false; |
117 | 115 | ||
118 | sendSuspendmsg(); | 116 | sendSuspendmsg(); |
119 | ::sync(); | 117 | ::sync(); |
120 | 118 | ||
121 | int fd; | 119 | int fd; |
122 | if ((fd = ::open("/proc/sys/pm/suspend", O_WRONLY)) >= 0) { | 120 | if ((fd = ::open("/proc/sys/pm/suspend", O_WRONLY)) >= 0) { |
123 | char writeCommand[] = "1\n"; | 121 | char writeCommand[] = "1\n"; |
124 | ::write(fd, writeCommand, sizeof(writeCommand) ); | 122 | ::write(fd, writeCommand, sizeof(writeCommand) ); |
125 | ::close(fd); | 123 | ::close(fd); |
126 | } | 124 | } |
127 | 125 | ||
128 | ::usleep ( 200 * 1000 ); | 126 | ::usleep ( 200 * 1000 ); |
129 | return true; | 127 | return true; |
130 | } | 128 | } |
131 | 129 | ||
132 | 130 | ||
133 | bool Ramses::setDisplayBrightness(int bright) | 131 | bool Ramses::setDisplayBrightness(int bright) |
134 | { | 132 | { |
135 | //qDebug("Ramses::setDisplayBrightness(%d)", bright); | 133 | //qDebug("Ramses::setDisplayBrightness(%d)", bright); |
136 | bool res = false; | 134 | bool res = false; |
137 | int fd; | 135 | int fd; |
138 | 136 | ||
139 | // pwm1 brighness: 20 steps 500..0 (dunkel->hell) | 137 | // pwm1 brighness: 20 steps 500..0 (dunkel->hell) |
140 | 138 | ||
141 | if (bright > 255 ) | 139 | if (bright > 255 ) |
142 | bright = 255; | 140 | bright = 255; |
143 | if (bright < 0) | 141 | if (bright < 0) |