예제 #1
0
파일: cheats.c 프로젝트: Holzhaus/RetroArch
void cheat_manager_index_next(cheat_manager_t *handle)
{
   if (!handle)
      return;

   handle->ptr = (handle->ptr + 1) % handle->size;
   cheat_manager_update(handle, handle->ptr);
}
예제 #2
0
파일: cheats.c 프로젝트: AbelFlos/RetroArch
void cheat_manager_index_prev(cheat_manager_t *handle)
{
   if (handle->ptr == 0)
      handle->ptr = handle->size - 1;
   else
      handle->ptr--;

   cheat_manager_update(handle);
}
예제 #3
0
파일: cheats.c 프로젝트: Holzhaus/RetroArch
void cheat_manager_toggle(cheat_manager_t *handle)
{
   if (!handle)
      return;

   handle->cheats[handle->ptr].state ^= true;
   cheat_manager_apply_cheats(handle);
   cheat_manager_update(handle, handle->ptr);
}
예제 #4
0
void cheat_manager_toggle_index(unsigned i)
{
    cheat_manager_t *handle = cheat_manager_state;
    if (!handle)
        return;

    handle->cheats[i].state = !handle->cheats[i].state;
    cheat_manager_update(handle, i);
}
예제 #5
0
static int action_left_cheat(unsigned type, const char *label,
      bool wraparound)
{
   global_t *global       = global_get_ptr();
   cheat_manager_t *cheat = global->cheat;
   size_t idx             = type - MENU_SETTINGS_CHEAT_BEGIN;

   if (!cheat)
      return -1;

   cheat->cheats[idx].state = !cheat->cheats[idx].state;
   cheat_manager_update(cheat, idx);

   return 0;
}
예제 #6
0
static int action_toggle_cheat(unsigned type, const char *label,
      unsigned action)
{
   cheat_manager_t *cheat = g_extern.cheat;
   size_t idx = type - MENU_SETTINGS_CHEAT_BEGIN;

   if (!cheat)
      return -1;

   switch (action)
   {
      case MENU_ACTION_LEFT:
      case MENU_ACTION_RIGHT:
         cheat->cheats[idx].state = !cheat->cheats[idx].state;
         cheat_manager_update(cheat, idx);
         break;
   }

   return 0;
}
예제 #7
0
static int action_toggle_cheat(unsigned type, const char *label,
      unsigned action, bool wraparound)
{
   global_t *global       = global_get_ptr();
   cheat_manager_t *cheat = global->cheat;
   size_t idx             = type - MENU_SETTINGS_CHEAT_BEGIN;

   if (!cheat)
      return -1;

   switch (action)
   {
      case MENU_ACTION_LEFT:
      case MENU_ACTION_RIGHT:
         cheat->cheats[idx].state = !cheat->cheats[idx].state;
         cheat_manager_update(cheat, idx);
         break;
   }

   return 0;
}
예제 #8
0
파일: cheats.c 프로젝트: AbelFlos/RetroArch
void cheat_manager_index_next(cheat_manager_t *handle)
{
   handle->ptr = (handle->ptr + 1) % handle->size;
   cheat_manager_update(handle);
}
예제 #9
0
파일: cheats.c 프로젝트: AbelFlos/RetroArch
void cheat_manager_toggle(cheat_manager_t *handle)
{
   handle->cheats[handle->ptr].state ^= true;
   cheat_manager_apply_cheats(handle);
   cheat_manager_update(handle);
}