コード例 #1
0
static bool event_init_core(void)
{
   global_t *global     = global_get_ptr();
   driver_t *driver     = driver_get_ptr();
   settings_t *settings = config_get_ptr();

   /* per-core saves: save the original path */
   if(orig_savefile_dir[0] == '\0')
      strlcpy(orig_savefile_dir, global->dir.savefile,
            sizeof(orig_savefile_dir));
   if(orig_savestate_dir[0] == '\0')
      strlcpy(orig_savestate_dir, global->dir.savestate,
            sizeof(orig_savestate_dir));

   /* auto overrides: apply overrides */
   if(settings->auto_overrides_enable)
   {
      if (config_load_override())
         global->overrides_active = true;
      else
         global->overrides_active = false; 
   }

   /* reset video format to libretro's default */
   video_driver_set_pixel_format(RETRO_PIXEL_FORMAT_0RGB1555);

   pretro_set_environment(rarch_environment_cb);

   /* auto-remap: apply remap files */
   if(settings->auto_remaps_enable)
      config_load_remap();

   /* per-core saves: reset redirection paths */
   if((settings->sort_savestates_enable || settings->sort_savefiles_enable) && !global->inited.core.no_content) 
      set_paths_redirect(global->name.base);

   rarch_verify_api_version();
   pretro_init();

   global->sram.use = (global->inited.core.type == CORE_TYPE_PLAIN) &&
      !global->inited.core.no_content;

   if (!event_init_content())
      return false;

   retro_init_libretro_cbs(&driver->retro_ctx);
   rarch_init_system_av_info();

   return true;
}
コード例 #2
0
ファイル: command_event.c プロジェクト: hbfelizzola/RetroArch
static bool event_init_core(void)
{
   global_t *global     = global_get_ptr();
   driver_t *driver     = driver_get_ptr();
   settings_t *settings = config_get_ptr();

   /* per-core saves: save the original path */
   if(orig_savefile_dir[0] == '\0')
      strlcpy(orig_savefile_dir,global->savefile_dir,sizeof(orig_savefile_dir));
   if(orig_savestate_dir[0] == '\0')
      strlcpy(orig_savestate_dir,global->savestate_dir,sizeof(orig_savestate_dir));

   /* auto overrides: apply overrides */
   if(settings->auto_overrides_enable)
   {
      if (config_load_override())
         global->overrides_active = true;
      else
         global->overrides_active = false; 
   }

   pretro_set_environment(rarch_environment_cb);

   /* auto-remap: apply remap files */
   if(settings->auto_remaps_enable)
      config_load_remap();

   /* per-core saves: reset redirection paths */
   if(settings->sort_savestates_enable || settings->sort_savefiles_enable)
      set_paths_redirect(global->basename);

   rarch_verify_api_version();
   pretro_init();

   global->use_sram = (global->core_type == CORE_TYPE_PLAIN) &&
      !global->libretro_no_content;

   if (!event_init_content())
      return false;

   retro_init_libretro_cbs(&driver->retro_ctx);
   rarch_init_system_av_info();

   return true;
}
コード例 #3
0
ファイル: command_event.c プロジェクト: Tobio12/RetroArch
static bool event_init_core(void *data)
{
   retro_ctx_environ_info_t info;
   settings_t *settings            = config_get_ptr();

   if (!core_ctl(CORE_CTL_RETRO_SYMBOLS_INIT, data))
      return false;

   runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_INIT, NULL);

   /* auto overrides: apply overrides */
   if(settings->auto_overrides_enable)
   {
      if (config_load_override())
         runloop_ctl(RUNLOOP_CTL_SET_OVERRIDES_ACTIVE, NULL);
      else
         runloop_ctl(RUNLOOP_CTL_UNSET_OVERRIDES_ACTIVE, NULL);
   }

   /* reset video format to libretro's default */
   video_driver_set_pixel_format(RETRO_PIXEL_FORMAT_0RGB1555);

   info.env = rarch_environment_cb;
   core_ctl(CORE_CTL_RETRO_SET_ENVIRONMENT, &info);

   /* Auto-remap: apply remap files */
   if(settings->auto_remaps_enable)
      config_load_remap();

   /* Per-core saves: reset redirection paths */
   rarch_ctl(RARCH_CTL_SET_PATHS_REDIRECT, NULL);

   if (!core_ctl(CORE_CTL_RETRO_INIT, NULL))
      return false;

   if (!event_init_content())
      return false;

   if (!core_ctl(CORE_CTL_INIT, NULL))
      return false;

   return true;
}
コード例 #4
0
ファイル: command_event.c プロジェクト: Gruncher/RetroArch
static bool event_init_core(void)
{
   global_t *global     = global_get_ptr();
   driver_t *driver     = driver_get_ptr();
   settings_t *settings = config_get_ptr();

   /* auto overrides: apply overrides */
   if(settings->auto_overrides_enable)
   {
      if (config_load_override())
         global->overrides_active = true;
      else
         global->overrides_active = false;
   }

   /* reset video format to libretro's default */
   video_driver_set_pixel_format(RETRO_PIXEL_FORMAT_0RGB1555);

   core.retro_set_environment(rarch_environment_cb);

   /* auto-remap: apply remap files */
   if(settings->auto_remaps_enable)
      config_load_remap();

   /* per-core saves: reset redirection paths */
   if((settings->sort_savestates_enable || settings->sort_savefiles_enable) && !global->inited.core.no_content)
      set_paths_redirect(global->name.base);

   rarch_ctl(RARCH_ACTION_STATE_VERIFY_API_VERSION, NULL);
   core.retro_init();

   global->sram.use = (global->inited.core.type == CORE_TYPE_PLAIN) &&
      !global->inited.core.no_content;

   if (!event_init_content())
      return false;

   retro_init_libretro_cbs(&driver->retro_ctx);
   rarch_init_system_av_info();

   return true;
}
コード例 #5
0
ファイル: command_event.c プロジェクト: futurepr0n/RetroArch
static bool event_init_core(void)
{
   global_t *global     = global_get_ptr();
   settings_t *settings = config_get_ptr();

   /* auto overrides: apply overrides */
   if(settings->auto_overrides_enable)
   {
      if (config_load_override())
         runloop_ctl(RUNLOOP_CTL_SET_OVERRIDES_ACTIVE, NULL);
      else
         runloop_ctl(RUNLOOP_CTL_UNSET_OVERRIDES_ACTIVE, NULL);
   }

   /* reset video format to libretro's default */
   video_driver_set_pixel_format(RETRO_PIXEL_FORMAT_0RGB1555);

   core.retro_set_environment(rarch_environment_cb);

   /* auto-remap: apply remap files */
   if(settings->auto_remaps_enable)
      config_load_remap();

   /* per-core saves: reset redirection paths */
   if((settings->sort_savestates_enable || settings->sort_savefiles_enable) 
         && !content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL))
      rarch_ctl(RARCH_CTL_SET_PATHS_REDIRECT, NULL);

   rarch_ctl(RARCH_CTL_VERIFY_API_VERSION, NULL);
   core.retro_init();

   global->sram.use = rarch_ctl(RARCH_CTL_IS_PLAIN_CORE, NULL) 
      && !content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL);

   if (!event_init_content())
      return false;

   retro_init_libretro_cbs(&retro_ctx);
   rarch_ctl(RARCH_CTL_INIT_SYSTEM_AV_INFO, NULL);

   return true;
}