示例#1
0
static bool event_init_content(void)
{
   global_t *global = global_get_ptr();

   /* No content to be loaded for dummy core,
    * just successfully exit. */
   if (global->core_type == CORE_TYPE_DUMMY) 
      return true;

   if (!global->libretro_no_content)
      rarch_fill_pathnames();

   if (!init_content_file())
      return false;

   if (global->libretro_no_content)
      return true;

   event_set_savestate_auto_index();

   if (event_load_save_files())
      RARCH_LOG("Skipping SRAM load.\n");

   event_load_auto_state();
   event_command(EVENT_CMD_BSV_MOVIE_INIT);
   event_command(EVENT_CMD_NETPLAY_INIT);

   return true;
}
示例#2
0
static bool event_init_content(void)
{
   global_t *global = global_get_ptr();

   /* No content to be loaded for dummy core,
    * just successfully exit. */
   if (global->inited.core.type == CORE_TYPE_DUMMY) 
      return true;

   if (!global->inited.core.no_content)
      rarch_fill_pathnames();

   if (!init_content_file())
      return false;

   if (global->inited.core.no_content)
      return true;

   event_set_savestate_auto_index();

   if (event_load_save_files())
      RARCH_LOG("%s.\n",
            msg_hash_to_str(MSG_SKIPPING_SRAM_LOAD));

   event_load_auto_state();
   event_command(EVENT_CMD_BSV_MOVIE_INIT);
   event_command(EVENT_CMD_NETPLAY_INIT);

   return true;
}
示例#3
0
/**
 * event_disk_control_append_image:
 * @path                 : Path to disk image. 
 *
 * Appends disk image to disk image list.
 **/
void event_disk_control_append_image(const char *path)
{
   unsigned new_idx;
   char msg[PATH_MAX_LENGTH]                         = {0};
   struct retro_game_info info                       = {0};
   global_t                                  *global = global_get_ptr();
   rarch_system_info_t                       *sysinfo = rarch_system_info_get_ptr();
   const struct retro_disk_control_callback *control = 
      sysinfo ? (const struct retro_disk_control_callback*)&sysinfo->disk_control
      : NULL;

   if (!control)
      return;

   event_disk_control_set_eject(true, false);

   control->add_image_index();
   new_idx = control->get_num_images();
   if (!new_idx)
      return;
   new_idx--;

   info.path = path;
   control->replace_image_index(new_idx, &info);

   strlcpy(msg, "Appended disk: ", sizeof(msg));
   strlcat(msg, path, sizeof(msg));
   RARCH_LOG("%s\n", msg);
   rarch_main_msg_queue_push(msg, 0, 180, true);

   event_command(EVENT_CMD_AUTOSAVE_DEINIT);

   /* TODO: Need to figure out what to do with subsystems case. */
   if (!*global->subsystem)
   {
      /* Update paths for our new image.
       * If we actually use append_image, we assume that we
       * started out in a single disk case, and that this way
       * of doing it makes the most sense. */
      rarch_set_paths(path);
      rarch_fill_pathnames();
   }

   event_command(EVENT_CMD_AUTOSAVE_INIT);

   event_disk_control_set_eject(false, false);
}