Пример #1
0
static int action_toggle_video_resolution(unsigned type, const char *label,
      unsigned action, bool wraparound)
{ 
   global_t *global = global_get_ptr();
    
   (void)global;

#if defined(__CELLOS_LV2__)
   switch (action)
   {
      case MENU_ACTION_LEFT:
         if (global->console.screen.resolutions.current.idx)
         {
            global->console.screen.resolutions.current.idx--;
            global->console.screen.resolutions.current.id =
               global->console.screen.resolutions.list
               [global->console.screen.resolutions.current.idx];
         }
         break;
      case MENU_ACTION_RIGHT:
         if (global->console.screen.resolutions.current.idx + 1 <
               global->console.screen.resolutions.count)
         {
            global->console.screen.resolutions.current.idx++;
            global->console.screen.resolutions.current.id =
               global->console.screen.resolutions.list
               [global->console.screen.resolutions.current.idx];
         }
         break;
   }
#else
   switch (action)
   {
      case MENU_ACTION_LEFT:
         video_driver_get_video_output_prev();
         break;
      case MENU_ACTION_RIGHT:
         video_driver_get_video_output_next();
         break;
   }
#endif

   return 0;
}
Пример #2
0
static int action_right_video_resolution(unsigned type, const char *label,
      bool wraparound)
{
   global_t *global = global_get_ptr();

   (void)global;

#if defined(__CELLOS_LV2__)
   if (global->console.screen.resolutions.current.idx + 1 <
         global->console.screen.resolutions.count)
   {
      global->console.screen.resolutions.current.idx++;
      global->console.screen.resolutions.current.id =
         global->console.screen.resolutions.list
         [global->console.screen.resolutions.current.idx];
   }
#else
   video_driver_get_video_output_next();
#endif

   return 0;
}