Can now load cht files from 'Load Cheat File'

This commit is contained in:
twinaphex 2014-12-16 00:02:46 +01:00
parent be5a76cb91
commit fdc1cf5422

View File

@ -331,15 +331,27 @@ static int action_ok_cheat_file_load(const char *path,
const char *label, unsigned type, size_t idx)
{
const char *menu_path = NULL;
char shader_path[PATH_MAX];
char cheat_path[PATH_MAX];
if (!driver.menu)
return -1;
(void)shader_path;
(void)cheat_path;
(void)menu_path;
menu_list_get_last_stack(driver.menu->menu_list, &menu_path, NULL,
NULL);
fill_pathname_join(cheat_path, menu_path, path, sizeof(cheat_path));
RARCH_LOG("menu path is: %s\n", menu_path);
if (g_extern.cheat)
cheat_manager_free(g_extern.cheat);
g_extern.cheat = cheat_manager_load(cheat_path);
if (!g_extern.cheat)
return -1;
menu_list_flush_stack_by_needle(driver.menu->menu_list, "core_cheat_options");
return 0;