Cleanups in input_joypad_driver.c

This commit is contained in:
twinaphex 2015-01-30 07:57:15 +01:00
parent 3d4be395ef
commit 7dd338f19d

View File

@ -118,6 +118,9 @@ const char* config_get_joypad_driver_options(void)
attr.i = 0;
if (!options_l)
return NULL;
for (i = 0; joypad_drivers[i]; i++)
{
const char *opt = joypad_drivers[i]->ident;
@ -127,6 +130,13 @@ const char* config_get_joypad_driver_options(void)
options = (char*)calloc(options_len, sizeof(char));
if (!options)
{
string_list_free(options_l);
options_l = NULL;
return NULL;
}
string_list_join_concat(options, options_len, options_l, "|");
string_list_free(options_l);