author | zecke <zecke> | 2004-09-06 10:57:48 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-06 10:57:48 (UTC) |
commit | 8bf99aaa1b31e770b21b7bf50407a650a8f5d646 (patch) (side-by-side diff) | |
tree | 4aadf040fb94085f54080c2b2b112ab5ff236b24 | |
parent | 97a40bb7f35a8323dd99712bf014387add283177 (diff) | |
download | opie-8bf99aaa1b31e770b21b7bf50407a650a8f5d646.zip opie-8bf99aaa1b31e770b21b7bf50407a650a8f5d646.tar.gz opie-8bf99aaa1b31e770b21b7bf50407a650a8f5d646.tar.bz2 |
GCC 2.95 compile fix for switch/case statement
-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 127fee9..64fa199 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -278,108 +278,111 @@ void Zaurus::initButtons() //#define SHARP_PDA_ERRORSOUND 5 /* error occurred */ //#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */ //#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */ //#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */ //#define SHARP_PDA_APPSTART 9 /* application start */ //#define SHARP_PDA_APPQUIT 10 /* application ends */ //#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ //#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */ //#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */ //#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */ // #define SHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) #define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) #define SHARP_IOCTL_GET_ROTATION 0x413c typedef struct sharp_led_status { int which; /* select which LED status is wanted. */ int status; /* set new led status if you call SHARP_LED_SETSTATUS */ } sharp_led_status; #define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ #define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ #define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ #define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ // #include <asm/sharp_apm.h> // including kernel headers is evil ... #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) #define APM_EVT_POWER_BUTTON (1 << 0) #define FL_IOCTL_STEP_CONTRAST 100 void Zaurus::buzzer ( int sound ) { #ifndef QT_NO_SOUND Sound *snd = 0; // Not all devices have real sound if ( d->m_model == Model_Zaurus_SLC7x0 || d->m_model == Model_Zaurus_SLB600 ){ switch ( sound ){ - case SHARP_BUZ_TOUCHSOUND: + case SHARP_BUZ_TOUCHSOUND: { static Sound touch_sound("touchsound"); snd = &touch_sound; + } break; - case SHARP_BUZ_KEYSOUND: + case SHARP_BUZ_KEYSOUND: { static Sound key_sound( "keysound" ); snd = &key_sound; + } break; case SHARP_BUZ_SCHEDULE_ALARM: - default: + default: { static Sound alarm_sound("alarm"); snd = &alarm_sound; + } break; } } // If a soundname is defined, we expect that this device has // sound capabilities.. Otherwise we expect to have the buzzer // device.. if ( snd ){ changeMixerForAlarm( 0, "/dev/sound/mixer", snd ); snd-> play(); } else { int fd = ::open ( "/dev/sharp_buz", O_WRONLY|O_NONBLOCK ); if ( fd >= 0 ) { ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); ::close ( fd ); } } #endif } void Zaurus::playAlarmSound() { buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); } void Zaurus::playTouchSound() { buzzer ( SHARP_BUZ_TOUCHSOUND ); } void Zaurus::playKeySound() { buzzer ( SHARP_BUZ_KEYSOUND ); } QValueList <OLed> Zaurus::ledList() const { QValueList <OLed> vl; vl << Led_Mail; return vl; } QValueList <OLedState> Zaurus::ledStateList ( OLed l ) const { |