summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp10
-rw-r--r--core/applets/vtapplet/vt.cpp8
-rw-r--r--libopie/odevice.cpp4
-rw-r--r--libopie2/opiemm/osoundsystem.cpp5
-rw-r--r--library/qpeapplication.cpp16
5 files changed, 40 insertions, 3 deletions
diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp
index e747a19..07ef15c 100644
--- a/core/applets/vmemo/vmemo.cpp
+++ b/core/applets/vmemo/vmemo.cpp
@@ -413,6 +413,10 @@ int VMemo::openDSP() {
} else {
+#ifdef QT_QWS_DEVFS
+ dsp = open("/dev/sound/dsp", O_RDONLY);
+#else
dsp = open("/dev/dsp", O_RDONLY);
+#endif
}
- if(dsp == -1) {
+ if (dsp == -1) {
msgLabel->close();
@@ -423,4 +427,4 @@ int VMemo::openDSP() {
errorMsg="open(\"/dev/dsp\")\n "+(QString)strerror(errno);
- QMessageBox::critical(0, "vmemo", errorMsg, "Abort");
- return -1;
+ QMessageBox::critical(0, "vmemo", errorMsg, "Abort");
+ return -1;
}
diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp
index aec63c3..7832ee0 100644
--- a/core/applets/vtapplet/vt.cpp
+++ b/core/applets/vtapplet/vt.cpp
@@ -82,3 +82,7 @@ QPopupMenu *VTApplet::popup ( QWidget* parent ) const
struct vt_stat vtstat;
+#ifdef QT_QWS_DEVFS
+ int fd = ::open( "/dev/vc/0", O_RDWR );
+#else
int fd = ::open( "/dev/tty0", O_RDWR );
+#endif
if ( fd == -1 ) return 0;
@@ -106,3 +110,7 @@ void VTApplet::changeVT( int index )
+#ifdef QT_QWS_DEVFS
+ int fd = ::open("/dev/vc/0", O_RDWR);
+#else
int fd = ::open("/dev/tty0", O_RDWR);
+#endif
if ( fd == -1 ) return;
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp
index 21070bf..9d0bbbf 100644
--- a/libopie/odevice.cpp
+++ b/libopie/odevice.cpp
@@ -597,3 +597,7 @@ bool ODevice::setDisplayStatus ( bool on )
+#ifdef QT_QWS_DEVFS
+ if (( fd = ::open ( "/dev/fb/0", O_RDWR )) >= 0 ) {
+#else
if (( fd = ::open ( "/dev/fb0", O_RDWR )) >= 0 ) {
+#endif
res = ( ::ioctl ( fd, FBIOBLANK, on ? VESA_NO_BLANKING : VESA_POWERDOWN ) == 0 );
diff --git a/libopie2/opiemm/osoundsystem.cpp b/libopie2/opiemm/osoundsystem.cpp
index 763ff65..17e5cb0 100644
--- a/libopie2/opiemm/osoundsystem.cpp
+++ b/libopie2/opiemm/osoundsystem.cpp
@@ -139,4 +139,9 @@ void OSoundCard::init()
{
+#ifdef QT_QWS_DEVFS
+ _audio = new OAudioInterface( this, "/dev/sound/dsp" );
+ _mixer = new OMixerInterface( this, "/dev/sound/mixer" );
+#else
_audio = new OAudioInterface( this, "/dev/dsp" );
_mixer = new OMixerInterface( this, "/dev/mixer" );
+#endif
}
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index c6d9cfd..ca90427 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -567,3 +567,7 @@ static void setVolume( int t = 0, int percent = -1 )
int fd = 0;
+#ifdef QT_QWS_DEVFS
+ if ( ( fd = open( "/dev/sound/mixer", O_RDWR ) ) >= 0 ) {
+#else
if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) {
+#endif
int vol = muted ? 0 : percent;
@@ -592,3 +596,7 @@ static void setMic( int t = 0, int percent = -1 )
int mic = micMuted ? 0 : percent;
+#ifdef QT_QWS_DEVFS
+ if ( ( fd = open( "/dev/sound/mixer", O_RDWR ) ) >= 0 ) {
+#else
if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) {
+#endif
ioctl( fd, MIXER_WRITE( SOUND_MIXER_MIC ), &mic );
@@ -615,3 +623,7 @@ static void setBass( int t = 0, int percent = -1 )
int bass = percent;
+#ifdef QT_QWS_DEVFS
+ if ( ( fd = open( "/dev/sound/mixer", O_RDWR ) ) >= 0 ) {
+#else
if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) {
+#endif
ioctl( fd, MIXER_WRITE( SOUND_MIXER_BASS ), &bass );
@@ -638,3 +650,7 @@ static void setTreble( int t = 0, int percent = -1 )
int treble = percent;
+#ifdef QT_QWS_DEVFS
+ if ( ( fd = open( "/dev/sound/mixer", O_RDWR ) ) >= 0 ) {
+#else
if ( ( fd = open( "/dev/mixer", O_RDWR ) ) >= 0 ) {
+#endif
ioctl( fd, MIXER_WRITE( SOUND_MIXER_TREBLE ), &treble );