2015-02-26 17:28:48 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2011-2015 - Daniel De Matteis
|
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-11-21 19:10:22 +00:00
|
|
|
#include <file/file_path.h>
|
|
|
|
|
2015-06-08 12:35:58 +00:00
|
|
|
#include "../menu.h"
|
2015-06-12 14:01:46 +00:00
|
|
|
#include "../menu_cbs.h"
|
2015-06-13 17:12:10 +00:00
|
|
|
#include "../menu_input.h"
|
2015-09-22 20:14:03 +00:00
|
|
|
#include "../menu_display.h"
|
2015-06-08 12:35:58 +00:00
|
|
|
#include "../menu_setting.h"
|
|
|
|
#include "../menu_shader.h"
|
2015-06-13 17:12:10 +00:00
|
|
|
#include "../menu_hash.h"
|
2015-02-26 17:28:48 +00:00
|
|
|
|
2015-06-13 17:12:10 +00:00
|
|
|
#include "../../general.h"
|
2015-06-08 12:35:58 +00:00
|
|
|
#include "../../retroarch.h"
|
|
|
|
#include "../../performance.h"
|
2015-02-26 17:28:48 +00:00
|
|
|
|
2015-10-18 15:41:42 +00:00
|
|
|
#include "../../gfx/video_shader_driver.h"
|
|
|
|
|
2015-06-08 12:35:58 +00:00
|
|
|
#include "../../input/input_remapping.h"
|
2015-02-26 17:28:48 +00:00
|
|
|
|
2015-10-11 18:26:44 +00:00
|
|
|
#ifndef BIND_ACTION_START
|
|
|
|
#define BIND_ACTION_START(cbs, name) \
|
|
|
|
cbs->action_start = name; \
|
|
|
|
cbs->action_start_ident = #name;
|
|
|
|
#endif
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_remap_file_load(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-06-12 15:23:31 +00:00
|
|
|
if (!settings)
|
|
|
|
return -1;
|
|
|
|
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->input.remapping_path[0] = '\0';
|
2015-02-26 17:28:48 +00:00
|
|
|
input_remapping_set_defaults();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_video_filter_file_load(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
2015-03-20 20:22:38 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-06-12 15:23:31 +00:00
|
|
|
if (!settings)
|
|
|
|
return -1;
|
|
|
|
|
2015-03-20 20:22:38 +00:00
|
|
|
settings->video.softfilter_plugin[0] = '\0';
|
2015-04-13 09:26:02 +00:00
|
|
|
event_command(EVENT_CMD_REINIT);
|
2015-02-26 17:28:48 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-09-05 15:06:25 +00:00
|
|
|
static int generic_action_start_performance_counters(struct retro_perf_counter **counters,
|
|
|
|
unsigned offset, unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
|
|
|
if (counters[offset])
|
|
|
|
{
|
2015-09-05 15:06:25 +00:00
|
|
|
counters[offset]->total = 0;
|
2015-02-26 17:28:48 +00:00
|
|
|
counters[offset]->call_cnt = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-09-05 15:06:25 +00:00
|
|
|
static int action_start_performance_counters_core(unsigned type, const char *label)
|
|
|
|
{
|
2015-10-11 16:21:07 +00:00
|
|
|
struct retro_perf_counter **counters = retro_get_perf_counter_libretro();
|
2015-09-05 15:06:25 +00:00
|
|
|
unsigned offset = type - MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN;
|
|
|
|
|
|
|
|
return generic_action_start_performance_counters(counters, offset, type, label);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int action_start_performance_counters_frontend(unsigned type,
|
|
|
|
const char *label)
|
|
|
|
{
|
2015-10-11 16:21:07 +00:00
|
|
|
struct retro_perf_counter **counters = retro_get_perf_counter_rarch();
|
2015-09-05 15:06:25 +00:00
|
|
|
unsigned offset = type - MENU_SETTINGS_PERF_COUNTERS_BEGIN;
|
|
|
|
return generic_action_start_performance_counters(counters, offset, type, label);
|
|
|
|
}
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_input_desc(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
2015-06-12 15:23:31 +00:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-02-26 17:28:48 +00:00
|
|
|
unsigned inp_desc_index_offset = type - MENU_SETTINGS_INPUT_DESC_BEGIN;
|
2015-05-21 02:11:20 +00:00
|
|
|
unsigned inp_desc_user = inp_desc_index_offset / (RARCH_FIRST_CUSTOM_BIND + 4);
|
|
|
|
unsigned inp_desc_button_index_offset = inp_desc_index_offset - (inp_desc_user * (RARCH_FIRST_CUSTOM_BIND + 4));
|
2015-02-26 17:28:48 +00:00
|
|
|
|
|
|
|
(void)label;
|
|
|
|
|
2015-05-21 02:11:20 +00:00
|
|
|
if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND)
|
|
|
|
settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset] =
|
|
|
|
settings->input.binds[inp_desc_user][inp_desc_button_index_offset].id;
|
|
|
|
else
|
|
|
|
settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset] =
|
|
|
|
inp_desc_button_index_offset - RARCH_FIRST_CUSTOM_BIND;
|
2015-02-26 17:28:48 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_shader_action_parameter(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
|
|
|
struct video_shader_parameter *param = NULL;
|
|
|
|
struct video_shader *shader = video_shader_driver_get_current_shader();
|
|
|
|
|
|
|
|
if (!shader)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
param = &shader->parameters[type - MENU_SETTINGS_SHADER_PARAMETER_0];
|
|
|
|
param->current = param->initial;
|
|
|
|
param->current = min(max(param->minimum, param->current), param->maximum);
|
2015-03-08 16:19:46 +00:00
|
|
|
|
2015-02-26 17:28:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_shader_action_preset_parameter(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
|
|
|
struct video_shader *shader = NULL;
|
|
|
|
struct video_shader_parameter *param = NULL;
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-02-26 17:28:48 +00:00
|
|
|
if (!menu)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
if (!(shader = menu->shader))
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
param = &shader->parameters[type - MENU_SETTINGS_SHADER_PRESET_PARAMETER_0];
|
|
|
|
param->current = param->initial;
|
|
|
|
param->current = min(max(param->minimum, param->current), param->maximum);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_shader_pass(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
2015-06-30 11:58:33 +00:00
|
|
|
struct video_shader *shader = NULL;
|
2015-02-26 17:28:48 +00:00
|
|
|
struct video_shader_pass *shader_pass = NULL;
|
2015-06-30 11:58:33 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
|
|
|
hack_shader_pass = type - MENU_SETTINGS_SHADER_PASS_0;
|
2015-02-26 17:28:48 +00:00
|
|
|
if (!menu)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
shader = menu->shader;
|
|
|
|
|
|
|
|
if (shader)
|
|
|
|
shader_pass = &shader->pass[hack_shader_pass];
|
|
|
|
|
|
|
|
if (shader_pass)
|
|
|
|
*shader_pass->source.path = '\0';
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_shader_scale_pass(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
|
|
|
struct video_shader *shader = NULL;
|
|
|
|
struct video_shader_pass *shader_pass = NULL;
|
|
|
|
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_SCALE_0;
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-02-26 17:28:48 +00:00
|
|
|
if (!menu)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
shader = menu->shader;
|
|
|
|
|
|
|
|
if (shader)
|
|
|
|
shader_pass = &shader->pass[pass];
|
|
|
|
|
2015-05-17 14:53:53 +00:00
|
|
|
if (shader_pass)
|
|
|
|
{
|
|
|
|
shader_pass->fbo.scale_x = shader_pass->fbo.scale_y = 0;
|
|
|
|
shader_pass->fbo.valid = false;
|
2015-02-26 17:28:48 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_shader_filter_pass(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
|
|
|
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
|
|
|
struct video_shader *shader = NULL;
|
|
|
|
struct video_shader_pass *shader_pass = NULL;
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-02-26 17:28:48 +00:00
|
|
|
if (!menu)
|
|
|
|
return -1;
|
2015-05-21 02:11:20 +00:00
|
|
|
|
2015-02-26 17:28:48 +00:00
|
|
|
shader = menu->shader;
|
|
|
|
if (!shader)
|
|
|
|
return -1;
|
|
|
|
shader_pass = &shader->pass[pass];
|
|
|
|
if (!shader_pass)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
shader_pass->filter = RARCH_FILTER_UNSPEC;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_shader_num_passes(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
|
|
|
#ifdef HAVE_SHADER_MANAGER
|
|
|
|
struct video_shader *shader = NULL;
|
2015-03-21 22:56:42 +00:00
|
|
|
menu_handle_t *menu = menu_driver_get_ptr();
|
2015-02-26 17:28:48 +00:00
|
|
|
if (!menu)
|
|
|
|
return -1;
|
2015-05-21 02:11:20 +00:00
|
|
|
|
2015-02-26 17:28:48 +00:00
|
|
|
shader = menu->shader;
|
|
|
|
if (!shader)
|
|
|
|
return -1;
|
|
|
|
if (shader->passes)
|
|
|
|
shader->passes = 0;
|
|
|
|
|
2015-10-22 01:54:34 +00:00
|
|
|
menu_entries_set_refresh(false);
|
2015-02-26 17:28:48 +00:00
|
|
|
video_shader_resolve_parameters(NULL, menu->shader);
|
|
|
|
#endif
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_cheat_num_passes(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
2015-03-21 04:42:49 +00:00
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
cheat_manager_t *cheat = global->cheat;
|
2015-02-26 17:28:48 +00:00
|
|
|
|
|
|
|
if (!cheat)
|
|
|
|
return -1;
|
|
|
|
|
2015-09-06 01:51:08 +00:00
|
|
|
if (cheat_manager_get_size(cheat))
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
2015-10-22 01:54:34 +00:00
|
|
|
menu_entries_set_refresh(false);
|
2015-02-26 17:28:48 +00:00
|
|
|
cheat_manager_realloc(cheat, 0);
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int action_start_core_setting(unsigned type,
|
2015-05-18 13:22:08 +00:00
|
|
|
const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
2015-03-21 04:42:49 +00:00
|
|
|
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
2015-06-25 11:46:32 +00:00
|
|
|
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
2015-02-26 17:28:48 +00:00
|
|
|
|
2015-07-06 22:30:34 +00:00
|
|
|
if (system)
|
|
|
|
core_option_set_default(system->core_options, idx);
|
2015-02-26 17:28:48 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 19:10:22 +00:00
|
|
|
static int action_start_playlist_association(unsigned type, const char *label)
|
|
|
|
{
|
2015-11-22 12:33:45 +00:00
|
|
|
int found;
|
2015-11-21 19:10:22 +00:00
|
|
|
char new_playlist_cores[PATH_MAX_LENGTH] = {0};
|
2015-11-25 03:05:04 +00:00
|
|
|
struct string_list *stnames = NULL;
|
|
|
|
struct string_list *stcores = NULL;
|
2015-11-21 19:10:22 +00:00
|
|
|
global_t *global = global_get_ptr();
|
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
const char *path = path_basename(label);
|
|
|
|
core_info_list_t *list = global ? global->core_info.list : NULL;
|
|
|
|
if (!list)
|
|
|
|
return -1;
|
|
|
|
|
2015-11-25 03:05:04 +00:00
|
|
|
stnames = string_split(settings->playlist_names, ";");
|
|
|
|
stcores = string_split(settings->playlist_cores, ";");
|
|
|
|
found = string_list_find_elem(stnames, path);
|
2015-11-21 19:10:22 +00:00
|
|
|
|
|
|
|
if (found)
|
|
|
|
string_list_set(stcores, found-1, "DETECT");
|
|
|
|
|
|
|
|
string_list_join_concat(new_playlist_cores, sizeof(new_playlist_cores), stcores, ";");
|
|
|
|
|
|
|
|
strlcpy(settings->playlist_cores, new_playlist_cores, sizeof(settings->playlist_cores));
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-11-21 07:56:24 +00:00
|
|
|
static int action_start_video_resolution(unsigned type, const char *label)
|
2015-07-06 05:44:49 +00:00
|
|
|
{
|
|
|
|
unsigned width = 0, height = 0;
|
|
|
|
|
|
|
|
video_driver_set_video_mode(640, 480, true);
|
2015-07-06 22:30:34 +00:00
|
|
|
|
2015-07-06 21:07:33 +00:00
|
|
|
if (video_driver_get_video_output_size(&width, &height))
|
|
|
|
{
|
2015-07-06 22:30:34 +00:00
|
|
|
char msg[PATH_MAX_LENGTH] = {0};
|
|
|
|
|
2015-11-21 07:56:24 +00:00
|
|
|
snprintf(msg, sizeof(msg),"Resetting to: %dx%d", width, height);
|
2015-09-22 20:14:03 +00:00
|
|
|
menu_display_msg_queue_push(msg, 1, 100, true);
|
2015-07-06 21:07:33 +00:00
|
|
|
}
|
2015-07-06 22:30:34 +00:00
|
|
|
|
2015-07-06 05:44:49 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-05-18 13:22:08 +00:00
|
|
|
static int action_start_lookup_setting(unsigned type, const char *label)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
2015-06-12 15:23:31 +00:00
|
|
|
return menu_setting_set(type, label, MENU_ACTION_START, false);
|
2015-02-26 17:28:48 +00:00
|
|
|
}
|
|
|
|
|
2015-09-06 13:12:32 +00:00
|
|
|
static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs,
|
2015-06-05 10:38:46 +00:00
|
|
|
uint32_t hash)
|
|
|
|
{
|
|
|
|
switch (hash)
|
|
|
|
{
|
|
|
|
case MENU_LABEL_REMAP_FILE_LOAD:
|
2015-10-11 18:26:44 +00:00
|
|
|
BIND_ACTION_START(cbs, action_start_remap_file_load);
|
2015-06-05 10:38:46 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_FILTER:
|
2015-10-11 18:26:44 +00:00
|
|
|
BIND_ACTION_START(cbs, action_start_video_filter_file_load);
|
2015-06-05 10:38:46 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_PASS:
|
2015-10-11 18:26:44 +00:00
|
|
|
BIND_ACTION_START(cbs, action_start_shader_pass);
|
2015-06-05 10:38:46 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_SCALE_PASS:
|
2015-10-11 18:26:44 +00:00
|
|
|
BIND_ACTION_START(cbs, action_start_shader_scale_pass);
|
2015-06-05 10:38:46 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_FILTER_PASS:
|
2015-10-11 18:26:44 +00:00
|
|
|
BIND_ACTION_START(cbs, action_start_shader_filter_pass);
|
2015-06-05 10:38:46 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_VIDEO_SHADER_NUM_PASSES:
|
2015-10-11 18:26:44 +00:00
|
|
|
BIND_ACTION_START(cbs, action_start_shader_num_passes);
|
2015-06-05 10:38:46 +00:00
|
|
|
break;
|
|
|
|
case MENU_LABEL_CHEAT_NUM_PASSES:
|
2015-10-11 18:26:44 +00:00
|
|
|
BIND_ACTION_START(cbs, action_start_cheat_num_passes);
|
2015-06-05 10:38:46 +00:00
|
|
|
break;
|
2015-07-06 05:50:11 +00:00
|
|
|
case MENU_LABEL_SCREEN_RESOLUTION:
|
2015-10-11 18:26:44 +00:00
|
|
|
BIND_ACTION_START(cbs, action_start_video_resolution);
|
2015-06-05 10:38:46 +00:00
|
|
|
default:
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
static int menu_cbs_init_bind_start_compare_type(menu_file_list_cbs_t *cbs,
|
2015-06-07 16:00:19 +00:00
|
|
|
unsigned type)
|
2015-02-26 17:28:48 +00:00
|
|
|
{
|
2015-06-05 10:38:46 +00:00
|
|
|
if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
2015-02-26 17:28:48 +00:00
|
|
|
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
2015-10-11 18:26:44 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_shader_action_parameter);
|
|
|
|
}
|
2015-02-26 17:28:48 +00:00
|
|
|
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
|
|
|
|
&& type <= MENU_SETTINGS_SHADER_PRESET_PARAMETER_LAST)
|
2015-10-11 18:26:44 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_shader_action_preset_parameter);
|
|
|
|
}
|
2015-02-26 17:28:48 +00:00
|
|
|
else if (type >= MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN &&
|
|
|
|
type <= MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_END)
|
2015-10-11 18:26:44 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_performance_counters_core);
|
|
|
|
}
|
2015-02-26 17:28:48 +00:00
|
|
|
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
|
|
|
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
2015-10-11 18:26:44 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_input_desc);
|
|
|
|
}
|
2015-02-26 17:28:48 +00:00
|
|
|
else if (type >= MENU_SETTINGS_PERF_COUNTERS_BEGIN &&
|
|
|
|
type <= MENU_SETTINGS_PERF_COUNTERS_END)
|
2015-10-11 18:26:44 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_performance_counters_frontend);
|
|
|
|
}
|
2015-11-21 19:10:22 +00:00
|
|
|
else if ((type >= MENU_SETTINGS_PLAYLIST_ASSOCIATION_START))
|
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_playlist_association);
|
|
|
|
}
|
2015-02-26 17:28:48 +00:00
|
|
|
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
2015-10-11 18:26:44 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_core_setting);
|
|
|
|
}
|
2015-07-06 05:46:27 +00:00
|
|
|
else if (type == MENU_LABEL_SCREEN_RESOLUTION)
|
2015-10-11 18:26:44 +00:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_video_resolution);
|
|
|
|
}
|
2015-06-07 16:00:19 +00:00
|
|
|
else
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
int menu_cbs_init_bind_start(menu_file_list_cbs_t *cbs,
|
2015-06-07 16:00:19 +00:00
|
|
|
const char *path, const char *label, unsigned type, size_t idx,
|
|
|
|
const char *elem0, const char *elem1,
|
|
|
|
uint32_t label_hash, uint32_t menu_label_hash)
|
|
|
|
{
|
|
|
|
if (!cbs)
|
2015-06-07 16:36:10 +00:00
|
|
|
return -1;
|
2015-06-07 16:00:19 +00:00
|
|
|
|
2015-10-11 18:26:44 +00:00
|
|
|
BIND_ACTION_START(cbs, action_start_lookup_setting);
|
2015-06-07 16:00:19 +00:00
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
if (menu_cbs_init_bind_start_compare_label(cbs, label_hash) == 0)
|
2015-06-07 16:36:10 +00:00
|
|
|
return 0;
|
|
|
|
|
2015-06-12 14:01:46 +00:00
|
|
|
if (menu_cbs_init_bind_start_compare_type(cbs, type) == 0)
|
2015-06-07 16:36:10 +00:00
|
|
|
return 0;
|
2015-06-07 16:00:19 +00:00
|
|
|
|
2015-06-07 16:36:10 +00:00
|
|
|
return -1;
|
2015-02-26 17:28:48 +00:00
|
|
|
}
|