mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Use C-style comments
This commit is contained in:
parent
805c2ad529
commit
7a490aa6d6
@ -705,7 +705,9 @@ void input_poll_overlay(input_overlay_t *ol, float opacity, unsigned analog_dpad
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if(settings->bools.input_overlay_show_physical_inputs){
|
||||
|
||||
if(settings->bools.input_overlay_show_physical_inputs)
|
||||
{
|
||||
button_pressed = input_overlay_add_inputs(ol, settings->uints.input_overlay_show_physical_inputs_port, analog_dpad_mode);
|
||||
}
|
||||
if (button_pressed || polled)
|
||||
@ -779,23 +781,29 @@ static bool input_overlay_add_inputs(input_overlay_t *ol,
|
||||
case OVERLAY_TYPE_BUTTONS:
|
||||
mask = desc->key_mask;
|
||||
id = RETRO_DEVICE_ID_JOYPAD_B;
|
||||
//Need to check all bits in the mask, multiple ones can be pressed
|
||||
/* Need to check all bits in the mask,
|
||||
* multiple ones can be pressed */
|
||||
current_button_pressed = false;
|
||||
while(mask){
|
||||
//Get the next button ID
|
||||
while(mask && (mask & 1) == 0){
|
||||
while(mask)
|
||||
{
|
||||
/* Get the next button ID */
|
||||
while(mask && (mask & 1) == 0)
|
||||
{
|
||||
id+=1;
|
||||
mask = mask >> 1;
|
||||
}
|
||||
//light up the button if pressed
|
||||
if(input_state(port, RETRO_DEVICE_JOYPAD, 0, id)){
|
||||
/* Light up the button if pressed */
|
||||
if(input_state(port, RETRO_DEVICE_JOYPAD, 0, id))
|
||||
{
|
||||
current_button_pressed = true;
|
||||
desc->updated = true;
|
||||
|
||||
id+=1;
|
||||
mask = mask >> 1;
|
||||
}else{
|
||||
//One of the buttons not pressed
|
||||
}
|
||||
else
|
||||
{
|
||||
/* One of the buttons not pressed */
|
||||
current_button_pressed = false;
|
||||
desc->updated = false;
|
||||
break;
|
||||
@ -826,7 +834,8 @@ static bool input_overlay_add_inputs(input_overlay_t *ol,
|
||||
}
|
||||
break;
|
||||
case OVERLAY_TYPE_KEYBOARD:
|
||||
if(input_state(port, RETRO_DEVICE_KEYBOARD, 0, desc->key_mask)){
|
||||
if(input_state(port, RETRO_DEVICE_KEYBOARD, 0, desc->key_mask))
|
||||
{
|
||||
desc->updated = true;
|
||||
button_pressed = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user