45 lines
1.4 KiB
C++
45 lines
1.4 KiB
C++
#include "service.h"
|
|
|
|
// Comprueba el botón de servicio del controlador "index"
|
|
int checkServiceButton(Input *input, int index)
|
|
{
|
|
if (input->checkInput(input_service, INPUT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
|
{
|
|
if (input->checkInput(input_start, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
|
{
|
|
return SERVICE_EXIT;
|
|
}
|
|
|
|
else if (input->checkInput(input_fire_left, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
|
{
|
|
return SERVICE_CONFIG;
|
|
}
|
|
|
|
else if (input->checkInput(input_fire_center, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
|
{
|
|
return SERVICE_SHADERS;
|
|
}
|
|
|
|
else if (input->checkInput(input_fire_right, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
|
{
|
|
return SERVICE_PAUSE;
|
|
}
|
|
|
|
else if (input->checkInput(input_up, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
|
{
|
|
return SERVICE_SWAP_CONTROLLERS;
|
|
}
|
|
|
|
else if (input->checkInput(input_down, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
|
{
|
|
return SERVICE_RESET;
|
|
}
|
|
|
|
else if (input->checkInput(input_left, INPUT_DO_NOT_ALLOW_REPEAT, INPUT_USE_GAMECONTROLLER, index))
|
|
{
|
|
return SERVICE_MUTE;
|
|
}
|
|
}
|
|
|
|
return SERVICE_NULL;
|
|
} |