Exemple #1
0
int menu_common_core_setting_toggle(unsigned setting, unsigned action)
{
   unsigned index = setting - MENU_SETTINGS_CORE_OPTION_START;

   switch (action)
   {
      case MENU_ACTION_LEFT:
         core_option_prev(g_extern.system.core_options, index);
         break;

      case MENU_ACTION_RIGHT:
      case MENU_ACTION_OK:
         core_option_next(g_extern.system.core_options, index);
         break;

      case MENU_ACTION_START:
         core_option_set_default(g_extern.system.core_options, index);
         break;

      default:
         break;
   }

   return 0;
}
static int action_start_core_setting(unsigned type,
      const char *label, unsigned action)
{
   global_t *global       = global_get_ptr();
   unsigned idx           = type - MENU_SETTINGS_CORE_OPTION_START;

   (void)label;

   core_option_set_default(global->system.core_options, idx);

   return 0;
}
Exemple #3
0
static int action_start_core_setting(unsigned type,
      const char *label)
{
   unsigned idx                = type - MENU_SETTINGS_CORE_OPTION_START;
   rarch_system_info_t *system = NULL;
   
   runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);

   if (system)
      core_option_set_default(system->core_options, idx);

   return 0;
}
static int action_start_core_setting(unsigned type,
      const char *label)
{
   unsigned idx           = type - MENU_SETTINGS_CORE_OPTION_START;
   rarch_system_info_t *system = rarch_system_info_get_ptr();

   (void)label;

   if (system)
      core_option_set_default(system->core_options, idx);

   return 0;
}