Esempio n. 1
0
static int action_start_shader_action_parameter(unsigned type, const char *label)
{
#ifdef HAVE_SHADER_MANAGER
   video_shader_ctx_t shader_info;
   struct video_shader_parameter *param = NULL;
   unsigned parameter = type - MENU_SETTINGS_SHADER_PARAMETER_0;

   video_shader_driver_get_current_shader(&shader_info);

   if (!shader_info.data)
      return 0;

   param          = &shader_info.data->parameters
      [parameter];
   param->current = param->initial;
   param->current = MIN(MAX(param->minimum, param->current), param->maximum);

   return menu_shader_manager_clear_parameter(parameter);
#else
   return 0;
#endif
}
Esempio n. 2
0
static int action_start_shader_action_preset_parameter(unsigned type, const char *label)
{
   unsigned parameter = type - MENU_SETTINGS_SHADER_PRESET_PARAMETER_0;
   return menu_shader_manager_clear_parameter(parameter);
}