mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 17:29:11 +00:00
Code formatting in the gp2xwiz backend
svn-id: r41167
This commit is contained in:
parent
6b1110b82d
commit
c0f3c2dbd1
@ -95,39 +95,37 @@ void OSystem_GP2XWIZ::moveStick() {
|
||||
if ((stickBtn[0])||(stickBtn[2])||(stickBtn[4])||(stickBtn[6]))
|
||||
stickBtn[1] = stickBtn[3] = stickBtn[5] = stickBtn[7] = 0;
|
||||
|
||||
if ((stickBtn[1])||(stickBtn[2])||(stickBtn[3])){
|
||||
if (_km.x_down_count!=2){
|
||||
if ((stickBtn[1])||(stickBtn[2])||(stickBtn[3])) {
|
||||
if (_km.x_down_count!=2) {
|
||||
_km.x_vel = -1;
|
||||
_km.x_down_count = 1;
|
||||
}else
|
||||
} else
|
||||
_km.x_vel = -4;
|
||||
} else if ((stickBtn[5])||(stickBtn[6])||(stickBtn[7])){
|
||||
if (_km.x_down_count!=2){
|
||||
} else if ((stickBtn[5])||(stickBtn[6])||(stickBtn[7])) {
|
||||
if (_km.x_down_count!=2) {
|
||||
_km.x_vel = 1;
|
||||
_km.x_down_count = 1;
|
||||
}else
|
||||
} else
|
||||
_km.x_vel = 4;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
_km.x_vel = 0;
|
||||
_km.x_down_count = 0;
|
||||
}
|
||||
|
||||
|
||||
if ((stickBtn[0])||(stickBtn[1])||(stickBtn[7])){
|
||||
if (_km.y_down_count!=2){
|
||||
if ((stickBtn[0])||(stickBtn[1])||(stickBtn[7])) {
|
||||
if (_km.y_down_count!=2) {
|
||||
_km.y_vel = -1;
|
||||
_km.y_down_count = 1;
|
||||
}else
|
||||
} else
|
||||
_km.y_vel = -4;
|
||||
} else if ((stickBtn[3])||(stickBtn[4])||(stickBtn[5])){
|
||||
if (_km.y_down_count!=2){
|
||||
} else if ((stickBtn[3])||(stickBtn[4])||(stickBtn[5])) {
|
||||
if (_km.y_down_count!=2) {
|
||||
_km.y_vel = 1;
|
||||
_km.y_down_count = 1;
|
||||
}else
|
||||
} else
|
||||
_km.y_vel = 4;
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
_km.y_vel = 0;
|
||||
_km.y_down_count = 0;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -23,7 +23,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <common/scummsys.h>
|
||||
#include "common/scummsys.h"
|
||||
#include <SDL/SDL.h>
|
||||
|
||||
#include "backends/platform/gp2xwiz/gp2xwiz-sdl.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user