mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Create STRING_LIST_CORES
This commit is contained in:
parent
2dd30f743d
commit
5f8cb99282
@ -30,6 +30,7 @@
|
|||||||
#include "location/location_driver.h"
|
#include "location/location_driver.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "general.h"
|
||||||
#include "gfx/video_driver.h"
|
#include "gfx/video_driver.h"
|
||||||
#include "input/input_driver.h"
|
#include "input/input_driver.h"
|
||||||
#include "input/input_hid_driver.h"
|
#include "input/input_hid_driver.h"
|
||||||
@ -44,6 +45,7 @@ const char *string_list_special_new(enum string_list_type type)
|
|||||||
unsigned i;
|
unsigned i;
|
||||||
char *options = NULL;
|
char *options = NULL;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
global_t *global = global_get_ptr();
|
||||||
struct string_list *s = string_list_new();
|
struct string_list *s = string_list_new();
|
||||||
|
|
||||||
attr.i = 0;
|
attr.i = 0;
|
||||||
@ -148,6 +150,19 @@ const char *string_list_special_new(enum string_list_type type)
|
|||||||
string_list_append(s, opt, attr);
|
string_list_append(s, opt, attr);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case STRING_LIST_CORES:
|
||||||
|
for (i = 0; i < core_info_list_num_info_files(global->core_info.list); i++)
|
||||||
|
{
|
||||||
|
const core_info_t *info = (const core_info_t*)&global->core_info.list->list[i];
|
||||||
|
const char *opt = info ? info->display_name : NULL;
|
||||||
|
|
||||||
|
if (!opt)
|
||||||
|
goto end;
|
||||||
|
|
||||||
|
len += strlen(opt) + 1;
|
||||||
|
string_list_append(s, opt, attr);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case STRING_LIST_NONE:
|
case STRING_LIST_NONE:
|
||||||
default:
|
default:
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -28,7 +28,8 @@ enum string_list_type
|
|||||||
STRING_LIST_INPUT_DRIVERS,
|
STRING_LIST_INPUT_DRIVERS,
|
||||||
STRING_LIST_INPUT_JOYPAD_DRIVERS,
|
STRING_LIST_INPUT_JOYPAD_DRIVERS,
|
||||||
STRING_LIST_INPUT_HID_DRIVERS,
|
STRING_LIST_INPUT_HID_DRIVERS,
|
||||||
STRING_LIST_RECORD_DRIVERS
|
STRING_LIST_RECORD_DRIVERS,
|
||||||
|
STRING_LIST_CORES
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *string_list_special_new(enum string_list_type type);
|
const char *string_list_special_new(enum string_list_type type);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user