summaryrefslogtreecommitdiff
path: root/core/applets
Unidiff
Diffstat (limited to 'core/applets') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/vmemo/vmemo.cpp10
-rw-r--r--core/applets/vtapplet/vt.cpp8
2 files changed, 15 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
@@ -412,8 +412,12 @@ int VMemo::openDSP() {
412 channels=1; //zaurus has one input channel 412 channels=1; //zaurus has one input channel
413 } else { 413 } else {
414#ifdef QT_QWS_DEVFS
415 dsp = open("/dev/sound/dsp", O_RDONLY);
416#else
414 dsp = open("/dev/dsp", O_RDONLY); 417 dsp = open("/dev/dsp", O_RDONLY);
418#endif
415 } 419 }
416 420
417 if(dsp == -1) { 421 if (dsp == -1) {
418 msgLabel->close(); 422 msgLabel->close();
419 msgLabel=0; 423 msgLabel=0;
@@ -422,6 +426,6 @@ int VMemo::openDSP() {
422 perror("open(\"/dev/dsp\")"); 426 perror("open(\"/dev/dsp\")");
423 errorMsg="open(\"/dev/dsp\")\n "+(QString)strerror(errno); 427 errorMsg="open(\"/dev/dsp\")\n "+(QString)strerror(errno);
424 QMessageBox::critical(0, "vmemo", errorMsg, "Abort"); 428 QMessageBox::critical(0, "vmemo", errorMsg, "Abort");
425 return -1; 429 return -1;
426 } 430 }
427 431
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
@@ -81,5 +81,9 @@ QPopupMenu *VTApplet::popup ( QWidget* parent ) const
81 81
82 struct vt_stat vtstat; 82 struct vt_stat vtstat;
83#ifdef QT_QWS_DEVFS
84 int fd = ::open( "/dev/vc/0", O_RDWR );
85#else
83 int fd = ::open( "/dev/tty0", O_RDWR ); 86 int fd = ::open( "/dev/tty0", O_RDWR );
87#endif
84 if ( fd == -1 ) return 0; 88 if ( fd == -1 ) return 0;
85 if ( ioctl( fd, VT_GETSTATE, &vtstat ) == -1 ) return 0; 89 if ( ioctl( fd, VT_GETSTATE, &vtstat ) == -1 ) return 0;
@@ -105,5 +109,9 @@ void VTApplet::changeVT( int index )
105 //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl; 109 //odebug << "VTApplet::changeVT( " << index-500 << " )" << oendl;
106 110
111#ifdef QT_QWS_DEVFS
112 int fd = ::open("/dev/vc/0", O_RDWR);
113#else
107 int fd = ::open("/dev/tty0", O_RDWR); 114 int fd = ::open("/dev/tty0", O_RDWR);
115#endif
108 if ( fd == -1 ) return; 116 if ( fd == -1 ) return;
109 ioctl( fd, VT_ACTIVATE, index-500 ); 117 ioctl( fd, VT_ACTIVATE, index-500 );