示例#1
0
文件: main.c 项目: ficoos/RetroArch
int main(void)
{
#ifdef HW_RVL
   L2Enhance();
#endif

   fatInitDefault();

#ifdef HAVE_FILE_LOGGER
   g_extern.verbose = true;
   log_fp = fopen("/retroarch-log.txt", "w");
#endif

   config_set_defaults();

   g_settings.audio.rate_control = true;
   g_settings.audio.rate_control_delta = 0.004;
   g_console.block_config_read = true;

   wii_video_init();
   input_wii.init();

   rgui_handle_t *rgui = rgui_init("",
         menu_framebuf, RGUI_WIDTH * sizeof(uint16_t),
         _binary_console_font_bmp_start, folder_cb, NULL);
   rgui_iterate(rgui, RGUI_ACTION_REFRESH);

   int ret = 0;
   while (get_rom_path(rgui) && ret == 0)
   {
      bool repeat = false;

      input_wii.poll(NULL);

      do{
         repeat = rarch_main_iterate();
      }while(repeat && !g_console.frame_advance_enable);

      audio_stop_func();
   }

   if(g_console.emulator_initialized)
      rarch_main_deinit();

   wii_video_deinit();
   input_wii.free(NULL);

#ifdef HAVE_FILE_LOGGER
   fclose(log_fp);
#endif

   rgui_free(rgui);
   return ret;
}
示例#2
0
文件: main.c 项目: magicseb/RetroArch
int main(void)
{
   fatInitDefault();

#ifdef HAVE_FILE_LOGGER
   g_extern.verbose = true;
   log_fp = fopen("sd:/ssnes-log.txt", "w");
#endif

   wii_video_init();
   wii_input_init();

   sgui_handle_t *sgui = sgui_init("sd:/",
         menu_framebuf, SGUI_WIDTH * sizeof(uint16_t),
         _binary_console_font_bmp_start, folder_cb, NULL);

   const char *rom_path;
   int ret = 0;
   while ((rom_path = get_rom_path(sgui)) && ret == 0)
   {
      g_console.initialize_rarch_enable = true;
      strlcpy(g_console.rom_path, rom_path, sizeof(g_console.rom_path));
      rarch_startup(NULL);
      bool repeat = false;

      input_wii.poll(NULL);

      do{
         repeat = rarch_main_iterate();
      }while(repeat && !g_console.frame_advance_enable);
   }

   if(g_console.emulator_initialized)
      rarch_main_deinit();

   wii_input_deinit();
   wii_video_deinit();

#ifdef HAVE_FILE_LOGGER
   fclose(log_fp);
#endif

   sgui_free(sgui);
   return ret;
}