Merge branch 'master' of https://github.com/crazyquark/RetroArch
This commit is contained in:
commit
c0242b324c
1
file.c
1
file.c
|
@ -288,6 +288,7 @@ bool load_state(const char *path)
|
||||||
for (i = 0; i < num_blocks; i++)
|
for (i = 0; i < num_blocks; i++)
|
||||||
free(blocks[i].data);
|
free(blocks[i].data);
|
||||||
free(blocks);
|
free(blocks);
|
||||||
|
free(buf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1118,31 +1118,28 @@ static void *lakka_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
menu = (menu_handle_t*)calloc(1, sizeof(*menu));
|
menu = (menu_handle_t*)calloc(1, sizeof(*menu));
|
||||||
|
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
menu->userdata = (lakka_handle_t*)calloc(1, sizeof(lakka_handle_t));
|
||||||
|
if (!menu->userdata)
|
||||||
|
{
|
||||||
|
free(menu);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
lakka_init_core_info(menu);
|
lakka_init_core_info(menu);
|
||||||
|
|
||||||
menu->userdata = (lakka_handle_t*)calloc(1, sizeof(lakka_handle_t));
|
|
||||||
|
|
||||||
if (!menu->userdata)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
lakka = (lakka_handle_t*)menu->userdata;
|
lakka = (lakka_handle_t*)menu->userdata;
|
||||||
|
|
||||||
if (!lakka)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
lakka->num_categories = g_extern.core_info ? (g_extern.core_info->count + 1) : 1;
|
lakka->num_categories = g_extern.core_info ? (g_extern.core_info->count + 1) : 1;
|
||||||
|
|
||||||
lakka->categories = (menu_category_t*)
|
lakka->categories = (menu_category_t*)
|
||||||
calloc(lakka->num_categories, sizeof(menu_category_t));
|
calloc(lakka->num_categories, sizeof(menu_category_t));
|
||||||
|
|
||||||
if (!lakka->categories)
|
if (!lakka->categories)
|
||||||
{
|
{
|
||||||
|
free(menu->userdata);
|
||||||
free(menu);
|
free(menu);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -408,17 +408,19 @@ static void *rgui_init(void)
|
||||||
menu->userdata = (rgui_handle_t*)calloc(1, sizeof(rgui_handle_t));
|
menu->userdata = (rgui_handle_t*)calloc(1, sizeof(rgui_handle_t));
|
||||||
|
|
||||||
if (!menu->userdata)
|
if (!menu->userdata)
|
||||||
|
{
|
||||||
|
free(menu);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
rgui_handle_t *rgui = (rgui_handle_t*)menu->userdata;
|
|
||||||
|
|
||||||
if (!rgui)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
menu->frame_buf = (uint16_t*)malloc(400 * 240 * sizeof(uint16_t));
|
menu->frame_buf = (uint16_t*)malloc(400 * 240 * sizeof(uint16_t));
|
||||||
|
|
||||||
if (!menu->frame_buf)
|
if (!menu->frame_buf)
|
||||||
|
{
|
||||||
|
free(menu->userdata);
|
||||||
|
free(menu);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
menu->width = 320;
|
menu->width = 320;
|
||||||
menu->height = 240;
|
menu->height = 240;
|
||||||
|
@ -431,6 +433,9 @@ static void *rgui_init(void)
|
||||||
RARCH_ERR("No font bitmap or binary, abort");
|
RARCH_ERR("No font bitmap or binary, abort");
|
||||||
|
|
||||||
rarch_main_command(RARCH_CMD_QUIT_RETROARCH);
|
rarch_main_command(RARCH_CMD_QUIT_RETROARCH);
|
||||||
|
|
||||||
|
free(menu->userdata);
|
||||||
|
free(menu);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,10 @@ static void *rmenu_init(void)
|
||||||
menu_texture = (struct texture_image*)calloc(1, sizeof(*menu_texture));
|
menu_texture = (struct texture_image*)calloc(1, sizeof(*menu_texture));
|
||||||
|
|
||||||
if (!menu_texture)
|
if (!menu_texture)
|
||||||
|
{
|
||||||
|
free(menu);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
|
@ -575,13 +575,13 @@ static void *xmb_init(void)
|
||||||
menu->userdata = (xmb_handle_t*)calloc(1, sizeof(xmb_handle_t));
|
menu->userdata = (xmb_handle_t*)calloc(1, sizeof(xmb_handle_t));
|
||||||
|
|
||||||
if (!menu->userdata)
|
if (!menu->userdata)
|
||||||
|
{
|
||||||
|
free(menu);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
xmb = (xmb_handle_t*)menu->userdata;
|
xmb = (xmb_handle_t*)menu->userdata;
|
||||||
|
|
||||||
if (!xmb)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
xmb->x = 0;
|
xmb->x = 0;
|
||||||
xmb->alpha = 1.0f;
|
xmb->alpha = 1.0f;
|
||||||
xmb->depth = 1;
|
xmb->depth = 1;
|
||||||
|
|
|
@ -31,10 +31,14 @@ void add_tween(float duration, float target_value, float* subject,
|
||||||
easingFunc easing, tweenCallback callback)
|
easingFunc easing, tweenCallback callback)
|
||||||
{
|
{
|
||||||
tween_t *tween = NULL;
|
tween_t *tween = NULL;
|
||||||
tweens = (tween_t*)
|
tween_t *temp_tweens = (tween_t*)
|
||||||
realloc(tweens, (numtweens + 1) * sizeof(tween_t));
|
realloc(tweens, (numtweens + 1) * sizeof(tween_t));
|
||||||
|
|
||||||
if (!tweens) /* Realloc failed. */
|
if (temp_tweens)
|
||||||
|
{
|
||||||
|
tweens = temp_tweens;
|
||||||
|
}
|
||||||
|
else /* Realloc failed. */
|
||||||
{
|
{
|
||||||
tween_free(tweens);
|
tween_free(tweens);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -67,9 +67,7 @@ static void menu_environment_get(int *argc, char *argv[],
|
||||||
if (!g_extern.has_set_verbosity)
|
if (!g_extern.has_set_verbosity)
|
||||||
wrap_args->verbose = g_extern.verbosity;
|
wrap_args->verbose = g_extern.verbosity;
|
||||||
wrap_args->config_path = *g_extern.config_path ? g_extern.config_path : NULL;
|
wrap_args->config_path = *g_extern.config_path ? g_extern.config_path : NULL;
|
||||||
if (!g_extern.has_set_save_path)
|
|
||||||
wrap_args->sram_path = *g_extern.savefile_dir ? g_extern.savefile_dir : NULL;
|
wrap_args->sram_path = *g_extern.savefile_dir ? g_extern.savefile_dir : NULL;
|
||||||
if (!g_extern.has_set_state_path)
|
|
||||||
wrap_args->state_path = *g_extern.savestate_dir ? g_extern.savestate_dir : NULL;
|
wrap_args->state_path = *g_extern.savestate_dir ? g_extern.savestate_dir : NULL;
|
||||||
wrap_args->content_path = *g_extern.fullpath ? g_extern.fullpath : NULL;
|
wrap_args->content_path = *g_extern.fullpath ? g_extern.fullpath : NULL;
|
||||||
if (!g_extern.has_set_libretro)
|
if (!g_extern.has_set_libretro)
|
||||||
|
|
|
@ -51,6 +51,9 @@ void rarch_playlist_load_content(content_playlist_t *playlist,
|
||||||
index, &path, &core_path, NULL);
|
index, &path, &core_path, NULL);
|
||||||
|
|
||||||
strlcpy(g_settings.libretro, core_path, sizeof(g_settings.libretro));
|
strlcpy(g_settings.libretro, core_path, sizeof(g_settings.libretro));
|
||||||
|
|
||||||
|
driver.menu->load_no_content = (path) ? false : true;
|
||||||
|
|
||||||
rarch_environment_cb(RETRO_ENVIRONMENT_EXEC, (void*)path);
|
rarch_environment_cb(RETRO_ENVIRONMENT_EXEC, (void*)path);
|
||||||
|
|
||||||
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
rarch_main_command(RARCH_CMD_LOAD_CORE);
|
||||||
|
|
|
@ -60,9 +60,15 @@ static void* hidpad_ps3_connect(void *connect_data, uint32_t slot, send_control_
|
||||||
struct hidpad_ps3_data* device = (struct hidpad_ps3_data*)
|
struct hidpad_ps3_data* device = (struct hidpad_ps3_data*)
|
||||||
calloc(1, sizeof(struct hidpad_ps3_data));
|
calloc(1, sizeof(struct hidpad_ps3_data));
|
||||||
|
|
||||||
if (!device || !connection)
|
if (!device)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (!connection)
|
||||||
|
{
|
||||||
|
free(device);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
device->connection = connection;
|
device->connection = connection;
|
||||||
device->slot = slot;
|
device->slot = slot;
|
||||||
device->send_control = ptr;
|
device->send_control = ptr;
|
||||||
|
|
|
@ -54,9 +54,15 @@ static void* hidpad_ps4_connect(void *connect_data, uint32_t slot, send_control_
|
||||||
struct hidpad_ps4_data* device = (struct hidpad_ps4_data*)
|
struct hidpad_ps4_data* device = (struct hidpad_ps4_data*)
|
||||||
calloc(1, sizeof(struct hidpad_ps4_data));
|
calloc(1, sizeof(struct hidpad_ps4_data));
|
||||||
|
|
||||||
if (!device || !connection)
|
if (!device)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (!connection)
|
||||||
|
{
|
||||||
|
free(device);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
device->connection = connection;
|
device->connection = connection;
|
||||||
device->slot = slot;
|
device->slot = slot;
|
||||||
device->send_control = ptr;
|
device->send_control = ptr;
|
||||||
|
|
|
@ -463,9 +463,15 @@ static void* hidpad_wii_connect(void *data, uint32_t slot,
|
||||||
struct wiimote_t *device = (struct wiimote_t*)
|
struct wiimote_t *device = (struct wiimote_t*)
|
||||||
calloc(1, sizeof(struct wiimote_t));
|
calloc(1, sizeof(struct wiimote_t));
|
||||||
|
|
||||||
if (!device || !connection)
|
if (!device)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (!connection)
|
||||||
|
{
|
||||||
|
free(device);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
device->connection = connection;
|
device->connection = connection;
|
||||||
device->unid = slot;
|
device->unid = slot;
|
||||||
device->state = WIIMOTE_STATE_CONNECTED;
|
device->state = WIIMOTE_STATE_CONNECTED;
|
||||||
|
|
|
@ -4276,16 +4276,6 @@ bool setting_data_append_list_path_options(
|
||||||
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR);
|
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
CONFIG_PATH(
|
|
||||||
g_settings.libretro,
|
|
||||||
"libretro_path",
|
|
||||||
"Libretro Path",
|
|
||||||
"",
|
|
||||||
group_info.name,
|
|
||||||
subgroup_info.name,
|
|
||||||
general_write_handler,
|
|
||||||
general_read_handler) ;
|
|
||||||
settings_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY);
|
|
||||||
|
|
||||||
CONFIG_DIR(
|
CONFIG_DIR(
|
||||||
g_settings.libretro_directory,
|
g_settings.libretro_directory,
|
||||||
|
|
Loading…
Reference in New Issue