Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
oshaboy committed Jan 20, 2025
1 parent 08e8341 commit 0cac7a4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
6 changes: 3 additions & 3 deletions configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -6464,11 +6464,10 @@ void input_config_set_autoconfig_binds(unsigned port, void *data)
for (i = 0; i < RETROPAD_RETRO_SENSOR_LAST; i++){
/* I am the implementor I get to choose the implementation details */
char str[256];
unsigned bind;

get_config_name_for_sensor(str, sizeof(str), i);
bind=input_config_parse_sensor (i,str, config);
config_get_ptr()->uints.input_sensor_ids[port][i]=bind;
config_get_ptr()->uints.input_sensor_ids[port][i]=
input_config_parse_sensor (i,str, config);
}
}

Expand Down Expand Up @@ -6705,6 +6704,7 @@ unsigned input_config_parse_sensor(
if (config_get_array(conf, s, tmp, sizeof(tmp)))
{
if (strcmp(tmp, "nul") != 0){
RARCH_DBG("tmp: %s\n", tmp);
if ((*tmp>='0') && (*tmp<='5')){
if (strcmp(tmp+1,"inv") == 0)
return (((*tmp)-'0')*2)+1;
Expand Down
19 changes: 0 additions & 19 deletions input/drivers/udev_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -4118,25 +4118,6 @@ static bool udev_set_sensor_state(void *data, unsigned port, enum retro_sensor_a
return false;
}

static float udev_get_sensor_input(void *data, unsigned port, unsigned id)
{
udev_input_t *udev = (udev_input_t*)data;

if (!udev)
return 0.0f;

switch (id)
{
case RETRO_SENSOR_ILLUMINANCE:
if (udev->illuminance_sensor)
return linux_get_illuminance_reading(udev->illuminance_sensor);
default:
break;
}

return 0.0f;
}

static bool open_devices(udev_input_t *udev,
enum udev_input_dev_type type, device_handle_cb cb)
{
Expand Down

0 comments on commit 0cac7a4

Please sign in to comment.