예제 #1
0
파일: main.c 프로젝트: Wyrick/RetroArch
static void set_default_settings(void)
{
   // g_settings
   strlcpy(g_settings.cheat_database, usrDirPath, sizeof(g_settings.cheat_database));
   g_settings.rewind_enable = false;
   strlcpy(g_settings.video.cg_shader_path, DEFAULT_SHADER_FILE, sizeof(g_settings.video.cg_shader_path));
   g_settings.video.fbo_scale_x = 2.0f;
   g_settings.video.fbo_scale_y = 2.0f;
   g_settings.video.render_to_texture = true;
   strlcpy(g_settings.video.second_pass_shader, DEFAULT_SHADER_FILE, sizeof(g_settings.video.second_pass_shader));
   g_settings.video.second_pass_smooth = true;
   g_settings.video.smooth = true;
   g_settings.video.vsync = true;
   strlcpy(g_settings.cheat_database, usrDirPath, sizeof(g_settings.cheat_database));
   strlcpy(g_settings.system_directory, systemDirPath, sizeof(g_settings.system_directory));
   g_settings.video.msg_pos_x = 0.05f;
   g_settings.video.msg_pos_y = 0.90f;
   g_settings.video.aspect_ratio = -1.0f;

   rarch_input_set_controls_default();

   // g_console
   g_console.block_config_read = true;
   g_console.frame_advance_enable = false;
   g_console.emulator_initialized = 0;
   g_console.screenshots_enable = true;
   g_console.throttle_enable = true;
   g_console.initialize_rarch_enable = false;
   g_console.triple_buffering_enable = true;
   g_console.default_savestate_dir_enable = false;
   g_console.default_sram_dir_enable = false;
   g_console.fbo_enabled = true;
   g_console.mode_switch = MODE_MENU;
   g_console.screen_orientation = ORIENTATION_NORMAL;
   g_console.current_resolution_id = 0;
   strlcpy(g_console.default_rom_startup_dir, "/", sizeof(g_console.default_rom_startup_dir));
   strlcpy(g_console.default_savestate_dir, usrDirPath, sizeof(g_console.default_savestate_dir));
   strlcpy(g_console.default_sram_dir, usrDirPath, sizeof(g_console.default_sram_dir));
   g_console.aspect_ratio_index = 0;
   g_console.menu_font_size = 1.0f;
   g_console.overscan_enable = false;
   g_console.overscan_amount = 0.0f;
   g_console.sound_mode = SOUND_MODE_NORMAL;
   g_console.viewports.custom_vp.width = 0;
   g_console.viewports.custom_vp.height = 0;
   g_console.viewports.custom_vp.x = 0;
   g_console.viewports.custom_vp.y = 0;
   g_console.custom_bgm_enable = true;
   g_console.info_msg_enable = true;

   // g_extern
   g_extern.state_slot = 0;
   g_extern.audio_data.mute = 0;
   g_extern.verbose = true;
}
예제 #2
0
파일: main.c 프로젝트: palfrey/RetroArch
static void set_default_settings (void)
{
    //g_settings
    g_settings.rewind_enable = false;
    strlcpy(g_settings.video.cg_shader_path, DEFAULT_SHADER_FILE, sizeof(g_settings.video.cg_shader_path));
    g_settings.video.fbo_scale_x = 2.0f;
    g_settings.video.fbo_scale_y = 2.0f;
    g_settings.video.render_to_texture = true;
    strlcpy(g_settings.video.second_pass_shader, DEFAULT_SHADER_FILE, sizeof(g_settings.video.second_pass_shader));
    g_settings.video.second_pass_smooth = true;
    g_settings.video.smooth = true;
    g_settings.video.vsync = true;
    strlcpy(g_settings.cheat_database, usrDirPath, sizeof(g_settings.cheat_database));
    strlcpy(g_settings.system_directory, usrDirPath, sizeof(g_settings.system_directory));
    g_settings.video.aspect_ratio = -1.0f;

    rarch_input_set_controls_default();

    //g_console
    g_console.block_config_read = true;
    g_console.frame_advance_enable = false;
    g_console.emulator_initialized = 0;
    g_console.gamma_correction_enable = true;
    g_console.initialize_rarch_enable = false;
    g_console.fbo_enabled = true;
    g_console.mode_switch = MODE_MENU;
    g_console.screen_orientation = ORIENTATION_NORMAL;
    g_console.throttle_enable = true;
    g_console.aspect_ratio_index = 0;
    strlcpy(g_console.default_rom_startup_dir, "game:", sizeof(g_console.default_rom_startup_dir));
    g_console.viewports.custom_vp.width = 0;
    g_console.viewports.custom_vp.height = 0;
    g_console.viewports.custom_vp.x = 0;
    g_console.viewports.custom_vp.y = 0;
    g_console.color_format = 0;
    g_console.info_msg_enable = true;

    //g_extern
    g_extern.state_slot = 0;
    g_extern.audio_data.mute = 0;
    g_extern.verbose = true;
}
예제 #3
0
파일: main.c 프로젝트: freakdave/RetroArch
int main(int argc, char *argv[])
{
   rarch_main_clear_state();
   get_environment_settings();

   config_set_defaults();
   
   input_xinput.init();

#ifdef _XBOX1
   char path_prefix[256];
   snprintf(path_prefix, sizeof(path_prefix), "D:\\");
#else
   const char *path_prefix = default_paths.filesystem_root_dir;
#endif
   const char *extension = default_paths.executable_extension;
   const input_driver_t *input = &input_xinput;

   char full_path[1024];
   snprintf(full_path, sizeof(full_path), "%sCORE%s", path_prefix, extension);

   bool find_libretro_file = rarch_configure_libretro_core(full_path, path_prefix, path_prefix, 
   default_paths.config_file, extension);

   rarch_settings_set_default();
   rarch_input_set_controls_default(input);
   rarch_config_load(default_paths.config_file, find_libretro_file);
   init_libretro_sym();

   input_xinput.post_init();

#if defined(HAVE_D3D9) || defined(HAVE_D3D8)
   video_xdk_d3d.start();
   driver.video = &video_xdk_d3d;
#else
   video_null.start();
   driver.video = &video_null;
#endif

   system_init();

   menu_init();

begin_loop:
   if(g_extern.console.rmenu.mode == MODE_EMULATION)
   {
      bool repeat = false;

      input_xinput.poll(NULL);

      driver.video->set_aspect_ratio(driver.video_data, g_settings.video.aspect_ratio_idx);

      do{
         repeat = rarch_main_iterate();
      }while(repeat && !g_extern.console.screen.state.frame_advance.enable);
   }
   else if(g_extern.console.rmenu.mode == MODE_MENU)
   {
      menu_loop();

      if (g_extern.console.rmenu.mode != MODE_EXIT)
         rarch_startup(default_paths.config_file);
   }
   else
      goto begin_shutdown;

   goto begin_loop;

begin_shutdown:
   rarch_config_save(default_paths.config_file);

   menu_free();
#if defined(HAVE_D3D8) || defined(HAVE_D3D9)
   video_xdk_d3d.stop();
#else
   video_null.stop();
#endif
   input_xinput.free(NULL);

   if(g_extern.console.external_launch.enable)
      rarch_console_exec(g_extern.console.external_launch.launch_app);

   return 0;
}
예제 #4
0
void rarch_settings_set_default (void)
{
   // g_settings
   g_settings.rewind_enable = false;
   strlcpy(g_settings.cheat_database, default_paths.port_dir, sizeof(g_settings.cheat_database));

#if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL)
   strlcpy(g_settings.video.cg_shader_path, default_paths.shader_file, sizeof(g_settings.video.cg_shader_path));
   strlcpy(g_settings.video.second_pass_shader, default_paths.shader_file, sizeof(g_settings.video.second_pass_shader));
   g_settings.video.second_pass_smooth = true;
#endif

#ifdef HAVE_FBO
   g_settings.video.fbo_scale_x = 2.0f;
   g_settings.video.fbo_scale_y = 2.0f;
#endif

   g_settings.video.render_to_texture = true;
   g_settings.video.smooth = true;
   g_settings.video.vsync = true;

   strlcpy(g_settings.system_directory, default_paths.system_dir, sizeof(g_settings.system_directory));

   g_settings.video.msg_pos_x = 0.05f;
   g_settings.video.msg_pos_y = 0.90f;
   g_settings.video.aspect_ratio = -1.0f;

   rarch_input_set_controls_default();

   // g_console
   g_console.block_config_read = true;
   g_console.frame_advance_enable = false;
   g_console.emulator_initialized = 0;
   g_console.screenshots_enable = true;
   g_console.throttle_enable = true;
   g_console.initialize_rarch_enable = false;
   g_console.triple_buffering_enable = true;
   g_console.default_savestate_dir_enable = false;
   g_console.default_sram_dir_enable = false;

#ifdef HAVE_FBO
   g_console.fbo_enabled = true;
#else
   g_console.fbo_enabled = false;
#endif

   g_console.mode_switch = MODE_MENU;
   g_console.screen_orientation = ORIENTATION_NORMAL;
   g_console.current_resolution_id = 0;
   strlcpy(g_console.default_rom_startup_dir, default_paths.filesystem_root_dir, sizeof(g_console.default_rom_startup_dir));
   strlcpy(g_console.default_savestate_dir, default_paths.savestate_dir, sizeof(g_console.default_savestate_dir));
   strlcpy(g_console.default_sram_dir, default_paths.sram_dir, sizeof(g_console.default_sram_dir));
   g_console.aspect_ratio_index = 0;
   g_console.menu_font_size = 1.0f;
   g_console.overscan_enable = false;
   g_console.overscan_amount = 0.0f;
   g_console.sound_mode = SOUND_MODE_NORMAL;
   g_console.viewports.custom_vp.width = 0;
   g_console.viewports.custom_vp.height = 0;
   g_console.viewports.custom_vp.x = 0;
   g_console.viewports.custom_vp.y = 0;
   g_console.custom_bgm_enable = true;
   g_console.info_msg_enable = true;
#ifdef _XBOX360
   g_console.color_format = 0;
#endif

   // g_extern
   g_extern.state_slot = 0;
   g_extern.audio_data.mute = 0;
   g_extern.verbose = true;
}