mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
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++)
|
||||
free(blocks[i].data);
|
||||
free(blocks);
|
||||
free(buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1118,31 +1118,28 @@ static void *lakka_init(void)
|
||||
}
|
||||
|
||||
menu = (menu_handle_t*)calloc(1, sizeof(*menu));
|
||||
|
||||
if (!menu)
|
||||
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);
|
||||
|
||||
menu->userdata = (lakka_handle_t*)calloc(1, sizeof(lakka_handle_t));
|
||||
|
||||
if (!menu->userdata)
|
||||
return NULL;
|
||||
|
||||
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->categories = (menu_category_t*)
|
||||
calloc(lakka->num_categories, sizeof(menu_category_t));
|
||||
|
||||
if (!lakka->categories)
|
||||
{
|
||||
free(menu->userdata);
|
||||
free(menu);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -408,17 +408,19 @@ static void *rgui_init(void)
|
||||
menu->userdata = (rgui_handle_t*)calloc(1, sizeof(rgui_handle_t));
|
||||
|
||||
if (!menu->userdata)
|
||||
{
|
||||
free(menu);
|
||||
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));
|
||||
|
||||
if (!menu->frame_buf)
|
||||
{
|
||||
free(menu->userdata);
|
||||
free(menu);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
menu->width = 320;
|
||||
menu->height = 240;
|
||||
@ -431,6 +433,9 @@ static void *rgui_init(void)
|
||||
RARCH_ERR("No font bitmap or binary, abort");
|
||||
|
||||
rarch_main_command(RARCH_CMD_QUIT_RETROARCH);
|
||||
|
||||
free(menu->userdata);
|
||||
free(menu);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -308,7 +308,10 @@ static void *rmenu_init(void)
|
||||
menu_texture = (struct texture_image*)calloc(1, sizeof(*menu_texture));
|
||||
|
||||
if (!menu_texture)
|
||||
{
|
||||
free(menu);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
@ -575,13 +575,13 @@ static void *xmb_init(void)
|
||||
menu->userdata = (xmb_handle_t*)calloc(1, sizeof(xmb_handle_t));
|
||||
|
||||
if (!menu->userdata)
|
||||
{
|
||||
free(menu);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
xmb = (xmb_handle_t*)menu->userdata;
|
||||
|
||||
if (!xmb)
|
||||
return NULL;
|
||||
|
||||
xmb->x = 0;
|
||||
xmb->alpha = 1.0f;
|
||||
xmb->depth = 1;
|
||||
|
@ -31,10 +31,14 @@ void add_tween(float duration, float target_value, float* subject,
|
||||
easingFunc easing, tweenCallback callback)
|
||||
{
|
||||
tween_t *tween = NULL;
|
||||
tweens = (tween_t*)
|
||||
tween_t *temp_tweens = (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);
|
||||
return;
|
||||
|
@ -67,10 +67,8 @@ static void menu_environment_get(int *argc, char *argv[],
|
||||
if (!g_extern.has_set_verbosity)
|
||||
wrap_args->verbose = g_extern.verbosity;
|
||||
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;
|
||||
if (!g_extern.has_set_state_path)
|
||||
wrap_args->state_path = *g_extern.savestate_dir ? g_extern.savestate_dir : NULL;
|
||||
wrap_args->sram_path = *g_extern.savefile_dir ? g_extern.savefile_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;
|
||||
if (!g_extern.has_set_libretro)
|
||||
wrap_args->libretro_path = *g_settings.libretro ? g_settings.libretro : NULL;
|
||||
|
@ -51,6 +51,9 @@ void rarch_playlist_load_content(content_playlist_t *playlist,
|
||||
index, &path, &core_path, NULL);
|
||||
|
||||
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_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*)
|
||||
calloc(1, sizeof(struct hidpad_ps3_data));
|
||||
|
||||
if (!device || !connection)
|
||||
if (!device)
|
||||
return NULL;
|
||||
|
||||
if (!connection)
|
||||
{
|
||||
free(device);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
device->connection = connection;
|
||||
device->slot = slot;
|
||||
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*)
|
||||
calloc(1, sizeof(struct hidpad_ps4_data));
|
||||
|
||||
if (!device || !connection)
|
||||
if (!device)
|
||||
return NULL;
|
||||
|
||||
if (!connection)
|
||||
{
|
||||
free(device);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
device->connection = connection;
|
||||
device->slot = slot;
|
||||
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*)
|
||||
calloc(1, sizeof(struct wiimote_t));
|
||||
|
||||
if (!device || !connection)
|
||||
if (!device)
|
||||
return NULL;
|
||||
|
||||
if (!connection)
|
||||
{
|
||||
free(device);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
device->connection = connection;
|
||||
device->unid = slot;
|
||||
device->state = WIIMOTE_STATE_CONNECTED;
|
||||
|
@ -4276,16 +4276,6 @@ bool setting_data_append_list_path_options(
|
||||
SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR);
|
||||
|
||||
#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(
|
||||
g_settings.libretro_directory,
|
||||
|
Loading…
x
Reference in New Issue
Block a user