From c0f3c2dbd1d5d14457ac12136127233b3b08a237 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 4 Jun 2009 11:45:34 +0000 Subject: Code formatting in the gp2xwiz backend svn-id: r41167 --- backends/platform/gp2xwiz/gp2xwiz-hw.cpp | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'backends/platform/gp2xwiz/gp2xwiz-hw.cpp') diff --git a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp index 7133614a3e..c804b0d819 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp @@ -50,26 +50,21 @@ void deviceInit() { void deviceDeinit() { } -void mixerMoveVolume( int direction ) -{ - if( volumeLevel <= 10 ) - { - if( direction == VOLUME_UP ) volumeLevel += VOLUME_CHANGE_RATE/2; - if( direction == VOLUME_DOWN ) volumeLevel -= VOLUME_CHANGE_RATE/2; - } - else - { - if( direction == VOLUME_UP ) volumeLevel += VOLUME_CHANGE_RATE; - if( direction == VOLUME_DOWN ) volumeLevel -= VOLUME_CHANGE_RATE; +void mixerMoveVolume(int direction) { + if (volumeLevel <= 10) { + if (direction == VOLUME_UP) volumeLevel += VOLUME_CHANGE_RATE/2; + if (direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE/2; + } else { + if(direction == VOLUME_UP) volumeLevel += VOLUME_CHANGE_RATE; + if(direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE; } - if( volumeLevel < VOLUME_MIN ) volumeLevel = VOLUME_MIN; - if( volumeLevel > VOLUME_MAX ) volumeLevel = VOLUME_MAX; + if (volumeLevel < VOLUME_MIN) volumeLevel = VOLUME_MIN; + if (volumeLevel > VOLUME_MAX) volumeLevel = VOLUME_MAX; unsigned long soundDev = open("/dev/mixer", O_RDWR); - if(soundDev) - { + if(soundDev) { int vol = ((volumeLevel << 8) | volumeLevel); ioctl(soundDev, SOUND_MIXER_WRITE_PCM, &vol); close(soundDev); -- cgit v1.2.3