Revert "(task_autodetect.c) Set input_swap_override later on"
This reverts commit 582573f324
.
This commit is contained in:
parent
582573f324
commit
75a5af26c6
|
@ -49,8 +49,6 @@ typedef struct autoconfig_params
|
||||||
int32_t pid;
|
int32_t pid;
|
||||||
uint32_t max_users;
|
uint32_t max_users;
|
||||||
char autoconfig_directory[4096];
|
char autoconfig_directory[4096];
|
||||||
bool set_swap;
|
|
||||||
bool swap_val;
|
|
||||||
} autoconfig_params_t;
|
} autoconfig_params_t;
|
||||||
|
|
||||||
static bool input_autoconfigured[MAX_USERS];
|
static bool input_autoconfigured[MAX_USERS];
|
||||||
|
@ -165,8 +163,8 @@ static void input_autoconfigure_joypad_add(config_file_t *conf,
|
||||||
remote_is_bound = true;
|
remote_is_bound = true;
|
||||||
if (params->idx == 0)
|
if (params->idx == 0)
|
||||||
{
|
{
|
||||||
params->set_swap = true;
|
settings_t *settings = config_get_ptr();
|
||||||
params->swap_val = true;
|
configuration_set_bool(settings, settings->bools.input_swap_override, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -182,8 +180,8 @@ static void input_autoconfigure_joypad_add(config_file_t *conf,
|
||||||
{
|
{
|
||||||
if (config_get_bool(conf, "input_swap_override", &tmp))
|
if (config_get_bool(conf, "input_swap_override", &tmp))
|
||||||
{
|
{
|
||||||
params->set_swap = true;
|
settings_t *settings = config_get_ptr();
|
||||||
params->swap_val = tmp;
|
configuration_set_bool(settings, settings->bools.input_swap_override, tmp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -302,18 +300,6 @@ static bool input_autoconfigure_joypad_from_conf_internal(
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void input_autoconfigure_connect_finished(void *task_data,
|
|
||||||
void *user_data, const char *error)
|
|
||||||
{
|
|
||||||
autoconfig_params_t *params = (autoconfig_params_t*)task_data;
|
|
||||||
|
|
||||||
if (params && params->set_swap)
|
|
||||||
{
|
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
configuration_set_bool(settings, settings->bools.input_swap_override, params->swap_val);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void input_autoconfigure_connect_handler(retro_task_t *task)
|
static void input_autoconfigure_connect_handler(retro_task_t *task)
|
||||||
{
|
{
|
||||||
autoconfig_params_t *params = (autoconfig_params_t*)task->state;
|
autoconfig_params_t *params = (autoconfig_params_t*)task->state;
|
||||||
|
@ -481,9 +467,8 @@ bool input_autoconfigure_connect(
|
||||||
|
|
||||||
input_autoconfigured[state->idx] = false;
|
input_autoconfigured[state->idx] = false;
|
||||||
|
|
||||||
task->state = state;
|
task->state = state;
|
||||||
task->handler = input_autoconfigure_connect_handler;
|
task->handler = input_autoconfigure_connect_handler;
|
||||||
task->callback = input_autoconfigure_connect_finished;
|
|
||||||
|
|
||||||
task_queue_ctl(TASK_QUEUE_CTL_PUSH, task);
|
task_queue_ctl(TASK_QUEUE_CTL_PUSH, task);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue