2015-02-26 18:28:48 +01:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2017-01-22 13:40:32 +01:00
|
|
|
* Copyright (C) 2011-2017 - Daniel De Matteis
|
2015-02-26 18:28:48 +01:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2016-09-01 18:01:41 +02:00
|
|
|
#include <compat/strl.h>
|
2015-11-22 02:10:22 +07:00
|
|
|
#include <file/file_path.h>
|
2016-03-20 14:53:54 +01:00
|
|
|
#include <lists/string_list.h>
|
2018-02-08 22:24:18 -05:00
|
|
|
#include <string/stdstring.h>
|
2015-11-22 02:10:22 +07:00
|
|
|
|
2016-09-08 05:39:08 +02:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "../../config.h"
|
|
|
|
#endif
|
|
|
|
|
2015-12-06 17:55:27 +01:00
|
|
|
#include "../menu_driver.h"
|
2015-06-12 16:01:46 +02:00
|
|
|
#include "../menu_cbs.h"
|
2015-06-13 19:12:10 +02:00
|
|
|
#include "../menu_input.h"
|
2015-06-08 14:35:58 +02:00
|
|
|
#include "../menu_setting.h"
|
|
|
|
#include "../menu_shader.h"
|
2015-02-26 18:28:48 +01:00
|
|
|
|
2016-09-05 18:31:32 +02:00
|
|
|
#include "../../configuration.h"
|
2016-09-06 06:11:44 +02:00
|
|
|
#include "../../core.h"
|
2015-12-11 13:56:00 +01:00
|
|
|
#include "../../core_info.h"
|
2016-05-10 01:25:47 +02:00
|
|
|
#include "../../managers/core_option_manager.h"
|
2016-05-09 18:20:52 +02:00
|
|
|
#include "../../managers/cheat_manager.h"
|
2015-06-08 14:35:58 +02:00
|
|
|
#include "../../retroarch.h"
|
2016-05-10 08:53:14 +02:00
|
|
|
#include "../../performance_counters.h"
|
2019-06-26 17:40:00 +01:00
|
|
|
#include "../../playlist.h"
|
2015-02-26 18:28:48 +01:00
|
|
|
|
2017-08-31 02:25:04 +02:00
|
|
|
#include "../../input/input_driver.h"
|
2015-06-08 14:35:58 +02:00
|
|
|
#include "../../input/input_remapping.h"
|
2015-02-26 18:28:48 +01:00
|
|
|
|
2018-01-25 15:50:57 -05:00
|
|
|
#include "../../config.def.h"
|
|
|
|
|
2015-10-11 20:26:44 +02:00
|
|
|
#ifndef BIND_ACTION_START
|
|
|
|
#define BIND_ACTION_START(cbs, name) \
|
2018-04-11 06:11:23 +02:00
|
|
|
cbs->action_start = name; \
|
2015-10-11 20:26:44 +02:00
|
|
|
cbs->action_start_ident = #name;
|
|
|
|
#endif
|
|
|
|
|
2019-07-11 11:51:06 +02:00
|
|
|
#ifdef HAVE_AUDIOMIXER
|
2018-04-30 17:51:01 +02:00
|
|
|
static int action_start_audio_mixer_stream_volume(unsigned type, const char *label)
|
|
|
|
{
|
|
|
|
unsigned offset = (type - MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_VOLUME_BEGIN);
|
|
|
|
|
|
|
|
if (offset >= AUDIO_MIXER_MAX_STREAMS)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
audio_driver_mixer_set_stream_volume(offset, 1.0f);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
2019-07-11 11:51:06 +02:00
|
|
|
#endif
|
2018-04-30 17:51:01 +02:00
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_remap_file_load(unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2017-09-11 22:49:39 -05:00
|
|
|
input_remapping_set_defaults(true);
|
2015-02-26 18:28:48 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_video_filter_file_load(unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2015-03-20 21:22:38 +01:00
|
|
|
settings_t *settings = config_get_ptr();
|
|
|
|
|
2015-06-12 17:23:31 +02:00
|
|
|
if (!settings)
|
|
|
|
return -1;
|
|
|
|
|
2017-04-29 00:39:29 +02:00
|
|
|
settings->paths.path_softfilter_plugin[0] = '\0';
|
2016-05-09 20:51:53 +02:00
|
|
|
command_event(CMD_EVENT_REINIT, NULL);
|
2015-02-26 18:28:48 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-09-05 17:06:25 +02:00
|
|
|
static int generic_action_start_performance_counters(struct retro_perf_counter **counters,
|
|
|
|
unsigned offset, unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
|
|
|
if (counters[offset])
|
|
|
|
{
|
2015-09-05 17:06:25 +02:00
|
|
|
counters[offset]->total = 0;
|
2015-02-26 18:28:48 +01:00
|
|
|
counters[offset]->call_cnt = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_performance_counters_core(unsigned type, const char *label)
|
2015-09-05 17:06:25 +02:00
|
|
|
{
|
2015-10-11 18:21:07 +02:00
|
|
|
struct retro_perf_counter **counters = retro_get_perf_counter_libretro();
|
2015-09-05 17:06:25 +02:00
|
|
|
unsigned offset = type - MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN;
|
|
|
|
|
|
|
|
return generic_action_start_performance_counters(counters, offset, type, label);
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_performance_counters_frontend(unsigned type,
|
2015-09-05 17:06:25 +02:00
|
|
|
const char *label)
|
|
|
|
{
|
2015-10-11 18:21:07 +02:00
|
|
|
struct retro_perf_counter **counters = retro_get_perf_counter_rarch();
|
2015-09-05 17:06:25 +02:00
|
|
|
unsigned offset = type - MENU_SETTINGS_PERF_COUNTERS_BEGIN;
|
|
|
|
return generic_action_start_performance_counters(counters, offset, type, label);
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_input_desc(unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2015-06-12 17:23:31 +02:00
|
|
|
settings_t *settings = config_get_ptr();
|
2015-02-26 18:28:48 +01:00
|
|
|
unsigned inp_desc_index_offset = type - MENU_SETTINGS_INPUT_DESC_BEGIN;
|
2015-05-20 21:11:20 -05: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 18:28:48 +01:00
|
|
|
|
|
|
|
(void)label;
|
|
|
|
|
2015-05-20 21:11:20 -05:00
|
|
|
if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND)
|
2017-04-25 18:50:49 +02:00
|
|
|
{
|
2017-04-26 00:24:59 +02:00
|
|
|
const struct retro_keybind *keyptr = &input_config_binds[inp_desc_user]
|
|
|
|
[inp_desc_button_index_offset];
|
2017-04-28 21:03:04 +02:00
|
|
|
settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset] = keyptr->id;
|
2017-04-25 18:50:49 +02:00
|
|
|
}
|
2015-05-20 21:11:20 -05:00
|
|
|
else
|
2017-04-28 21:03:04 +02:00
|
|
|
settings->uints.input_remap_ids[inp_desc_user][inp_desc_button_index_offset] =
|
2015-05-20 21:11:20 -05:00
|
|
|
inp_desc_button_index_offset - RARCH_FIRST_CUSTOM_BIND;
|
2015-02-26 18:28:48 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-02-25 22:54:17 +01:00
|
|
|
static int action_start_shader_action_parameter(
|
|
|
|
unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2016-02-14 22:13:21 +01:00
|
|
|
video_shader_ctx_t shader_info;
|
2015-02-26 18:28:48 +01:00
|
|
|
struct video_shader_parameter *param = NULL;
|
2018-04-11 06:11:23 +02:00
|
|
|
unsigned parameter = type - MENU_SETTINGS_SHADER_PARAMETER_0;
|
2015-02-26 18:28:48 +01:00
|
|
|
|
2016-05-08 21:11:27 +02:00
|
|
|
video_shader_driver_get_current_shader(&shader_info);
|
2016-02-14 22:13:21 +01:00
|
|
|
|
|
|
|
if (!shader_info.data)
|
2015-02-26 18:28:48 +01:00
|
|
|
return 0;
|
|
|
|
|
2016-02-14 22:13:21 +01:00
|
|
|
param = &shader_info.data->parameters
|
2018-02-09 13:31:00 -05:00
|
|
|
[parameter];
|
2015-02-26 18:28:48 +01:00
|
|
|
param->current = param->initial;
|
2016-03-02 00:07:31 +01:00
|
|
|
param->current = MIN(MAX(param->minimum, param->current), param->maximum);
|
2015-03-08 17:19:46 +01:00
|
|
|
|
2016-12-24 23:32:02 +01:00
|
|
|
return menu_shader_manager_clear_parameter(parameter);
|
2015-02-26 18:28:48 +01:00
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_shader_pass(unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2018-04-11 06:11:23 +02:00
|
|
|
menu_handle_t *menu = NULL;
|
2015-02-26 18:28:48 +01:00
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
if (!menu_driver_ctl(RARCH_MENU_CTL_DRIVER_DATA_GET, &menu))
|
2018-03-25 17:02:30 +02:00
|
|
|
return menu_cbs_exit();
|
|
|
|
|
2018-04-30 15:19:54 +02:00
|
|
|
menu->scratchpad.unsigned_var = type - MENU_SETTINGS_SHADER_PASS_0;
|
2018-03-25 17:02:30 +02:00
|
|
|
|
2018-04-30 15:19:54 +02:00
|
|
|
menu_shader_manager_clear_pass_path(menu->scratchpad.unsigned_var);
|
2016-12-24 23:36:07 +01:00
|
|
|
|
2015-02-26 18:28:48 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_shader_scale_pass(unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2015-12-10 20:02:44 +01:00
|
|
|
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_SCALE_0;
|
2015-02-26 18:28:48 +01:00
|
|
|
|
2016-12-24 23:32:02 +01:00
|
|
|
menu_shader_manager_clear_pass_scale(pass);
|
2015-02-26 18:28:48 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_shader_filter_pass(unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2015-12-10 20:02:44 +01:00
|
|
|
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
2016-12-24 23:32:02 +01:00
|
|
|
return menu_shader_manager_clear_pass_filter(pass);
|
2015-02-26 18:28:48 +01:00
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_netplay_mitm_server(unsigned type, const char *label)
|
2018-02-02 15:37:02 -05:00
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
2018-04-11 06:11:23 +02:00
|
|
|
strlcpy(settings->arrays.netplay_mitm_server, netplay_mitm_server, sizeof(settings->arrays.netplay_mitm_server));
|
2018-02-02 15:37:02 -05:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_shader_watch_for_changes(unsigned type, const char *label)
|
2018-01-25 15:50:57 -05:00
|
|
|
{
|
|
|
|
settings_t *settings = config_get_ptr();
|
2019-06-14 11:13:02 +02:00
|
|
|
settings->bools.video_shader_watch_files = DEFAULT_VIDEO_SHADER_WATCH_FILES;
|
2018-01-25 15:50:57 -05:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_shader_num_passes(unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2016-12-24 23:36:07 +01:00
|
|
|
return menu_shader_manager_clear_num_passes();
|
2015-02-26 18:28:48 +01:00
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_cheat_num_passes(unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2015-12-01 02:55:07 +01:00
|
|
|
if (cheat_manager_get_size())
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2015-12-12 02:14:50 +01:00
|
|
|
bool refresh = false;
|
|
|
|
menu_entries_ctl(MENU_ENTRIES_CTL_SET_REFRESH, &refresh);
|
2018-07-25 19:19:14 -04:00
|
|
|
cheat_manager_realloc(0, CHEAT_HANDLER_TYPE_EMU);
|
2015-02-26 18:28:48 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_core_setting(unsigned type,
|
2015-05-18 15:22:08 +02:00
|
|
|
const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2015-12-10 22:30:25 +01:00
|
|
|
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
2016-04-06 02:30:20 +02:00
|
|
|
core_option_manager_t *coreopts = NULL;
|
2017-12-11 23:55:31 -08:00
|
|
|
|
2017-05-15 05:06:23 +02:00
|
|
|
if (rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
2016-05-10 01:21:55 +02:00
|
|
|
core_option_manager_set_default(coreopts, idx);
|
2015-02-26 18:28:48 +01:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_playlist_association(unsigned type, const char *label)
|
2015-11-22 02:10:22 +07:00
|
|
|
{
|
2019-06-26 17:40:00 +01:00
|
|
|
playlist_t *playlist = playlist_get_cached();
|
2015-11-22 02:10:22 +07:00
|
|
|
|
2019-06-26 17:40:00 +01:00
|
|
|
if (!playlist)
|
|
|
|
return -1;
|
2015-11-22 02:10:22 +07:00
|
|
|
|
2019-06-26 17:40:00 +01:00
|
|
|
/* Set default core path + name to DETECT */
|
|
|
|
playlist_set_default_core_path(playlist, file_path_str(FILE_PATH_DETECT));
|
|
|
|
playlist_set_default_core_name(playlist, file_path_str(FILE_PATH_DETECT));
|
|
|
|
playlist_write_file(playlist);
|
2015-11-22 02:10:22 +07:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_video_resolution(unsigned type, const char *label)
|
2015-07-06 00:44:49 -05:00
|
|
|
{
|
|
|
|
unsigned width = 0, height = 0;
|
2016-02-12 16:58:59 -05:00
|
|
|
global_t *global = global_get_ptr();
|
2015-07-06 00:44:49 -05:00
|
|
|
|
2016-02-12 16:58:59 -05:00
|
|
|
/* Reset the resolution id to zero */
|
|
|
|
global->console.screen.resolutions.current.id = 0;
|
2015-07-07 00:30:34 +02:00
|
|
|
|
2015-07-06 16:07:33 -05:00
|
|
|
if (video_driver_get_video_output_size(&width, &height))
|
|
|
|
{
|
2016-10-26 06:23:05 +02:00
|
|
|
char msg[PATH_MAX_LENGTH];
|
|
|
|
|
|
|
|
msg[0] = '\0';
|
2015-07-07 00:30:34 +02:00
|
|
|
|
2016-02-12 16:58:59 -05:00
|
|
|
video_driver_set_video_mode(width, height, true);
|
|
|
|
|
|
|
|
strlcpy(msg, "Resetting to: DEFAULT", sizeof(msg));
|
2018-11-22 15:45:52 +01:00
|
|
|
runloop_msg_queue_push(msg, 1, 100, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
2015-07-06 16:07:33 -05:00
|
|
|
}
|
2015-07-07 00:30:34 +02:00
|
|
|
|
2015-07-06 00:44:49 -05:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2018-04-11 06:11:23 +02:00
|
|
|
static int action_start_lookup_setting(unsigned type, const char *label)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2018-09-23 10:59:09 +02:00
|
|
|
return menu_setting_set(type, MENU_ACTION_START, false);
|
2015-02-26 18:28:48 +01:00
|
|
|
}
|
|
|
|
|
2018-02-09 01:09:17 +01:00
|
|
|
static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs)
|
2015-06-05 12:38:46 +02:00
|
|
|
{
|
2016-06-20 00:31:13 +02:00
|
|
|
if (cbs->enum_idx != MSG_UNKNOWN)
|
2015-06-05 12:38:46 +02:00
|
|
|
{
|
2016-06-16 20:14:15 +02:00
|
|
|
switch (cbs->enum_idx)
|
|
|
|
{
|
|
|
|
case MENU_ENUM_LABEL_REMAP_FILE_LOAD:
|
|
|
|
BIND_ACTION_START(cbs, action_start_remap_file_load);
|
|
|
|
break;
|
|
|
|
case MENU_ENUM_LABEL_VIDEO_FILTER:
|
|
|
|
BIND_ACTION_START(cbs, action_start_video_filter_file_load);
|
|
|
|
break;
|
|
|
|
case MENU_ENUM_LABEL_VIDEO_SHADER_PASS:
|
|
|
|
BIND_ACTION_START(cbs, action_start_shader_pass);
|
|
|
|
break;
|
|
|
|
case MENU_ENUM_LABEL_VIDEO_SHADER_SCALE_PASS:
|
|
|
|
BIND_ACTION_START(cbs, action_start_shader_scale_pass);
|
|
|
|
break;
|
|
|
|
case MENU_ENUM_LABEL_VIDEO_SHADER_FILTER_PASS:
|
|
|
|
BIND_ACTION_START(cbs, action_start_shader_filter_pass);
|
|
|
|
break;
|
2018-01-25 15:50:57 -05:00
|
|
|
case MENU_ENUM_LABEL_SHADER_WATCH_FOR_CHANGES:
|
|
|
|
BIND_ACTION_START(cbs, action_start_shader_watch_for_changes);
|
|
|
|
break;
|
2016-06-16 20:14:15 +02:00
|
|
|
case MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES:
|
|
|
|
BIND_ACTION_START(cbs, action_start_shader_num_passes);
|
|
|
|
break;
|
|
|
|
case MENU_ENUM_LABEL_CHEAT_NUM_PASSES:
|
|
|
|
BIND_ACTION_START(cbs, action_start_cheat_num_passes);
|
|
|
|
break;
|
|
|
|
case MENU_ENUM_LABEL_SCREEN_RESOLUTION:
|
|
|
|
BIND_ACTION_START(cbs, action_start_video_resolution);
|
2018-02-02 15:37:02 -05:00
|
|
|
break;
|
|
|
|
case MENU_ENUM_LABEL_NETPLAY_MITM_SERVER:
|
|
|
|
BIND_ACTION_START(cbs, action_start_netplay_mitm_server);
|
|
|
|
break;
|
2019-06-26 17:40:00 +01:00
|
|
|
case MENU_ENUM_LABEL_PLAYLIST_MANAGER_DEFAULT_CORE:
|
|
|
|
BIND_ACTION_START(cbs, action_start_playlist_association);
|
|
|
|
break;
|
2016-06-16 20:14:15 +02:00
|
|
|
default:
|
|
|
|
return -1;
|
|
|
|
}
|
|
|
|
}
|
2015-06-05 12:38:46 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-12 16:01:46 +02:00
|
|
|
static int menu_cbs_init_bind_start_compare_type(menu_file_list_cbs_t *cbs,
|
2015-06-07 18:00:19 +02:00
|
|
|
unsigned type)
|
2015-02-26 18:28:48 +01:00
|
|
|
{
|
2015-06-05 12:38:46 +02:00
|
|
|
if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
2015-02-26 18:28:48 +01:00
|
|
|
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
2015-10-11 20:26:44 +02:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_shader_action_parameter);
|
|
|
|
}
|
2015-02-26 18:28:48 +01:00
|
|
|
else if (type >= MENU_SETTINGS_SHADER_PRESET_PARAMETER_0
|
|
|
|
&& type <= MENU_SETTINGS_SHADER_PRESET_PARAMETER_LAST)
|
2015-10-11 20:26:44 +02:00
|
|
|
{
|
2018-02-08 22:24:18 -05:00
|
|
|
BIND_ACTION_START(cbs, action_start_shader_action_parameter);
|
2015-10-11 20:26:44 +02:00
|
|
|
}
|
2015-02-26 18:28:48 +01:00
|
|
|
else if (type >= MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN &&
|
|
|
|
type <= MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_END)
|
2015-10-11 20:26:44 +02:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_performance_counters_core);
|
|
|
|
}
|
2015-02-26 18:28:48 +01:00
|
|
|
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
|
|
|
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
2015-10-11 20:26:44 +02:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_input_desc);
|
|
|
|
}
|
2015-02-26 18:28:48 +01:00
|
|
|
else if (type >= MENU_SETTINGS_PERF_COUNTERS_BEGIN &&
|
|
|
|
type <= MENU_SETTINGS_PERF_COUNTERS_END)
|
2015-10-11 20:26:44 +02:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_performance_counters_frontend);
|
|
|
|
}
|
2015-02-26 18:28:48 +01:00
|
|
|
else if ((type >= MENU_SETTINGS_CORE_OPTION_START))
|
2015-10-11 20:26:44 +02:00
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_core_setting);
|
|
|
|
}
|
2018-02-09 01:09:17 +01:00
|
|
|
else if (type == MENU_LABEL_SCREEN_RESOLUTION)
|
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_video_resolution);
|
|
|
|
}
|
2015-06-07 18:00:19 +02:00
|
|
|
else
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2015-06-12 16:01:46 +02:00
|
|
|
int menu_cbs_init_bind_start(menu_file_list_cbs_t *cbs,
|
2016-07-02 06:57:47 +02:00
|
|
|
const char *path, const char *label, unsigned type, size_t idx)
|
2015-06-07 18:00:19 +02:00
|
|
|
{
|
|
|
|
if (!cbs)
|
2015-06-07 18:36:10 +02:00
|
|
|
return -1;
|
2015-06-07 18:00:19 +02:00
|
|
|
|
2019-07-11 11:51:06 +02:00
|
|
|
#ifdef HAVE_AUDIOMIXER
|
2018-04-30 17:51:01 +02:00
|
|
|
if (type >= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_VOLUME_BEGIN
|
|
|
|
&& type <= MENU_SETTINGS_AUDIO_MIXER_STREAM_ACTIONS_VOLUME_END)
|
|
|
|
{
|
|
|
|
BIND_ACTION_START(cbs, action_start_audio_mixer_stream_volume);
|
|
|
|
return 0;
|
|
|
|
}
|
2019-07-11 11:51:06 +02:00
|
|
|
#endif
|
2018-04-30 17:51:01 +02:00
|
|
|
|
2015-10-11 20:26:44 +02:00
|
|
|
BIND_ACTION_START(cbs, action_start_lookup_setting);
|
2017-12-11 23:55:31 -08:00
|
|
|
|
2018-02-09 01:09:17 +01:00
|
|
|
if (menu_cbs_init_bind_start_compare_label(cbs) == 0)
|
2015-06-07 18:36:10 +02:00
|
|
|
return 0;
|
|
|
|
|
2015-06-12 16:01:46 +02:00
|
|
|
if (menu_cbs_init_bind_start_compare_type(cbs, type) == 0)
|
2015-06-07 18:36:10 +02:00
|
|
|
return 0;
|
2015-06-07 18:00:19 +02:00
|
|
|
|
2015-06-07 18:36:10 +02:00
|
|
|
return -1;
|
2015-02-26 18:28:48 +01:00
|
|
|
}
|