RetroArch/menu/cbs/menu_cbs_deferred_push.c

1413 lines
80 KiB
C
Raw Normal View History

/* RetroArch - A frontend for libretro.
2017-01-22 07:40:32 -05:00
* Copyright (C) 2011-2017 - 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/>.
*/
2016-09-05 18:56:00 -04:00
#include <compat/strl.h>
#include <file/file_path.h>
#include <string/stdstring.h>
#include <lists/string_list.h>
2015-06-05 03:31:07 -04:00
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
2015-12-06 11:55:27 -05:00
#include "../menu_driver.h"
2015-06-26 09:28:01 -04:00
#include "../menu_cbs.h"
2015-11-23 09:13:26 -05:00
#include "../../msg_hash.h"
2015-06-13 13:15:48 -04:00
#include "../../database_info.h"
#include "../../cores/internal_cores.h"
2016-09-05 12:31:32 -04:00
#include "../../configuration.h"
2016-09-06 00:11:44 -04:00
#include "../../core.h"
#include "../../core_info.h"
2015-11-23 09:28:20 -05:00
#include "../../verbosity.h"
2015-11-23 09:13:26 -05:00
2020-06-06 20:41:48 -04:00
enum
{
PUSH_ARCHIVE_OPEN_DETECT_CORE = 0,
PUSH_ARCHIVE_OPEN,
PUSH_DEFAULT,
PUSH_DETECT_CORE_LIST
};
2015-10-11 15:08:07 -04:00
#ifndef BIND_ACTION_DEFERRED_PUSH
2020-03-27 20:59:15 -04:00
#define BIND_ACTION_DEFERRED_PUSH(cbs, name) (cbs)->action_deferred_push = (name)
2015-10-11 15:08:07 -04:00
#endif
2020-06-06 20:41:48 -04:00
#define GENERIC_DEFERRED_PUSH(name, type) \
2020-05-29 04:33:07 -04:00
static int (name)(menu_displaylist_info_t *info) \
{ \
settings_t *settings = config_get_ptr(); \
return deferred_push_dlist(info, type, settings); \
2020-05-29 04:33:07 -04:00
}
2020-06-06 20:41:48 -04:00
#define GENERIC_DEFERRED_CURSOR_MANAGER(name, type) \
2020-05-29 04:33:07 -04:00
static int (name)(menu_displaylist_info_t *info) \
{ \
return deferred_push_cursor_manager_list_generic(info, type); \
}
2020-06-06 20:41:48 -04:00
#define GENERIC_DEFERRED_PUSH_GENERAL(name, a, b) \
2020-05-29 04:33:07 -04:00
static int (name)(menu_displaylist_info_t *info) \
{ \
return general_push(info, a, b); \
}
2020-06-06 20:41:48 -04:00
static int deferred_push_dlist(
menu_displaylist_info_t *info,
enum menu_displaylist_ctl_state state,
settings_t *settings)
{
if (!menu_displaylist_ctl(state, info, settings))
return -1;
2017-05-26 14:12:52 -04:00
menu_displaylist_process(info);
return 0;
}
2017-12-05 08:11:50 -05:00
static int deferred_push_database_manager_list_deferred(
menu_displaylist_info_t *info)
{
settings_t *settings = config_get_ptr();
2017-12-05 08:11:50 -05:00
if (!string_is_empty(info->path_b))
free(info->path_b);
if (!string_is_empty(info->path_c))
free(info->path_c);
2017-12-05 08:11:50 -05:00
info->path_b = strdup(info->path);
info->path_c = NULL;
return deferred_push_dlist(info, DISPLAYLIST_DATABASE_QUERY, settings);
}
2021-03-10 03:06:39 -05:00
GENERIC_DEFERRED_PUSH(deferred_push_remappings_port, DISPLAYLIST_OPTIONS_REMAPPINGS_PORT)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_video_shader_preset_parameters, DISPLAYLIST_SHADER_PARAMETERS_PRESET)
GENERIC_DEFERRED_PUSH(deferred_push_video_shader_parameters, DISPLAYLIST_SHADER_PARAMETERS)
GENERIC_DEFERRED_PUSH(deferred_push_video_shader_preset_save, DISPLAYLIST_SHADER_PRESET_SAVE)
GENERIC_DEFERRED_PUSH(deferred_push_video_shader_preset_remove, DISPLAYLIST_SHADER_PRESET_REMOVE)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_settings, DISPLAYLIST_SETTINGS_ALL)
GENERIC_DEFERRED_PUSH(deferred_push_shader_options, DISPLAYLIST_OPTIONS_SHADERS)
GENERIC_DEFERRED_PUSH(deferred_push_quick_menu_override_options, DISPLAYLIST_OPTIONS_OVERRIDES)
GENERIC_DEFERRED_PUSH(deferred_push_options, DISPLAYLIST_OPTIONS)
GENERIC_DEFERRED_PUSH(deferred_push_netplay, DISPLAYLIST_NETPLAY_ROOM_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_netplay_sublist, DISPLAYLIST_NETPLAY)
GENERIC_DEFERRED_PUSH(deferred_push_content_settings, DISPLAYLIST_CONTENT_SETTINGS)
GENERIC_DEFERRED_PUSH(deferred_push_add_content_list, DISPLAYLIST_ADD_CONTENT_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_history_list, DISPLAYLIST_HISTORY)
GENERIC_DEFERRED_PUSH(deferred_push_database_manager_list, DISPLAYLIST_DATABASES)
GENERIC_DEFERRED_PUSH(deferred_push_content_collection_list, DISPLAYLIST_DATABASE_PLAYLISTS)
GENERIC_DEFERRED_PUSH(deferred_push_configurations_list, DISPLAYLIST_CONFIGURATIONS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_load_content_special, DISPLAYLIST_LOAD_CONTENT_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_load_content_list, DISPLAYLIST_LOAD_CONTENT_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_dump_disk_list, DISPLAYLIST_DUMP_DISC)
#ifdef HAVE_LAKKA
GENERIC_DEFERRED_PUSH(deferred_push_eject_disc, DISPLAYLIST_EJECT_DISC)
#endif
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_cdrom_info_detail_list, DISPLAYLIST_CDROM_DETAIL_INFO)
GENERIC_DEFERRED_PUSH(deferred_push_load_disk_list, DISPLAYLIST_LOAD_DISC)
GENERIC_DEFERRED_PUSH(deferred_push_information_list, DISPLAYLIST_INFORMATION_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_information, DISPLAYLIST_INFORMATION)
GENERIC_DEFERRED_PUSH(deferred_archive_action_detect_core, DISPLAYLIST_ARCHIVE_ACTION_DETECT_CORE)
GENERIC_DEFERRED_PUSH(deferred_archive_action, DISPLAYLIST_ARCHIVE_ACTION)
GENERIC_DEFERRED_PUSH(deferred_push_management_options, DISPLAYLIST_OPTIONS_MANAGEMENT)
GENERIC_DEFERRED_PUSH(deferred_push_core_counters, DISPLAYLIST_PERFCOUNTERS_CORE)
GENERIC_DEFERRED_PUSH(deferred_push_frontend_counters, DISPLAYLIST_PERFCOUNTERS_FRONTEND)
GENERIC_DEFERRED_PUSH(deferred_push_core_cheat_options, DISPLAYLIST_OPTIONS_CHEATS)
GENERIC_DEFERRED_PUSH(deferred_push_core_input_remapping_options, DISPLAYLIST_OPTIONS_REMAPPINGS)
GENERIC_DEFERRED_PUSH(deferred_push_remap_file_manager, DISPLAYLIST_REMAP_FILE_MANAGER)
2022-04-05 18:58:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_savestate_list, DISPLAYLIST_SAVESTATE_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_core_options, DISPLAYLIST_CORE_OPTIONS)
GENERIC_DEFERRED_PUSH(deferred_push_core_option_override_list, DISPLAYLIST_CORE_OPTION_OVERRIDE_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_disk_options, DISPLAYLIST_OPTIONS_DISK)
GENERIC_DEFERRED_PUSH(deferred_push_browse_url_list, DISPLAYLIST_BROWSE_URL_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_browse_url_start, DISPLAYLIST_BROWSE_URL_START)
GENERIC_DEFERRED_PUSH(deferred_push_core_list, DISPLAYLIST_CORES)
GENERIC_DEFERRED_PUSH(deferred_push_configurations, DISPLAYLIST_CONFIG_FILES)
GENERIC_DEFERRED_PUSH(deferred_push_video_shader_preset, DISPLAYLIST_SHADER_PRESET)
GENERIC_DEFERRED_PUSH(deferred_push_video_shader_preset_prepend, DISPLAYLIST_SHADER_PRESET_PREPEND)
GENERIC_DEFERRED_PUSH(deferred_push_video_shader_preset_append, DISPLAYLIST_SHADER_PRESET_APPEND)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_video_shader_pass, DISPLAYLIST_SHADER_PASS)
GENERIC_DEFERRED_PUSH(deferred_push_video_filter, DISPLAYLIST_VIDEO_FILTERS)
GENERIC_DEFERRED_PUSH(deferred_push_images, DISPLAYLIST_IMAGES)
GENERIC_DEFERRED_PUSH(deferred_push_audio_dsp_plugin, DISPLAYLIST_AUDIO_FILTERS)
GENERIC_DEFERRED_PUSH(deferred_push_cheat_file_load, DISPLAYLIST_CHEAT_FILES)
GENERIC_DEFERRED_PUSH(deferred_push_cheat_file_load_append, DISPLAYLIST_CHEAT_FILES)
GENERIC_DEFERRED_PUSH(deferred_push_remap_file_load, DISPLAYLIST_REMAP_FILES)
GENERIC_DEFERRED_PUSH(deferred_push_override_file_load, DISPLAYLIST_CONFIG_FILES)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_record_configfile, DISPLAYLIST_RECORD_CONFIG_FILES)
GENERIC_DEFERRED_PUSH(deferred_push_stream_configfile, DISPLAYLIST_STREAM_CONFIG_FILES)
GENERIC_DEFERRED_PUSH(deferred_push_input_overlay, DISPLAYLIST_OVERLAYS)
GENERIC_DEFERRED_PUSH(deferred_push_input_osk_overlay, DISPLAYLIST_OSK_OVERLAYS)
GENERIC_DEFERRED_PUSH(deferred_push_video_font_path, DISPLAYLIST_VIDEO_FONTS)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_xmb_font_path, DISPLAYLIST_FONTS)
GENERIC_DEFERRED_PUSH(deferred_push_content_history_path, DISPLAYLIST_CONTENT_HISTORY)
GENERIC_DEFERRED_PUSH(deferred_push_disc_information, DISPLAYLIST_DISC_INFO)
GENERIC_DEFERRED_PUSH(deferred_push_system_information, DISPLAYLIST_SYSTEM_INFO)
GENERIC_DEFERRED_PUSH(deferred_push_network_information, DISPLAYLIST_NETWORK_INFO)
GENERIC_DEFERRED_PUSH(deferred_push_achievement_pause_menu, DISPLAYLIST_ACHIEVEMENT_PAUSE_MENU)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_achievement_list, DISPLAYLIST_ACHIEVEMENT_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_rdb_collection, DISPLAYLIST_PLAYLIST_COLLECTION)
GENERIC_DEFERRED_PUSH(deferred_main_menu_list, DISPLAYLIST_MAIN_MENU)
GENERIC_DEFERRED_PUSH(deferred_music_list, DISPLAYLIST_MUSIC_LIST)
GENERIC_DEFERRED_PUSH(deferred_user_binds_list, DISPLAYLIST_USER_BINDS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_accounts_list, DISPLAYLIST_ACCOUNTS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_driver_settings_list, DISPLAYLIST_DRIVER_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_core_settings_list, DISPLAYLIST_CORE_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_core_information_list, DISPLAYLIST_CORE_INFO)
GENERIC_DEFERRED_PUSH(deferred_push_video_settings_list, DISPLAYLIST_VIDEO_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_video_fullscreen_mode_settings_list, DISPLAYLIST_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_video_windowed_mode_settings_list, DISPLAYLIST_VIDEO_WINDOWED_MODE_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_video_synchronization_settings_list, DISPLAYLIST_VIDEO_SYNCHRONIZATION_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_video_output_settings_list, DISPLAYLIST_VIDEO_OUTPUT_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_video_scaling_settings_list, DISPLAYLIST_VIDEO_SCALING_SETTINGS_LIST)
Add HDR support for D3D12 (rebased PR from MajorPainTheCactus) (#12917) * Add HDR support * Attempt to fix Mingw build and Metal builds * (D3D12) Fix relative header includes * Add missing hdr_sm5.hlsl.h * (d3d12_common.c) Some C89 build fixes * Fix MSVC build * - Attempt to fix build on mingw/msys unix with dirty hack - Fix shader compilation of hdr_sm5.hlsl.h on MSVC/Visual Studio - the define was seen as an error and was causing the first pipeline to error out - Make sure we manually set handle of backBuffer to NULL * Moving the release of the texture above the freeing of desc.srv_heap and desc.rtv_heap solves the hard crashes on teardown/setup in RA - it was crashing hard in d3d12_release_texture before * Add HAVE_D3D12_HDR ifdef - needs to be disabled for WinRT for now because of several things that are Windows desktop-specific right now (GetWindowRect) * Add dirty GUID hack - should work for both mingw/msys on Windows/Linux as well as MSVC/Visual Studio (hopefully) * Change HAVE_D3D12_HDR to HAVE_DXGI_HDR * Move away from camelcase named variables * Fix RARCH_ERR logs - they need a newline at the end * d3d12_check_display_hdr_support - make it return a bool on return and set d3d12->hdr.support and d3d12->hdr.enable outside of the function * (DXGI) Remove D3D12 dependencies from dxgi_check_display_hdr_support and move it to dxgi_common.c instead * (DXGI) move d3d12_swapchain_color_space over to dxgi_common.c and rename it dxgi_swapchain_color_space * (DXGI) move d3d12_set_hdr_metadata to dxgi_common.c and rename it dxgi_set_hdr_metadata * (DXGI) dxgi_check_display_hdr_support - better error handling? * Fix typo * Remove video_force_resolution * (D3D12) Address TODO/FIXME * (D3D12) Backport https://github.com/libretro/RetroArch/pull/12916/commits/c1b6c0bff2aa33cde035b43cb31ac7e78ff2a07a - Fixed resource transition for present when HDR is off Fixed cel shader displaying all black as blending was enabled when the hdr shader was being applied - turned off blending during this shader * Move d3d12_hdr_uniform_t to dxgi_common.h and rename it dxgi_hdr_uniform_t * (D3D11) Add HDR support * Add TODO/FIXME notes * Cache hdr_enable in video_frame_info_t * Update comment
2021-09-03 00:15:25 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_video_hdr_settings_list, DISPLAYLIST_VIDEO_HDR_SETTINGS_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_crt_switchres_settings_list, DISPLAYLIST_CRT_SWITCHRES_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_configuration_settings_list, DISPLAYLIST_CONFIGURATION_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_saving_settings_list, DISPLAYLIST_SAVING_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_cloud_sync_settings_list, DISPLAYLIST_CLOUD_SYNC_SETTINGS_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_mixer_stream_settings_list, DISPLAYLIST_MIXER_STREAM_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_logging_settings_list, DISPLAYLIST_LOGGING_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_frame_throttle_settings_list, DISPLAYLIST_FRAME_THROTTLE_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_rewind_settings_list, DISPLAYLIST_REWIND_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_frame_time_counter_settings_list, DISPLAYLIST_FRAME_TIME_COUNTER_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_cheat_details_settings_list, DISPLAYLIST_CHEAT_DETAILS_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_cheat_search_settings_list, DISPLAYLIST_CHEAT_SEARCH_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_display_settings_list, DISPLAYLIST_ONSCREEN_DISPLAY_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_notifications_settings_list, DISPLAYLIST_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST)
2020-07-16 11:30:38 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_notifications_views_settings_list, DISPLAYLIST_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST)
#if defined(HAVE_OVERLAY)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_onscreen_overlay_settings_list, DISPLAYLIST_ONSCREEN_OVERLAY_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_osk_overlay_settings_list, DISPLAYLIST_OSK_OVERLAY_SETTINGS_LIST)
#endif
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_menu_file_browser_settings_list,DISPLAYLIST_MENU_FILE_BROWSER_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_menu_views_settings_list, DISPLAYLIST_MENU_VIEWS_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_quick_menu_views_settings_list, DISPLAYLIST_QUICK_MENU_VIEWS_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_settings_views_settings_list, DISPLAYLIST_SETTINGS_VIEWS_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_menu_settings_list, DISPLAYLIST_MENU_SETTINGS_LIST)
2022-08-17 02:23:07 -04:00
#ifdef _3DS
GENERIC_DEFERRED_PUSH(deferred_push_menu_bottom_settings_list, DISPLAYLIST_MENU_BOTTOM_SETTINGS_LIST)
#endif
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_user_interface_settings_list, DISPLAYLIST_USER_INTERFACE_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_power_management_settings_list, DISPLAYLIST_POWER_MANAGEMENT_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_retro_achievements_settings_list,DISPLAYLIST_RETRO_ACHIEVEMENTS_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_cheevos_appearance_settings_list,DISPLAYLIST_CHEEVOS_APPEARANCE_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_cheevos_visibility_settings_list,DISPLAYLIST_CHEEVOS_VISIBILITY_SETTINGS_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_updater_settings_list, DISPLAYLIST_UPDATER_SETTINGS_LIST)
2020-06-17 07:56:44 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_bluetooth_settings_list, DISPLAYLIST_BLUETOOTH_SETTINGS_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_wifi_settings_list, DISPLAYLIST_WIFI_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_wifi_networks_list, DISPLAYLIST_WIFI_NETWORKS_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_network_settings_list, DISPLAYLIST_NETWORK_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_subsystem_settings_list, DISPLAYLIST_SUBSYSTEM_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_network_hosting_settings_list, DISPLAYLIST_NETWORK_HOSTING_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_netplay_kick_list, DISPLAYLIST_NETPLAY_KICK_LIST)
2022-07-07 10:08:46 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_netplay_ban_list, DISPLAYLIST_NETPLAY_BAN_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_netplay_lobby_filters_list, DISPLAYLIST_NETPLAY_LOBBY_FILTERS_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_lakka_services_list, DISPLAYLIST_LAKKA_SERVICES_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_user_settings_list, DISPLAYLIST_USER_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_directory_settings_list, DISPLAYLIST_DIRECTORY_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_privacy_settings_list, DISPLAYLIST_PRIVACY_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_midi_settings_list, DISPLAYLIST_MIDI_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_audio_settings_list, DISPLAYLIST_AUDIO_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_audio_output_settings_list, DISPLAYLIST_AUDIO_OUTPUT_SETTINGS_LIST)
Add microphone support via a new driver (#14731) * Some slight fixes * Update libretro.h * Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE * Finish proof-of-concept for mic support - It works, but doesn't support floating-point audio yet - It may need to be resampled, too * Add macros that aren't available in SDL 2 * Comment out a variable definition for now - For C89 compliance * Add some comments for clarity * Let ALSA tolerate a null new_rate * Partial ALSA microphone support - Not yet tested - Mic is created and destroyed - Mic can also be paused or unpaused - Mic is paused or unpaused with the rest of the driver - Microphone is not yet read * Install error logging in the ALSA driver - It defers to RARCH_ERR * Free the ALSA microphone in alsa_free * Fix an indent * First draft of alsa_read_microphone * Deinitialize SDL Audio in sdl_audio_free * Save and restore the ALSA error logger - You should always practice safe global state * Add newlines to some RARCH_ERRs * Add some logging * Check for the mic being active via settings instead of via flags * Adjusted a log entry to be less misleading - A frequency of 0Hz looks weird to the uninformed - In reality, it means the driver used the requested frequency * Fix an incorrect format string * Tidy up logging in alsa.c * Rename audio_enable_microphone to audio_enable_input * Rename microphone_device to audio_input_device * Add audio_input_latency and audio_input_block_frames settings * Add all mic-related settings to the options menu * Adjust logging for alsa.c - Log the ALSA library version - Add errno details * Refer to the microphone in logs by name * Use %u instead of %d for some log items * Add input_samples_buf * Remove an inaccurate comment * Change type of input_samples_buf * Clean up audio_driver_flush_microphone_input * Comment convert_float_to_s16 - It helped me understand what it's doing - Turns out it'll work just fine on mono audio * Don't use the resampler for mic input * Fix crash in the ALSA driver when reading from a mic * Update some logging messages * ALSA support now works for mics * Reuse some common functions in alsa.c * Add alsa_thread_microphone_t * Refactor alsa.c - Introduce alsa_init_pcm to init any PCM that we're using - Vastly simplifies the implementation of alsa_init and alsa_init_microphone - Will be used for the read-based versions next * Make ALSA logging a little more consistent * Clean up the mic with alsa_free_microphone if alsa_init_microphone fails * Remove an unused function * Move some cleanup in alsa.c to a common function * First crack at mic support for alsathread - Refactor some duplicate code into functions - Use functions introduced in alsa.c - Create and destroy the mic * Slight cleanups for clarity * Implement alsa_thread_set/get_microphone_state * More work on alsathread - No more crashing, but the mic just returns silence * Slight cleanups for clarity * Add alsa_set_mic_enabled_internal - For setting the state of a microphone while considering its current state * Use alsa_set_mic_enabled_internal * Log a little more info * Log when the audio driver is started/stopped * Move base microphone driver code into a new directory - Add microphone_driver.c to Makefile.common - Rename functions as needed * Initialize and deinitialize the microphone driver * Implement sdl_microphone.c * Un-const an argument - In case the driver context needs to do any locking * Revise comments for microphone_driver.h * Remove an unimplemented function * Remove some functions from the mic driver * Remove mic functions from audio_thread_wrapper * Remove mic functions from sdl_audio * Fix microphone_null * Split the mic code for the alsa audio drivers into microphone drivers * Fix an extra struct member * Add a setting for the mic driver * Add a command to reinitialize the microphone driver * Rename mic-related settings * Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL * Rename audio_enable_input to microphone_enable * Remove some labels from qt_options * Search for microphone_driver within find_driver_nonempty * Clean up some mic driver code * Pending mics now return silence * Adjust some logging and comments * Some cleanup in the microphone driver * Invert a flag check - Oops * Fix a log message * Fix the wrong flags being checked * Slight refactor of wasapi_init_device - Add a data_flow parameter - Declare it in a header - In preparation for WASAPI mic support * Add some WASAPI macros for _IAudioCaptureClient * Move some common WASAPI functions to audio/common/wasapi.c - They'll be used by the mic and the audio drivers * Add wasapi_log_hr * Generalize mmdevice_list_new to look for capture devices, too * Fix a function declaration * Move driver-specific device_list_new functions into their respective files * Clean up some declarations * First draft of wasapi microphone driver * Add wasapi_microphone_device_list_free * Change function parameter names to be consistent with microphone_driver * Partially implement wasapi_microphone_read - Mostly copied from the audio driver so far - It doesn't compile yet - But it'll be beautiful when I'm done with it * Refactor the mic driver's functions - Rename get_mic_active to mic_alive - Split set_mic_active into start_mic and stop_mic - Refactor the SDL mic driver accordingly * Edit some WASAPI functions for logging and clarity * Implement more of the WASAPI mic driver * Rename write_event to read_event * Pass the WASAPI driver context to the various read functions * Mostly implement the read function for the WASAPI mic driver * Fix a crash in microphone_driver - Forgot to move the position of the name of null_driver * Reduce some logging in wasapi common functions - Only log the chosen audio client format, not all attempted ones * Add some macro wrappers for IAudioClient methods * Update mic driver configuration - Make the mic driver configurable in the menu - Add config items for WASAPI-related options similar to the audio driver * Fix a menu entry scrolling through audio devices instead of mic devices * Add some utility functions * Expose the new utility functions in wasapi.h * Add extra logging in the WASAPI common functions * Add sharemode_name * Use _IAudioClient_Initialize macro in some places * Pass channels to wasapi_init_client - Remember, mics are in mono * Use _IAudioClient_Initialize macro some more * Forgot to pass channels in some places * Add some utility functions * Forgot an #include * Add wasapi_select_device_format * Simplify the format selection logic in wasapi_init_client_sh * Unset the microphone in wasapi_microphone_close_mic - Ought to prevent a potential segfault * Simplify some logging * Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer * Remove some unneeded logging * Add some values to hresult_name * Polish up wasapi_select_device_format - Test for formats manually when Windows can't - Add some debug logging - Check for channels * Compute the fields of WAVEFORMATEXTENSIBLE correctly - As per the doc's stated requirements * Simplify logic for WASAPI client creation * Fix a potential hang in wasapi_microphone_read_shared_buffered * Stop the microphone if the driver is stopped * Don't name the microphone event * Ensure that wasapi_init_client reports the correct format and rate * Implement exclusive microphone read access for WASAPI * Add _IAudioCaptureClient_GetNextPacketSize macro * Organize cases in hresult_name * Clear some extra fields if wasapi_set_format is setting a Pcm format * Adjust some logs * Adjust some logs * Remove unneeded local vars * Add a log * Update wasapi.c * Update wasapi.c * Fix shared-mode mic support in WASAPI producing broken input - Turns out it had nothing to do with shared mode * Reuse a common function - Remove wasapi_microphone_read_shared_buffered - Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered * Remove some code I was using for test purposes * Clarify some language * Double the default shared-mode mic buffer length * Split getting a device's name into a separate function, then use it * Fix the ALSA mic drivers - To comply with changes I previously made to the mic driver interface * Remove unused synchronization primitives from the SDL microphone driver * Add sdl_microphone_mic_use_float * Document audio_driver_state_flags - I needed to understand these to see if similar flags were required for the mic driver * Remove an unused function in wasapi.c * Add and document flags in microphone_driver.h * Remove driver-specific mic start/stop functions - The mic driver itself doesn't do much processing - That honor goes to individual mics * Remove some unused fields in microphone_driver.h * Add CMD_EVENT_MICROPHONE_STOP/START * Remove unused functions from microphone_null * Change how the mic driver state is referenced in some places * Simplify the SDL microphone driver - The driver backend no longer keeps a reference to the mic (the frontend does that) - Remove functions that are no longer needed - Don't track paused state, just query the mic itself * Simplify the WASAPI microphone driver - Don't track the driver running state or the microphone handle, the frontend does that now - Remove support for unbuffered input (hunterk suggested that it wasn't necessary) * Make microphone_wasapi_sh_buffer_length a uint, not an int - It won't be negative anymore - 0 now represents the default value * Make the microphone frontend more robust - Improve documentation for how various functions should be implemented - Closes all microphones before freeing the driver (so backends don't have to) - Tracks the enabled state of each microphone, so backends don't have to (but they still can) * Stop the mic driver in core_unload_game * Ensure mic support is compatible with the revised menu code * Move alsa.h into audio/common * Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED - It was never really needed * Refactor the ALSA microphone driver - Move common ALSA functions to audio/common/alsa.c - Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm - Don't track the microphone handle in the ALSA driver context - Remove unneeded fields * Move some common alsathread code into audio/common/alsathread.c * Change return type of mic_driver_open_mic_internal to bool * First crack at resampling mic input * Remove an extraneous check - I think something distracted me when I was writing this line * Add stereo/mono conversion functions * Make alsa_start_pcm and alsa_stop_pcm more robust - They now return success if the stream is already running and stopped, respectively * Revise some mic-related comments in libretro.h * First crack at resampling mic input * Simplify an expression * Simplify an expression * Fix a log tag * Allow mic resampler to be configured separately from audio resampler * Add some comments * Set the source ratio to something sensible * Stop deadlock in `alsathread` mic driver * Allow mics to be initialized even when core is loaded from CLI - When loading content from CLI, the drivers are initialized a little differently - That threw off the mic initialization code * Rename the functions in retro_microphone_interface * Revise some mic-related comments in libretro.h * Update retro_microphone_interface - Add get_mic_rate - Add a parameter to open_mic - The modifications don't do anything yet * Use parameter objects in the microphone handle * Replace get_mic_rate with get_params * Add a microphone interface version * Remove part of a comment * Set the effective params in mic_driver_microphone_handle_init * Drop a stray newline * Change where the mic interface is zeroed - I was accidentally throwing out the version that the core was asking for * Reduce logspam for wasapi_set_nonblock_state - Now it only logs when the sync mode is changed * Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0 - -16 is no longer a valid value * Set the new_rate in wasapi_init * Change description of microphone sample rate in the settings * First attempt at resampling configured mic input * Forgot a section * Fix some input samples being skipped * Rename a variable for clarity * Add microphone.outgoing_samples * Update the mic driver - Processed samples are now buffered - The resampler is skipped if the ratio is (very close to) 1 * Remove part of a comment * Update some comments in audio_resampler.h * Slightly refactor the SDL microphone driver - Move SDL_AudioSpec to a field of sdl_microphone_handle_t - Allow SDL to change the requested format and sample rate - Request floating-point input - Implement sdl_microphone_mic_use_float * Fix a non-C89-compliant declaration * Add new files to griffin.c * Remove a C++-style comment * Add two more files to griffin.c * Remove some unneeded declarations in microphone_driver.h * Remove a stray comma in configuration.c - For C89 compliance * Fix compilation on some platforms * Change some function signatures * Make the ALSA drivers always set the audio rate * Fix the alsathread mic driver * Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined * Mute the microphone if the core is running in fast-forward, slow-mo, or rewind * Clarify a comment * Clarify a comment * Add a comment * Don't allocate memory for slowmo samples in the mic driver - We're not supporting slowmo for mics, so it's not needed * Fix a { * Add my name to AUTHORS.h * Add driver_lifetime_flags - For drivers that have special setup/teardown needs * Ensure that resetting the mic driver maintains active mic handles - Prevents fullscreen toggle from stopping all mic input * Update CHANGES.md * Move some default microphone settings to a new part of the config file * Ensure that RetroArch can use the audio format that Windows suggests * Remove references to mic support in the SDL audio driver * Remove unused WASAPI functions * Return failure if RetroArch couldn't select a WASAPI format * Ensure that Windows uses the WASAPI mic driver by default * Treat disabled mic support as a warning, not an error * Clarify some WASAPI-related microphone settings * Remove some unused variables * Add or revise microphone-related comments * Rearrange doc comments for microphone types in libretro.h * Remove a space * Remove some unused flags * Remove ALSA error logger - It was never used anyway * Remove unneeded microphone-related arguments * Document a parameter * Remove a logging call * Add a constant for the microphone's shared buffer length for WASAPI * Fix stylistic inconsistencies * Make mic_driver_get_sample_size a macro instead of a function * Move the microphone implementation to the audio directory * Make microphone support optional (but enabled by default) * Fix the griffin build
2023-06-06 15:55:06 -04:00
#ifdef HAVE_MICROPHONE
GENERIC_DEFERRED_PUSH(deferred_push_microphone_settings_list, DISPLAYLIST_MICROPHONE_SETTINGS_LIST)
#endif
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_audio_synchronization_settings_list, DISPLAYLIST_AUDIO_SYNCHRONIZATION_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_audio_mixer_settings_list, DISPLAYLIST_AUDIO_MIXER_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_input_settings_list, DISPLAYLIST_INPUT_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_input_menu_settings_list, DISPLAYLIST_INPUT_MENU_SETTINGS_LIST)
2021-03-25 12:45:31 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_input_turbo_fire_settings_list, DISPLAYLIST_INPUT_TURBO_FIRE_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_input_haptic_feedback_settings_list, DISPLAYLIST_INPUT_HAPTIC_FEEDBACK_SETTINGS_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_ai_service_settings_list, DISPLAYLIST_AI_SERVICE_SETTINGS_LIST)
2021-03-25 12:45:31 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_accessibility_settings_list, DISPLAYLIST_ACCESSIBILITY_SETTINGS_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_latency_settings_list, DISPLAYLIST_LATENCY_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_recording_settings_list, DISPLAYLIST_RECORDING_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_playlist_settings_list, DISPLAYLIST_PLAYLIST_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_playlist_manager_list, DISPLAYLIST_PLAYLIST_MANAGER_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_playlist_manager_settings, DISPLAYLIST_PLAYLIST_MANAGER_SETTINGS)
GENERIC_DEFERRED_PUSH(deferred_push_input_retropad_binds_list, DISPLAYLIST_INPUT_RETROPAD_BINDS_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_input_hotkey_binds_list, DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_accounts_cheevos_list, DISPLAYLIST_ACCOUNTS_CHEEVOS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_accounts_twitch_list, DISPLAYLIST_ACCOUNTS_TWITCH_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_accounts_youtube_list, DISPLAYLIST_ACCOUNTS_YOUTUBE_LIST)
2020-12-28 08:20:40 -05:00
GENERIC_DEFERRED_PUSH(deferred_push_accounts_facebook_list, DISPLAYLIST_ACCOUNTS_FACEBOOK_LIST)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_help, DISPLAYLIST_HELP_SCREEN_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_rdb_entry_detail, DISPLAYLIST_DATABASE_ENTRY)
GENERIC_DEFERRED_PUSH(deferred_push_rpl_entry_actions, DISPLAYLIST_HORIZONTAL_CONTENT_ACTIONS)
GENERIC_DEFERRED_PUSH(deferred_push_core_list_deferred, DISPLAYLIST_CORES_SUPPORTED)
GENERIC_DEFERRED_PUSH(deferred_push_core_collection_list_deferred, DISPLAYLIST_CORES_COLLECTION_SUPPORTED)
GENERIC_DEFERRED_PUSH(deferred_push_menu_sounds_list, DISPLAYLIST_MENU_SOUNDS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_rgui_theme_preset, DISPLAYLIST_RGUI_THEME_PRESETS)
#ifdef HAVE_NETWORKING
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_thumbnails_updater_list, DISPLAYLIST_THUMBNAILS_UPDATER)
GENERIC_DEFERRED_PUSH(deferred_push_pl_thumbnails_updater_list, DISPLAYLIST_PL_THUMBNAILS_UPDATER)
GENERIC_DEFERRED_PUSH(deferred_push_core_updater_list, DISPLAYLIST_CORES_UPDATER)
GENERIC_DEFERRED_PUSH(deferred_push_core_content_list, DISPLAYLIST_CORE_CONTENT)
GENERIC_DEFERRED_PUSH(deferred_push_core_content_dirs_list, DISPLAYLIST_CORE_CONTENT_DIRS)
GENERIC_DEFERRED_PUSH(deferred_push_core_content_dirs_subdir_list, DISPLAYLIST_CORE_CONTENT_DIRS_SUBDIR)
GENERIC_DEFERRED_PUSH(deferred_push_core_system_files_list, DISPLAYLIST_CORE_SYSTEM_FILES)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_lakka_list, DISPLAYLIST_LAKKA)
#endif
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_switch_cpu_profile, DISPLAYLIST_SWITCH_CPU_PROFILE)
#endif
2018-10-06 08:52:44 -04:00
#ifdef HAVE_LAKKA_SWITCH
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_switch_gpu_profile, DISPLAYLIST_SWITCH_GPU_PROFILE)
2018-10-06 08:52:44 -04:00
#endif
#if defined(HAVE_LAKKA)
GENERIC_DEFERRED_PUSH(deferred_push_cpu_perfpower, DISPLAYLIST_CPU_PERFPOWER_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_cpu_policy, DISPLAYLIST_CPU_POLICY_LIST)
#endif
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_manual_content_scan_list, DISPLAYLIST_MANUAL_CONTENT_SCAN_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_manual_content_scan_dat_file, DISPLAYLIST_MANUAL_CONTENT_SCAN_DAT_FILES)
2019-11-29 12:13:35 -05:00
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_core_restore_backup_list, DISPLAYLIST_CORE_RESTORE_BACKUP_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_core_delete_backup_list, DISPLAYLIST_CORE_DELETE_BACKUP_LIST)
2020-06-11 09:12:20 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_core_manager_list, DISPLAYLIST_CORE_MANAGER_LIST)
#ifdef HAVE_MIST
GENERIC_DEFERRED_PUSH(deferred_push_steam_settings_list, DISPLAYLIST_STEAM_SETTINGS_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_core_manager_steam_list, DISPLAYLIST_CORE_MANAGER_STEAM_LIST)
GENERIC_DEFERRED_PUSH(deferred_push_core_information_steam_list, DISPLAYLIST_CORE_INFORMATION_STEAM_LIST)
#endif
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH(deferred_push_file_browser_select_sideload_core, DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE)
2020-01-09 09:13:21 -05:00
2016-06-20 16:51:48 -04:00
static int deferred_push_cursor_manager_list_deferred(
menu_displaylist_info_t *info)
2016-06-20 16:51:48 -04:00
{
2016-10-15 19:49:54 -04:00
char rdb_path[PATH_MAX_LENGTH];
2017-09-27 21:06:54 -04:00
const char *path = info->path;
settings_t *settings = NULL;
config_file_t *conf = NULL;
struct config_entry_list
*query_entry = NULL;
struct config_entry_list
*rdb_entry = NULL;
if (!(conf = config_file_new_from_path_to_string(path)))
return -1;
query_entry = config_get_entry(conf, "query");
rdb_entry = config_get_entry(conf, "rdb");
2016-06-20 16:51:48 -04:00
if (
!query_entry
|| (string_is_empty(query_entry->value))
|| !rdb_entry
|| (string_is_empty(rdb_entry->value))
)
{
config_file_free(conf);
return -1;
}
2016-06-20 16:51:48 -04:00
settings = config_get_ptr();
fill_pathname_join_special(rdb_path,
settings->paths.path_content_database,
rdb_entry->value, sizeof(rdb_path));
2017-10-04 00:53:47 -04:00
if (!string_is_empty(info->path_b))
2017-09-27 20:30:31 -04:00
free(info->path_b);
2017-10-04 00:53:47 -04:00
if (!string_is_empty(info->path_c))
2017-09-27 20:30:31 -04:00
free(info->path_c);
info->path_b = strdup(info->path);
2017-10-04 00:53:47 -04:00
if (!string_is_empty(info->path))
2017-09-27 21:06:54 -04:00
free(info->path);
2017-09-27 20:30:31 -04:00
info->path_c = strdup(query_entry->value);
2017-09-27 21:06:54 -04:00
info->path = strdup(rdb_path);
config_file_free(conf);
2017-09-27 20:30:31 -04:00
return deferred_push_dlist(info, DISPLAYLIST_DATABASE_QUERY, settings);
2016-06-20 16:51:48 -04:00
}
2016-12-23 21:21:29 -05:00
#ifdef HAVE_LIBRETRODB
static int deferred_push_cursor_manager_list_generic(
menu_displaylist_info_t *info, enum database_query_type type)
{
char query[256];
2017-09-27 21:06:54 -04:00
int ret = -1;
const char *path = info->path;
2020-08-26 06:41:57 -04:00
struct string_list str_list = {0};
settings_t *settings = config_get_ptr();
2020-08-26 06:41:57 -04:00
if (!path)
2017-09-27 21:06:54 -04:00
goto end;
2020-08-26 06:41:57 -04:00
string_list_initialize(&str_list);
string_split_noalloc(&str_list, path, "|");
database_info_build_query_enum(query, sizeof(query), type,
str_list.elems[0].data);
if (string_is_empty(query))
goto end;
2017-10-04 00:53:47 -04:00
if (!string_is_empty(info->path_b))
2017-09-27 20:30:31 -04:00
free(info->path_b);
2017-10-04 00:53:47 -04:00
if (!string_is_empty(info->path_c))
2017-09-27 20:30:31 -04:00
free(info->path_c);
2017-10-04 00:53:47 -04:00
if (!string_is_empty(info->path))
2017-09-27 21:06:54 -04:00
free(info->path);
2017-09-27 20:30:31 -04:00
2020-08-26 06:41:57 -04:00
info->path = strdup(str_list.elems[1].data);
info->path_b = strdup(str_list.elems[0].data);
2017-09-27 20:30:31 -04:00
info->path_c = strdup(query);
ret = deferred_push_dlist(info, DISPLAYLIST_DATABASE_QUERY, settings);
end:
2020-08-26 06:41:57 -04:00
string_list_deinitialize(&str_list);
return ret;
}
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_max_users, DATABASE_QUERY_ENTRY_MAX_USERS)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_famitsu_magazine_rating, DATABASE_QUERY_ENTRY_FAMITSU_MAGAZINE_RATING)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_edge_magazine_rating, DATABASE_QUERY_ENTRY_EDGE_MAGAZINE_RATING)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_edge_magazine_issue, DATABASE_QUERY_ENTRY_EDGE_MAGAZINE_ISSUE)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_elspa_rating, DATABASE_QUERY_ENTRY_ELSPA_RATING)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_cero_rating, DATABASE_QUERY_ENTRY_CERO_RATING)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_pegi_rating, DATABASE_QUERY_ENTRY_PEGI_RATING)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_bbfc_rating, DATABASE_QUERY_ENTRY_BBFC_RATING)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_esrb_rating, DATABASE_QUERY_ENTRY_ESRB_RATING)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_enhancement_hw, DATABASE_QUERY_ENTRY_ENHANCEMENT_HW)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_franchise, DATABASE_QUERY_ENTRY_FRANCHISE)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_publisher, DATABASE_QUERY_ENTRY_PUBLISHER)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_developer, DATABASE_QUERY_ENTRY_DEVELOPER)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_origin, DATABASE_QUERY_ENTRY_ORIGIN)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_releasemonth, DATABASE_QUERY_ENTRY_RELEASEDATE_MONTH)
GENERIC_DEFERRED_CURSOR_MANAGER(deferred_push_cursor_manager_list_deferred_query_rdb_entry_releaseyear, DATABASE_QUERY_ENTRY_RELEASEDATE_YEAR)
#endif
2016-06-20 16:51:48 -04:00
2016-01-25 12:21:48 -05:00
static int general_push(menu_displaylist_info_t *info,
2016-02-25 16:11:02 -05:00
unsigned id, enum menu_displaylist_ctl_state state)
{
char newstring2[PATH_MAX_LENGTH];
2020-03-02 14:10:24 -05:00
settings_t *settings = config_get_ptr();
menu_handle_t *menu = menu_state_get_ptr()->driver_data;
2022-11-22 12:34:04 -05:00
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
2020-03-02 14:10:24 -05:00
bool
multimedia_builtin_mediaplayer_enable = settings->bools.multimedia_builtin_mediaplayer_enable;
2022-11-22 12:34:04 -05:00
#endif
#ifdef HAVE_IMAGEVIEWER
2020-03-02 14:10:24 -05:00
bool multimedia_builtin_imageviewer_enable = settings->bools.multimedia_builtin_imageviewer_enable;
2022-11-22 12:34:04 -05:00
#endif
2016-02-10 15:15:23 -05:00
2019-08-16 09:17:02 -04:00
if (!menu)
return -1;
2022-11-22 11:40:21 -05:00
if ( (id == PUSH_ARCHIVE_OPEN_DETECT_CORE)
|| (id == PUSH_ARCHIVE_OPEN))
2015-09-01 14:27:14 -04:00
{
2022-11-22 11:40:21 -05:00
/* Need to use the scratch buffer here */
char tmp_str[PATH_MAX_LENGTH];
fill_pathname_join_special(tmp_str, menu->scratch2_buf,
menu->scratch_buf, sizeof(tmp_str));
if (!string_is_empty(info->path))
free(info->path);
info->path = strdup(tmp_str);
2022-11-22 11:40:21 -05:00
if (!string_is_empty(info->label))
free(info->label);
info->label = strdup(tmp_str);
2015-09-01 14:27:14 -04:00
}
2016-06-20 09:50:37 -04:00
info->type_default = FILE_TYPE_PLAIN;
if (id != PUSH_DETECT_CORE_LIST)
info->setting = menu_setting_find_enum(info->enum_idx);
2022-11-22 11:40:21 -05:00
newstring2[0] = '\0';
switch (id)
{
2015-09-01 14:27:14 -04:00
case PUSH_ARCHIVE_OPEN:
{
struct retro_system_info *sysinfo =
2021-09-21 13:08:26 -04:00
&runloop_state_get_ptr()->system.info;
if (sysinfo)
if (!string_is_empty(sysinfo->valid_extensions))
strlcpy(newstring2, sysinfo->valid_extensions,
sizeof(newstring2));
}
break;
case PUSH_DEFAULT:
{
const char *valid_extensions = NULL;
2022-11-22 11:40:21 -05:00
if (menu_setting_get_browser_selection_type(info->setting) != ST_DIR)
{
struct retro_system_info *sysinfo = &runloop_state_get_ptr()->system.info;
if (sysinfo && !string_is_empty(sysinfo->valid_extensions))
valid_extensions = sysinfo->valid_extensions;
}
if (!valid_extensions)
valid_extensions = info->exts;
if (!string_is_empty(valid_extensions))
{
struct string_list str_list3 = {0};
2020-08-25 22:39:19 -04:00
string_list_initialize(&str_list3);
string_split_noalloc(&str_list3, valid_extensions, "|");
2020-08-25 22:39:19 -04:00
#ifdef HAVE_IBXM
2020-08-25 22:39:19 -04:00
{
union string_list_elem_attr attr;
attr.i = 0;
string_list_append(&str_list3, "s3m", attr);
string_list_append(&str_list3, "mod", attr);
string_list_append(&str_list3, "xm", attr);
}
#endif
string_list_join_concat(newstring2, sizeof(newstring2),
2020-08-25 22:39:19 -04:00
&str_list3, "|");
string_list_deinitialize(&str_list3);
}
}
2015-09-01 14:27:14 -04:00
break;
case PUSH_ARCHIVE_OPEN_DETECT_CORE:
case PUSH_DETECT_CORE_LIST:
{
union string_list_elem_attr attr;
char newstring[PATH_MAX_LENGTH];
struct string_list str_list2 = {0};
struct retro_system_info *sysinfo =
2021-09-21 13:08:26 -04:00
&runloop_state_get_ptr()->system.info;
bool filter_by_current_core = settings->bools.filter_by_current_core;
newstring[0] = '\0';
attr.i = 0;
string_list_initialize(&str_list2);
if (sysinfo)
{
if (!string_is_empty(sysinfo->valid_extensions))
{
unsigned x;
struct string_list str_list = {0};
string_list_initialize(&str_list);
string_split_noalloc(&str_list,
sysinfo->valid_extensions, "|");
for (x = 0; x < str_list.size; x++)
{
const char *elem = str_list.elems[x].data;
string_list_append(&str_list2, elem, attr);
}
string_list_deinitialize(&str_list);
}
}
2020-03-02 14:10:24 -05:00
if (!filter_by_current_core)
{
2022-11-22 11:40:21 -05:00
core_info_list_t *list = NULL;
2022-11-21 17:11:34 -05:00
core_info_get_list(&list);
if (list && !string_is_empty(list->all_ext))
{
unsigned x;
struct string_list str_list = {0};
string_list_initialize(&str_list);
string_split_noalloc(&str_list,
2020-03-02 14:10:24 -05:00
list->all_ext, "|");
for (x = 0; x < str_list.size; x++)
{
if (!string_list_find_elem(&str_list2,
str_list.elems[x].data))
{
const char *elem = str_list.elems[x].data;
string_list_append(&str_list2, elem, attr);
}
}
string_list_deinitialize(&str_list);
}
}
string_list_join_concat(newstring, sizeof(newstring),
&str_list2, "|");
{
2020-08-25 22:39:19 -04:00
struct string_list str_list3 = {0};
string_list_initialize(&str_list3);
string_split_noalloc(&str_list3, newstring, "|");
#ifdef HAVE_IBXM
2018-01-30 12:07:12 -05:00
{
union string_list_elem_attr attr;
attr.i = 0;
2020-08-25 22:39:19 -04:00
string_list_append(&str_list3, "s3m", attr);
string_list_append(&str_list3, "mod", attr);
string_list_append(&str_list3, "xm", attr);
2018-01-30 12:07:12 -05:00
}
#endif
string_list_join_concat(newstring2, sizeof(newstring2),
2020-08-25 22:39:19 -04:00
&str_list3, "|");
string_list_deinitialize(&str_list3);
}
string_list_deinitialize(&str_list2);
}
break;
}
2022-11-21 17:11:34 -05:00
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
if (multimedia_builtin_mediaplayer_enable)
{
struct retro_system_info sysinfo = {0};
2018-07-01 16:22:02 -04:00
#if defined(HAVE_FFMPEG)
2022-11-21 17:11:34 -05:00
libretro_ffmpeg_retro_get_system_info(&sysinfo);
2018-07-01 16:22:02 -04:00
#elif defined(HAVE_MPV)
2022-11-21 17:11:34 -05:00
libretro_mpv_retro_get_system_info(&sysinfo);
2018-07-01 16:22:02 -04:00
#endif
2022-11-21 17:11:34 -05:00
strlcat(newstring2, "|", sizeof(newstring2));
strlcat(newstring2, sysinfo.valid_extensions, sizeof(newstring2));
}
#endif
2022-11-21 17:11:34 -05:00
#ifdef HAVE_IMAGEVIEWER
2022-11-21 17:11:34 -05:00
if (multimedia_builtin_imageviewer_enable)
{
struct retro_system_info sysinfo = {0};
libretro_imageviewer_retro_get_system_info(&sysinfo);
strlcat(newstring2, "|", sizeof(newstring2));
strlcat(newstring2, sysinfo.valid_extensions,
sizeof(newstring2));
}
2022-11-21 17:11:34 -05:00
#endif
if (!string_is_empty(newstring2))
{
if (info->exts)
free(info->exts);
info->exts = strdup(newstring2);
}
return deferred_push_dlist(info, state, settings);
}
2015-09-01 14:27:14 -04:00
2020-06-06 20:41:48 -04:00
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_detect_core_list, PUSH_DETECT_CORE_LIST, DISPLAYLIST_CORES_DETECTED)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_archive_open_detect_core, PUSH_ARCHIVE_OPEN_DETECT_CORE, DISPLAYLIST_DEFAULT)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_archive_open, PUSH_ARCHIVE_OPEN, DISPLAYLIST_DEFAULT)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_default, PUSH_DEFAULT, DISPLAYLIST_DEFAULT)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_favorites_list, PUSH_DEFAULT, DISPLAYLIST_FAVORITES)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_playlist_list, PUSH_DEFAULT, DISPLAYLIST_PLAYLIST)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_music_history_list, PUSH_DEFAULT, DISPLAYLIST_MUSIC_HISTORY)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_image_history_list, PUSH_DEFAULT, DISPLAYLIST_IMAGES_HISTORY)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_video_history_list, PUSH_DEFAULT, DISPLAYLIST_VIDEO_HISTORY)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_explore_list, PUSH_DEFAULT, DISPLAYLIST_EXPLORE)
2022-02-22 13:23:48 -05:00
GENERIC_DEFERRED_PUSH_GENERAL(deferred_contentless_cores_list, PUSH_DEFAULT, DISPLAYLIST_CONTENTLESS_CORES)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_special, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_SPECIAL)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_resolution, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_RESOLUTION)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_audio_device, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_AUDIO_DEVICE)
Add microphone support via a new driver (#14731) * Some slight fixes * Update libretro.h * Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE * Finish proof-of-concept for mic support - It works, but doesn't support floating-point audio yet - It may need to be resampled, too * Add macros that aren't available in SDL 2 * Comment out a variable definition for now - For C89 compliance * Add some comments for clarity * Let ALSA tolerate a null new_rate * Partial ALSA microphone support - Not yet tested - Mic is created and destroyed - Mic can also be paused or unpaused - Mic is paused or unpaused with the rest of the driver - Microphone is not yet read * Install error logging in the ALSA driver - It defers to RARCH_ERR * Free the ALSA microphone in alsa_free * Fix an indent * First draft of alsa_read_microphone * Deinitialize SDL Audio in sdl_audio_free * Save and restore the ALSA error logger - You should always practice safe global state * Add newlines to some RARCH_ERRs * Add some logging * Check for the mic being active via settings instead of via flags * Adjusted a log entry to be less misleading - A frequency of 0Hz looks weird to the uninformed - In reality, it means the driver used the requested frequency * Fix an incorrect format string * Tidy up logging in alsa.c * Rename audio_enable_microphone to audio_enable_input * Rename microphone_device to audio_input_device * Add audio_input_latency and audio_input_block_frames settings * Add all mic-related settings to the options menu * Adjust logging for alsa.c - Log the ALSA library version - Add errno details * Refer to the microphone in logs by name * Use %u instead of %d for some log items * Add input_samples_buf * Remove an inaccurate comment * Change type of input_samples_buf * Clean up audio_driver_flush_microphone_input * Comment convert_float_to_s16 - It helped me understand what it's doing - Turns out it'll work just fine on mono audio * Don't use the resampler for mic input * Fix crash in the ALSA driver when reading from a mic * Update some logging messages * ALSA support now works for mics * Reuse some common functions in alsa.c * Add alsa_thread_microphone_t * Refactor alsa.c - Introduce alsa_init_pcm to init any PCM that we're using - Vastly simplifies the implementation of alsa_init and alsa_init_microphone - Will be used for the read-based versions next * Make ALSA logging a little more consistent * Clean up the mic with alsa_free_microphone if alsa_init_microphone fails * Remove an unused function * Move some cleanup in alsa.c to a common function * First crack at mic support for alsathread - Refactor some duplicate code into functions - Use functions introduced in alsa.c - Create and destroy the mic * Slight cleanups for clarity * Implement alsa_thread_set/get_microphone_state * More work on alsathread - No more crashing, but the mic just returns silence * Slight cleanups for clarity * Add alsa_set_mic_enabled_internal - For setting the state of a microphone while considering its current state * Use alsa_set_mic_enabled_internal * Log a little more info * Log when the audio driver is started/stopped * Move base microphone driver code into a new directory - Add microphone_driver.c to Makefile.common - Rename functions as needed * Initialize and deinitialize the microphone driver * Implement sdl_microphone.c * Un-const an argument - In case the driver context needs to do any locking * Revise comments for microphone_driver.h * Remove an unimplemented function * Remove some functions from the mic driver * Remove mic functions from audio_thread_wrapper * Remove mic functions from sdl_audio * Fix microphone_null * Split the mic code for the alsa audio drivers into microphone drivers * Fix an extra struct member * Add a setting for the mic driver * Add a command to reinitialize the microphone driver * Rename mic-related settings * Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL * Rename audio_enable_input to microphone_enable * Remove some labels from qt_options * Search for microphone_driver within find_driver_nonempty * Clean up some mic driver code * Pending mics now return silence * Adjust some logging and comments * Some cleanup in the microphone driver * Invert a flag check - Oops * Fix a log message * Fix the wrong flags being checked * Slight refactor of wasapi_init_device - Add a data_flow parameter - Declare it in a header - In preparation for WASAPI mic support * Add some WASAPI macros for _IAudioCaptureClient * Move some common WASAPI functions to audio/common/wasapi.c - They'll be used by the mic and the audio drivers * Add wasapi_log_hr * Generalize mmdevice_list_new to look for capture devices, too * Fix a function declaration * Move driver-specific device_list_new functions into their respective files * Clean up some declarations * First draft of wasapi microphone driver * Add wasapi_microphone_device_list_free * Change function parameter names to be consistent with microphone_driver * Partially implement wasapi_microphone_read - Mostly copied from the audio driver so far - It doesn't compile yet - But it'll be beautiful when I'm done with it * Refactor the mic driver's functions - Rename get_mic_active to mic_alive - Split set_mic_active into start_mic and stop_mic - Refactor the SDL mic driver accordingly * Edit some WASAPI functions for logging and clarity * Implement more of the WASAPI mic driver * Rename write_event to read_event * Pass the WASAPI driver context to the various read functions * Mostly implement the read function for the WASAPI mic driver * Fix a crash in microphone_driver - Forgot to move the position of the name of null_driver * Reduce some logging in wasapi common functions - Only log the chosen audio client format, not all attempted ones * Add some macro wrappers for IAudioClient methods * Update mic driver configuration - Make the mic driver configurable in the menu - Add config items for WASAPI-related options similar to the audio driver * Fix a menu entry scrolling through audio devices instead of mic devices * Add some utility functions * Expose the new utility functions in wasapi.h * Add extra logging in the WASAPI common functions * Add sharemode_name * Use _IAudioClient_Initialize macro in some places * Pass channels to wasapi_init_client - Remember, mics are in mono * Use _IAudioClient_Initialize macro some more * Forgot to pass channels in some places * Add some utility functions * Forgot an #include * Add wasapi_select_device_format * Simplify the format selection logic in wasapi_init_client_sh * Unset the microphone in wasapi_microphone_close_mic - Ought to prevent a potential segfault * Simplify some logging * Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer * Remove some unneeded logging * Add some values to hresult_name * Polish up wasapi_select_device_format - Test for formats manually when Windows can't - Add some debug logging - Check for channels * Compute the fields of WAVEFORMATEXTENSIBLE correctly - As per the doc's stated requirements * Simplify logic for WASAPI client creation * Fix a potential hang in wasapi_microphone_read_shared_buffered * Stop the microphone if the driver is stopped * Don't name the microphone event * Ensure that wasapi_init_client reports the correct format and rate * Implement exclusive microphone read access for WASAPI * Add _IAudioCaptureClient_GetNextPacketSize macro * Organize cases in hresult_name * Clear some extra fields if wasapi_set_format is setting a Pcm format * Adjust some logs * Adjust some logs * Remove unneeded local vars * Add a log * Update wasapi.c * Update wasapi.c * Fix shared-mode mic support in WASAPI producing broken input - Turns out it had nothing to do with shared mode * Reuse a common function - Remove wasapi_microphone_read_shared_buffered - Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered * Remove some code I was using for test purposes * Clarify some language * Double the default shared-mode mic buffer length * Split getting a device's name into a separate function, then use it * Fix the ALSA mic drivers - To comply with changes I previously made to the mic driver interface * Remove unused synchronization primitives from the SDL microphone driver * Add sdl_microphone_mic_use_float * Document audio_driver_state_flags - I needed to understand these to see if similar flags were required for the mic driver * Remove an unused function in wasapi.c * Add and document flags in microphone_driver.h * Remove driver-specific mic start/stop functions - The mic driver itself doesn't do much processing - That honor goes to individual mics * Remove some unused fields in microphone_driver.h * Add CMD_EVENT_MICROPHONE_STOP/START * Remove unused functions from microphone_null * Change how the mic driver state is referenced in some places * Simplify the SDL microphone driver - The driver backend no longer keeps a reference to the mic (the frontend does that) - Remove functions that are no longer needed - Don't track paused state, just query the mic itself * Simplify the WASAPI microphone driver - Don't track the driver running state or the microphone handle, the frontend does that now - Remove support for unbuffered input (hunterk suggested that it wasn't necessary) * Make microphone_wasapi_sh_buffer_length a uint, not an int - It won't be negative anymore - 0 now represents the default value * Make the microphone frontend more robust - Improve documentation for how various functions should be implemented - Closes all microphones before freeing the driver (so backends don't have to) - Tracks the enabled state of each microphone, so backends don't have to (but they still can) * Stop the mic driver in core_unload_game * Ensure mic support is compatible with the revised menu code * Move alsa.h into audio/common * Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED - It was never really needed * Refactor the ALSA microphone driver - Move common ALSA functions to audio/common/alsa.c - Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm - Don't track the microphone handle in the ALSA driver context - Remove unneeded fields * Move some common alsathread code into audio/common/alsathread.c * Change return type of mic_driver_open_mic_internal to bool * First crack at resampling mic input * Remove an extraneous check - I think something distracted me when I was writing this line * Add stereo/mono conversion functions * Make alsa_start_pcm and alsa_stop_pcm more robust - They now return success if the stream is already running and stopped, respectively * Revise some mic-related comments in libretro.h * First crack at resampling mic input * Simplify an expression * Simplify an expression * Fix a log tag * Allow mic resampler to be configured separately from audio resampler * Add some comments * Set the source ratio to something sensible * Stop deadlock in `alsathread` mic driver * Allow mics to be initialized even when core is loaded from CLI - When loading content from CLI, the drivers are initialized a little differently - That threw off the mic initialization code * Rename the functions in retro_microphone_interface * Revise some mic-related comments in libretro.h * Update retro_microphone_interface - Add get_mic_rate - Add a parameter to open_mic - The modifications don't do anything yet * Use parameter objects in the microphone handle * Replace get_mic_rate with get_params * Add a microphone interface version * Remove part of a comment * Set the effective params in mic_driver_microphone_handle_init * Drop a stray newline * Change where the mic interface is zeroed - I was accidentally throwing out the version that the core was asking for * Reduce logspam for wasapi_set_nonblock_state - Now it only logs when the sync mode is changed * Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0 - -16 is no longer a valid value * Set the new_rate in wasapi_init * Change description of microphone sample rate in the settings * First attempt at resampling configured mic input * Forgot a section * Fix some input samples being skipped * Rename a variable for clarity * Add microphone.outgoing_samples * Update the mic driver - Processed samples are now buffered - The resampler is skipped if the ratio is (very close to) 1 * Remove part of a comment * Update some comments in audio_resampler.h * Slightly refactor the SDL microphone driver - Move SDL_AudioSpec to a field of sdl_microphone_handle_t - Allow SDL to change the requested format and sample rate - Request floating-point input - Implement sdl_microphone_mic_use_float * Fix a non-C89-compliant declaration * Add new files to griffin.c * Remove a C++-style comment * Add two more files to griffin.c * Remove some unneeded declarations in microphone_driver.h * Remove a stray comma in configuration.c - For C89 compliance * Fix compilation on some platforms * Change some function signatures * Make the ALSA drivers always set the audio rate * Fix the alsathread mic driver * Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined * Mute the microphone if the core is running in fast-forward, slow-mo, or rewind * Clarify a comment * Clarify a comment * Add a comment * Don't allocate memory for slowmo samples in the mic driver - We're not supporting slowmo for mics, so it's not needed * Fix a { * Add my name to AUTHORS.h * Add driver_lifetime_flags - For drivers that have special setup/teardown needs * Ensure that resetting the mic driver maintains active mic handles - Prevents fullscreen toggle from stopping all mic input * Update CHANGES.md * Move some default microphone settings to a new part of the config file * Ensure that RetroArch can use the audio format that Windows suggests * Remove references to mic support in the SDL audio driver * Remove unused WASAPI functions * Return failure if RetroArch couldn't select a WASAPI format * Ensure that Windows uses the WASAPI mic driver by default * Treat disabled mic support as a warning, not an error * Clarify some WASAPI-related microphone settings * Remove some unused variables * Add or revise microphone-related comments * Rearrange doc comments for microphone types in libretro.h * Remove a space * Remove some unused flags * Remove ALSA error logger - It was never used anyway * Remove unneeded microphone-related arguments * Document a parameter * Remove a logging call * Add a constant for the microphone's shared buffer length for WASAPI * Fix stylistic inconsistencies * Make mic_driver_get_sample_size a macro instead of a function * Move the microphone implementation to the audio directory * Make microphone support optional (but enabled by default) * Fix the griffin build
2023-06-06 15:55:06 -04:00
#ifdef HAVE_MICROPHONE
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_microphone_device, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_MICROPHONE_DEVICE)
#endif
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_video_shader_num_passes, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_VIDEO_SHADER_NUM_PASSES)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_shader_parameter, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_VIDEO_SHADER_PARAMETER)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_shader_preset_parameter, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_VIDEO_SHADER_PRESET_PARAMETER)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_playlist_default_core, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_PLAYLIST_DEFAULT_CORE)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_playlist_label_display_mode, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_PLAYLIST_LABEL_DISPLAY_MODE)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_playlist_right_thumbnail_mode, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_PLAYLIST_RIGHT_THUMBNAIL_MODE)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_playlist_left_thumbnail_mode, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_playlist_sort_mode, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_PLAYLIST_SORT_MODE)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_manual_content_scan_system_name, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_manual_content_scan_core_name, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_MANUAL_CONTENT_SCAN_CORE_NAME)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_disk_index, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_DISK_INDEX)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_input_device_type, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_INPUT_DEVICE_TYPE)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_input_description, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_INPUT_DESCRIPTION)
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_input_description_kbd, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_INPUT_DESCRIPTION_KBD)
#ifdef ANDROID
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_input_select_physical_keyboard, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_INPUT_SELECT_PHYSICAL_KEYBOARD)
#endif
#ifdef HAVE_NETWORKING
GENERIC_DEFERRED_PUSH_GENERAL(deferred_push_dropdown_box_list_netplay_mitm_server, PUSH_DEFAULT, DISPLAYLIST_DROPDOWN_LIST_NETPLAY_MITM_SERVER)
#endif
static int menu_cbs_init_bind_deferred_push_compare_label(
menu_file_list_cbs_t *cbs,
2020-03-27 13:00:26 -04:00
const char *label)
{
2019-12-01 16:38:53 -05:00
unsigned i;
typedef struct deferred_info_list
{
enum msg_hash_enums type;
2019-12-01 16:38:53 -05:00
int (*cb)(menu_displaylist_info_t *info);
} deferred_info_list_t;
const deferred_info_list_t info_list[] = {
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_DUMP_DISC_LIST, deferred_push_dump_disk_list},
#ifdef HAVE_LAKKA
{MENU_ENUM_LABEL_DEFERRED_EJECT_DISC, deferred_push_eject_disc},
#endif
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_LOAD_DISC_LIST, deferred_push_load_disk_list},
{MENU_ENUM_LABEL_DEFERRED_FAVORITES_LIST, deferred_push_favorites_list},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST, deferred_push_dropdown_box_list},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_SPECIAL, deferred_push_dropdown_box_list_special},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_RESOLUTION, deferred_push_dropdown_box_list_resolution},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_AUDIO_DEVICE, deferred_push_dropdown_box_list_audio_device},
Add microphone support via a new driver (#14731) * Some slight fixes * Update libretro.h * Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE * Finish proof-of-concept for mic support - It works, but doesn't support floating-point audio yet - It may need to be resampled, too * Add macros that aren't available in SDL 2 * Comment out a variable definition for now - For C89 compliance * Add some comments for clarity * Let ALSA tolerate a null new_rate * Partial ALSA microphone support - Not yet tested - Mic is created and destroyed - Mic can also be paused or unpaused - Mic is paused or unpaused with the rest of the driver - Microphone is not yet read * Install error logging in the ALSA driver - It defers to RARCH_ERR * Free the ALSA microphone in alsa_free * Fix an indent * First draft of alsa_read_microphone * Deinitialize SDL Audio in sdl_audio_free * Save and restore the ALSA error logger - You should always practice safe global state * Add newlines to some RARCH_ERRs * Add some logging * Check for the mic being active via settings instead of via flags * Adjusted a log entry to be less misleading - A frequency of 0Hz looks weird to the uninformed - In reality, it means the driver used the requested frequency * Fix an incorrect format string * Tidy up logging in alsa.c * Rename audio_enable_microphone to audio_enable_input * Rename microphone_device to audio_input_device * Add audio_input_latency and audio_input_block_frames settings * Add all mic-related settings to the options menu * Adjust logging for alsa.c - Log the ALSA library version - Add errno details * Refer to the microphone in logs by name * Use %u instead of %d for some log items * Add input_samples_buf * Remove an inaccurate comment * Change type of input_samples_buf * Clean up audio_driver_flush_microphone_input * Comment convert_float_to_s16 - It helped me understand what it's doing - Turns out it'll work just fine on mono audio * Don't use the resampler for mic input * Fix crash in the ALSA driver when reading from a mic * Update some logging messages * ALSA support now works for mics * Reuse some common functions in alsa.c * Add alsa_thread_microphone_t * Refactor alsa.c - Introduce alsa_init_pcm to init any PCM that we're using - Vastly simplifies the implementation of alsa_init and alsa_init_microphone - Will be used for the read-based versions next * Make ALSA logging a little more consistent * Clean up the mic with alsa_free_microphone if alsa_init_microphone fails * Remove an unused function * Move some cleanup in alsa.c to a common function * First crack at mic support for alsathread - Refactor some duplicate code into functions - Use functions introduced in alsa.c - Create and destroy the mic * Slight cleanups for clarity * Implement alsa_thread_set/get_microphone_state * More work on alsathread - No more crashing, but the mic just returns silence * Slight cleanups for clarity * Add alsa_set_mic_enabled_internal - For setting the state of a microphone while considering its current state * Use alsa_set_mic_enabled_internal * Log a little more info * Log when the audio driver is started/stopped * Move base microphone driver code into a new directory - Add microphone_driver.c to Makefile.common - Rename functions as needed * Initialize and deinitialize the microphone driver * Implement sdl_microphone.c * Un-const an argument - In case the driver context needs to do any locking * Revise comments for microphone_driver.h * Remove an unimplemented function * Remove some functions from the mic driver * Remove mic functions from audio_thread_wrapper * Remove mic functions from sdl_audio * Fix microphone_null * Split the mic code for the alsa audio drivers into microphone drivers * Fix an extra struct member * Add a setting for the mic driver * Add a command to reinitialize the microphone driver * Rename mic-related settings * Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL * Rename audio_enable_input to microphone_enable * Remove some labels from qt_options * Search for microphone_driver within find_driver_nonempty * Clean up some mic driver code * Pending mics now return silence * Adjust some logging and comments * Some cleanup in the microphone driver * Invert a flag check - Oops * Fix a log message * Fix the wrong flags being checked * Slight refactor of wasapi_init_device - Add a data_flow parameter - Declare it in a header - In preparation for WASAPI mic support * Add some WASAPI macros for _IAudioCaptureClient * Move some common WASAPI functions to audio/common/wasapi.c - They'll be used by the mic and the audio drivers * Add wasapi_log_hr * Generalize mmdevice_list_new to look for capture devices, too * Fix a function declaration * Move driver-specific device_list_new functions into their respective files * Clean up some declarations * First draft of wasapi microphone driver * Add wasapi_microphone_device_list_free * Change function parameter names to be consistent with microphone_driver * Partially implement wasapi_microphone_read - Mostly copied from the audio driver so far - It doesn't compile yet - But it'll be beautiful when I'm done with it * Refactor the mic driver's functions - Rename get_mic_active to mic_alive - Split set_mic_active into start_mic and stop_mic - Refactor the SDL mic driver accordingly * Edit some WASAPI functions for logging and clarity * Implement more of the WASAPI mic driver * Rename write_event to read_event * Pass the WASAPI driver context to the various read functions * Mostly implement the read function for the WASAPI mic driver * Fix a crash in microphone_driver - Forgot to move the position of the name of null_driver * Reduce some logging in wasapi common functions - Only log the chosen audio client format, not all attempted ones * Add some macro wrappers for IAudioClient methods * Update mic driver configuration - Make the mic driver configurable in the menu - Add config items for WASAPI-related options similar to the audio driver * Fix a menu entry scrolling through audio devices instead of mic devices * Add some utility functions * Expose the new utility functions in wasapi.h * Add extra logging in the WASAPI common functions * Add sharemode_name * Use _IAudioClient_Initialize macro in some places * Pass channels to wasapi_init_client - Remember, mics are in mono * Use _IAudioClient_Initialize macro some more * Forgot to pass channels in some places * Add some utility functions * Forgot an #include * Add wasapi_select_device_format * Simplify the format selection logic in wasapi_init_client_sh * Unset the microphone in wasapi_microphone_close_mic - Ought to prevent a potential segfault * Simplify some logging * Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer * Remove some unneeded logging * Add some values to hresult_name * Polish up wasapi_select_device_format - Test for formats manually when Windows can't - Add some debug logging - Check for channels * Compute the fields of WAVEFORMATEXTENSIBLE correctly - As per the doc's stated requirements * Simplify logic for WASAPI client creation * Fix a potential hang in wasapi_microphone_read_shared_buffered * Stop the microphone if the driver is stopped * Don't name the microphone event * Ensure that wasapi_init_client reports the correct format and rate * Implement exclusive microphone read access for WASAPI * Add _IAudioCaptureClient_GetNextPacketSize macro * Organize cases in hresult_name * Clear some extra fields if wasapi_set_format is setting a Pcm format * Adjust some logs * Adjust some logs * Remove unneeded local vars * Add a log * Update wasapi.c * Update wasapi.c * Fix shared-mode mic support in WASAPI producing broken input - Turns out it had nothing to do with shared mode * Reuse a common function - Remove wasapi_microphone_read_shared_buffered - Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered * Remove some code I was using for test purposes * Clarify some language * Double the default shared-mode mic buffer length * Split getting a device's name into a separate function, then use it * Fix the ALSA mic drivers - To comply with changes I previously made to the mic driver interface * Remove unused synchronization primitives from the SDL microphone driver * Add sdl_microphone_mic_use_float * Document audio_driver_state_flags - I needed to understand these to see if similar flags were required for the mic driver * Remove an unused function in wasapi.c * Add and document flags in microphone_driver.h * Remove driver-specific mic start/stop functions - The mic driver itself doesn't do much processing - That honor goes to individual mics * Remove some unused fields in microphone_driver.h * Add CMD_EVENT_MICROPHONE_STOP/START * Remove unused functions from microphone_null * Change how the mic driver state is referenced in some places * Simplify the SDL microphone driver - The driver backend no longer keeps a reference to the mic (the frontend does that) - Remove functions that are no longer needed - Don't track paused state, just query the mic itself * Simplify the WASAPI microphone driver - Don't track the driver running state or the microphone handle, the frontend does that now - Remove support for unbuffered input (hunterk suggested that it wasn't necessary) * Make microphone_wasapi_sh_buffer_length a uint, not an int - It won't be negative anymore - 0 now represents the default value * Make the microphone frontend more robust - Improve documentation for how various functions should be implemented - Closes all microphones before freeing the driver (so backends don't have to) - Tracks the enabled state of each microphone, so backends don't have to (but they still can) * Stop the mic driver in core_unload_game * Ensure mic support is compatible with the revised menu code * Move alsa.h into audio/common * Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED - It was never really needed * Refactor the ALSA microphone driver - Move common ALSA functions to audio/common/alsa.c - Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm - Don't track the microphone handle in the ALSA driver context - Remove unneeded fields * Move some common alsathread code into audio/common/alsathread.c * Change return type of mic_driver_open_mic_internal to bool * First crack at resampling mic input * Remove an extraneous check - I think something distracted me when I was writing this line * Add stereo/mono conversion functions * Make alsa_start_pcm and alsa_stop_pcm more robust - They now return success if the stream is already running and stopped, respectively * Revise some mic-related comments in libretro.h * First crack at resampling mic input * Simplify an expression * Simplify an expression * Fix a log tag * Allow mic resampler to be configured separately from audio resampler * Add some comments * Set the source ratio to something sensible * Stop deadlock in `alsathread` mic driver * Allow mics to be initialized even when core is loaded from CLI - When loading content from CLI, the drivers are initialized a little differently - That threw off the mic initialization code * Rename the functions in retro_microphone_interface * Revise some mic-related comments in libretro.h * Update retro_microphone_interface - Add get_mic_rate - Add a parameter to open_mic - The modifications don't do anything yet * Use parameter objects in the microphone handle * Replace get_mic_rate with get_params * Add a microphone interface version * Remove part of a comment * Set the effective params in mic_driver_microphone_handle_init * Drop a stray newline * Change where the mic interface is zeroed - I was accidentally throwing out the version that the core was asking for * Reduce logspam for wasapi_set_nonblock_state - Now it only logs when the sync mode is changed * Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0 - -16 is no longer a valid value * Set the new_rate in wasapi_init * Change description of microphone sample rate in the settings * First attempt at resampling configured mic input * Forgot a section * Fix some input samples being skipped * Rename a variable for clarity * Add microphone.outgoing_samples * Update the mic driver - Processed samples are now buffered - The resampler is skipped if the ratio is (very close to) 1 * Remove part of a comment * Update some comments in audio_resampler.h * Slightly refactor the SDL microphone driver - Move SDL_AudioSpec to a field of sdl_microphone_handle_t - Allow SDL to change the requested format and sample rate - Request floating-point input - Implement sdl_microphone_mic_use_float * Fix a non-C89-compliant declaration * Add new files to griffin.c * Remove a C++-style comment * Add two more files to griffin.c * Remove some unneeded declarations in microphone_driver.h * Remove a stray comma in configuration.c - For C89 compliance * Fix compilation on some platforms * Change some function signatures * Make the ALSA drivers always set the audio rate * Fix the alsathread mic driver * Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined * Mute the microphone if the core is running in fast-forward, slow-mo, or rewind * Clarify a comment * Clarify a comment * Add a comment * Don't allocate memory for slowmo samples in the mic driver - We're not supporting slowmo for mics, so it's not needed * Fix a { * Add my name to AUTHORS.h * Add driver_lifetime_flags - For drivers that have special setup/teardown needs * Ensure that resetting the mic driver maintains active mic handles - Prevents fullscreen toggle from stopping all mic input * Update CHANGES.md * Move some default microphone settings to a new part of the config file * Ensure that RetroArch can use the audio format that Windows suggests * Remove references to mic support in the SDL audio driver * Remove unused WASAPI functions * Return failure if RetroArch couldn't select a WASAPI format * Ensure that Windows uses the WASAPI mic driver by default * Treat disabled mic support as a warning, not an error * Clarify some WASAPI-related microphone settings * Remove some unused variables * Add or revise microphone-related comments * Rearrange doc comments for microphone types in libretro.h * Remove a space * Remove some unused flags * Remove ALSA error logger - It was never used anyway * Remove unneeded microphone-related arguments * Document a parameter * Remove a logging call * Add a constant for the microphone's shared buffer length for WASAPI * Fix stylistic inconsistencies * Make mic_driver_get_sample_size a macro instead of a function * Move the microphone implementation to the audio directory * Make microphone support optional (but enabled by default) * Fix the griffin build
2023-06-06 15:55:06 -04:00
#ifdef HAVE_MICROPHONE
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MICROPHONE_DEVICE, deferred_push_dropdown_box_list_microphone_device},
{MENU_ENUM_LABEL_DEFERRED_MICROPHONE_SETTINGS_LIST, deferred_push_microphone_settings_list},
#endif
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_VIDEO_SHADER_NUM_PASSES, deferred_push_dropdown_box_list_video_shader_num_passes},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_VIDEO_SHADER_PARAMETER, deferred_push_dropdown_box_list_shader_parameter},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_VIDEO_SHADER_PRESET_PARAMETER, deferred_push_dropdown_box_list_shader_preset_parameter},
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_DEFAULT_CORE, deferred_push_dropdown_box_list_playlist_default_core},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_LABEL_DISPLAY_MODE, deferred_push_dropdown_box_list_playlist_label_display_mode},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_RIGHT_THUMBNAIL_MODE, deferred_push_dropdown_box_list_playlist_right_thumbnail_mode},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_LEFT_THUMBNAIL_MODE, deferred_push_dropdown_box_list_playlist_left_thumbnail_mode},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_PLAYLIST_SORT_MODE, deferred_push_dropdown_box_list_playlist_sort_mode},
2020-01-14 07:28:10 -05:00
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_DISK_INDEX, deferred_push_dropdown_box_list_disk_index},
2021-02-04 10:06:19 -05:00
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_INPUT_DEVICE_TYPE, deferred_push_dropdown_box_list_input_device_type},
2020-07-23 12:19:41 -04:00
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_INPUT_DESCRIPTION, deferred_push_dropdown_box_list_input_description},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_INPUT_DESCRIPTION_KBD, deferred_push_dropdown_box_list_input_description_kbd},
#ifdef ANDROID
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_INPUT_SELECT_PHYSICAL_KEYBOARD, deferred_push_dropdown_box_list_input_select_physical_keyboard},
#endif
#ifdef HAVE_NETWORKING
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_NETPLAY_MITM_SERVER, deferred_push_dropdown_box_list_netplay_mitm_server},
#endif
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_LIST, deferred_push_browse_url_list},
{MENU_ENUM_LABEL_DEFERRED_BROWSE_URL_START, deferred_push_browse_url_start},
{MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST, deferred_push_core_settings_list},
2020-05-28 12:48:18 -04:00
{MENU_ENUM_LABEL_DEFERRED_CORE_INFORMATION_LIST, deferred_push_core_information_list},
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_CONFIGURATION_SETTINGS_LIST, deferred_push_configuration_settings_list},
{MENU_ENUM_LABEL_DEFERRED_SAVING_SETTINGS_LIST, deferred_push_saving_settings_list},
{MENU_ENUM_LABEL_DEFERRED_CLOUD_SYNC_SETTINGS_LIST, deferred_push_cloud_sync_settings_list},
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_MIXER_STREAM_SETTINGS_LIST, deferred_push_mixer_stream_settings_list},
{MENU_ENUM_LABEL_DEFERRED_LOGGING_SETTINGS_LIST, deferred_push_logging_settings_list},
{MENU_ENUM_LABEL_DEFERRED_FRAME_THROTTLE_SETTINGS_LIST, deferred_push_frame_throttle_settings_list},
{MENU_ENUM_LABEL_DEFERRED_FRAME_TIME_COUNTER_SETTINGS_LIST, deferred_push_frame_time_counter_settings_list},
{MENU_ENUM_LABEL_DEFERRED_REWIND_SETTINGS_LIST, deferred_push_rewind_settings_list},
{MENU_ENUM_LABEL_DEFERRED_CHEAT_DETAILS_SETTINGS_LIST, deferred_push_cheat_details_settings_list},
{MENU_ENUM_LABEL_DEFERRED_CHEAT_SEARCH_SETTINGS_LIST, deferred_push_cheat_search_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_DISPLAY_SETTINGS_LIST, deferred_push_onscreen_display_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST, deferred_push_onscreen_notifications_settings_list},
2020-07-16 11:30:38 -04:00
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST, deferred_push_onscreen_notifications_views_settings_list},
#if defined(HAVE_OVERLAY)
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_ONSCREEN_OVERLAY_SETTINGS_LIST, deferred_push_onscreen_overlay_settings_list},
{MENU_ENUM_LABEL_DEFERRED_OSK_OVERLAY_SETTINGS_LIST, deferred_push_osk_overlay_settings_list},
2019-03-30 20:17:08 -04:00
#endif
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_MENU_FILE_BROWSER_SETTINGS_LIST, deferred_push_menu_file_browser_settings_list},
{MENU_ENUM_LABEL_DEFERRED_MENU_VIEWS_SETTINGS_LIST, deferred_push_menu_views_settings_list},
{MENU_ENUM_LABEL_DEFERRED_SETTINGS_VIEWS_SETTINGS_LIST, deferred_push_settings_views_settings_list},
{MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_VIEWS_SETTINGS_LIST, deferred_push_quick_menu_views_settings_list},
{MENU_ENUM_LABEL_DEFERRED_MENU_SETTINGS_LIST, deferred_push_menu_settings_list},
2022-08-17 02:23:07 -04:00
#ifdef _3DS
{MENU_ENUM_LABEL_DEFERRED_MENU_BOTTOM_SETTINGS_LIST, deferred_push_menu_bottom_settings_list},
#endif
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_USER_INTERFACE_SETTINGS_LIST, deferred_push_user_interface_settings_list},
{MENU_ENUM_LABEL_DEFERRED_POWER_MANAGEMENT_SETTINGS_LIST, deferred_push_power_management_settings_list},
{MENU_ENUM_LABEL_DEFERRED_MENU_SOUNDS_LIST, deferred_push_menu_sounds_list},
{MENU_ENUM_LABEL_DEFERRED_RETRO_ACHIEVEMENTS_SETTINGS_LIST, deferred_push_retro_achievements_settings_list},
{MENU_ENUM_LABEL_DEFERRED_CHEEVOS_APPEARANCE_SETTINGS_LIST, deferred_push_cheevos_appearance_settings_list},
{MENU_ENUM_LABEL_DEFERRED_CHEEVOS_VISIBILITY_SETTINGS_LIST, deferred_push_cheevos_visibility_settings_list},
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_UPDATER_SETTINGS_LIST, deferred_push_updater_settings_list},
{MENU_ENUM_LABEL_DEFERRED_NETWORK_SETTINGS_LIST, deferred_push_network_settings_list},
{MENU_ENUM_LABEL_DEFERRED_SUBSYSTEM_SETTINGS_LIST, deferred_push_subsystem_settings_list},
2019-12-29 21:01:52 -05:00
{MENU_ENUM_LABEL_DEFERRED_NETWORK_HOSTING_SETTINGS_LIST, deferred_push_network_hosting_settings_list},
{MENU_ENUM_LABEL_DEFERRED_NETPLAY_KICK_LIST, deferred_push_netplay_kick_list},
2022-07-07 10:08:46 -04:00
{MENU_ENUM_LABEL_DEFERRED_NETPLAY_BAN_LIST, deferred_push_netplay_ban_list},
{MENU_ENUM_LABEL_DEFERRED_NETPLAY_LOBBY_FILTERS_LIST, deferred_push_netplay_lobby_filters_list},
2020-06-17 07:56:44 -04:00
{MENU_ENUM_LABEL_DEFERRED_BLUETOOTH_SETTINGS_LIST, deferred_push_bluetooth_settings_list},
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_WIFI_SETTINGS_LIST, deferred_push_wifi_settings_list},
{MENU_ENUM_LABEL_DEFERRED_WIFI_NETWORKS_LIST, deferred_push_wifi_networks_list},
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_LAKKA_SERVICES_LIST, deferred_push_lakka_services_list},
{MENU_ENUM_LABEL_DEFERRED_USER_SETTINGS_LIST, deferred_push_user_settings_list},
{MENU_ENUM_LABEL_DEFERRED_DIRECTORY_SETTINGS_LIST, deferred_push_directory_settings_list},
{MENU_ENUM_LABEL_DEFERRED_PRIVACY_SETTINGS_LIST, deferred_push_privacy_settings_list},
{MENU_ENUM_LABEL_DEFERRED_MIDI_SETTINGS_LIST, deferred_push_midi_settings_list},
#ifdef HAVE_NETWORKING
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_LIST, deferred_push_core_content_dirs_list},
{MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_SUBDIR_LIST, deferred_push_core_content_dirs_subdir_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_DEFERRED_CORE_UPDATER_LIST, deferred_push_core_updater_list},
{MENU_ENUM_LABEL_DEFERRED_THUMBNAILS_UPDATER_LIST, deferred_push_thumbnails_updater_list},
{MENU_ENUM_LABEL_DEFERRED_PL_THUMBNAILS_UPDATER_LIST, deferred_push_pl_thumbnails_updater_list},
{MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_LIST, deferred_push_core_content_list},
{MENU_ENUM_LABEL_DEFERRED_CORE_SYSTEM_FILES_LIST, deferred_push_core_system_files_list},
#endif
2019-12-01 16:38:53 -05:00
{MENU_ENUM_LABEL_DEFERRED_MUSIC, deferred_music_list},
{MENU_ENUM_LABEL_DEFERRED_MUSIC_LIST, deferred_music_history_list},
{MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST, deferred_playlist_list},
{MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST, deferred_image_history_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_LIST, deferred_video_history_list},
{MENU_ENUM_LABEL_DEFERRED_EXPLORE_LIST, deferred_explore_list},
2022-02-22 13:23:48 -05:00
{MENU_ENUM_LABEL_DEFERRED_CONTENTLESS_CORES_LIST, deferred_contentless_cores_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_DEFERRED_INPUT_SETTINGS_LIST, deferred_push_input_settings_list},
{MENU_ENUM_LABEL_DEFERRED_INPUT_MENU_SETTINGS_LIST, deferred_push_input_menu_settings_list},
2021-03-25 12:45:31 -04:00
{MENU_ENUM_LABEL_DEFERRED_INPUT_TURBO_FIRE_SETTINGS_LIST, deferred_push_input_turbo_fire_settings_list},
{MENU_ENUM_LABEL_DEFERRED_INPUT_HAPTIC_FEEDBACK_SETTINGS_LIST, deferred_push_input_haptic_feedback_settings_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_DEFERRED_AI_SERVICE_SETTINGS_LIST, deferred_push_ai_service_settings_list},
{MENU_ENUM_LABEL_DEFERRED_ACCESSIBILITY_SETTINGS_LIST, deferred_push_accessibility_settings_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_DISC_INFORMATION, deferred_push_disc_information},
{MENU_ENUM_LABEL_SYSTEM_INFORMATION, deferred_push_system_information},
{MENU_ENUM_LABEL_DEFERRED_RPL_ENTRY_ACTIONS, deferred_push_rpl_entry_actions},
{MENU_ENUM_LABEL_DEFERRED_NETPLAY, deferred_push_netplay_sublist},
{MENU_ENUM_LABEL_DEFERRED_DRIVER_SETTINGS_LIST, deferred_push_driver_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST, deferred_push_video_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST, deferred_push_video_fullscreen_mode_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_WINDOWED_MODE_SETTINGS_LIST, deferred_push_video_windowed_mode_settings_list},
2019-12-19 13:39:02 -05:00
{MENU_ENUM_LABEL_DEFERRED_VIDEO_SYNCHRONIZATION_SETTINGS_LIST, deferred_push_video_synchronization_settings_list},
2019-12-19 13:15:57 -05:00
{MENU_ENUM_LABEL_DEFERRED_VIDEO_OUTPUT_SETTINGS_LIST, deferred_push_video_output_settings_list},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_SCALING_SETTINGS_LIST, deferred_push_video_scaling_settings_list},
Add HDR support for D3D12 (rebased PR from MajorPainTheCactus) (#12917) * Add HDR support * Attempt to fix Mingw build and Metal builds * (D3D12) Fix relative header includes * Add missing hdr_sm5.hlsl.h * (d3d12_common.c) Some C89 build fixes * Fix MSVC build * - Attempt to fix build on mingw/msys unix with dirty hack - Fix shader compilation of hdr_sm5.hlsl.h on MSVC/Visual Studio - the define was seen as an error and was causing the first pipeline to error out - Make sure we manually set handle of backBuffer to NULL * Moving the release of the texture above the freeing of desc.srv_heap and desc.rtv_heap solves the hard crashes on teardown/setup in RA - it was crashing hard in d3d12_release_texture before * Add HAVE_D3D12_HDR ifdef - needs to be disabled for WinRT for now because of several things that are Windows desktop-specific right now (GetWindowRect) * Add dirty GUID hack - should work for both mingw/msys on Windows/Linux as well as MSVC/Visual Studio (hopefully) * Change HAVE_D3D12_HDR to HAVE_DXGI_HDR * Move away from camelcase named variables * Fix RARCH_ERR logs - they need a newline at the end * d3d12_check_display_hdr_support - make it return a bool on return and set d3d12->hdr.support and d3d12->hdr.enable outside of the function * (DXGI) Remove D3D12 dependencies from dxgi_check_display_hdr_support and move it to dxgi_common.c instead * (DXGI) move d3d12_swapchain_color_space over to dxgi_common.c and rename it dxgi_swapchain_color_space * (DXGI) move d3d12_set_hdr_metadata to dxgi_common.c and rename it dxgi_set_hdr_metadata * (DXGI) dxgi_check_display_hdr_support - better error handling? * Fix typo * Remove video_force_resolution * (D3D12) Address TODO/FIXME * (D3D12) Backport https://github.com/libretro/RetroArch/pull/12916/commits/c1b6c0bff2aa33cde035b43cb31ac7e78ff2a07a - Fixed resource transition for present when HDR is off Fixed cel shader displaying all black as blending was enabled when the hdr shader was being applied - turned off blending during this shader * Move d3d12_hdr_uniform_t to dxgi_common.h and rename it dxgi_hdr_uniform_t * (D3D11) Add HDR support * Add TODO/FIXME notes * Cache hdr_enable in video_frame_info_t * Update comment
2021-09-03 00:15:25 -04:00
{MENU_ENUM_LABEL_DEFERRED_VIDEO_HDR_SETTINGS_LIST, deferred_push_video_hdr_settings_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_DEFERRED_CRT_SWITCHRES_SETTINGS_LIST, deferred_push_crt_switchres_settings_list},
{MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST, deferred_push_audio_settings_list},
{MENU_ENUM_LABEL_DEFERRED_AUDIO_SYNCHRONIZATION_SETTINGS_LIST, deferred_push_audio_synchronization_settings_list},
{MENU_ENUM_LABEL_DEFERRED_AUDIO_OUTPUT_SETTINGS_LIST, deferred_push_audio_output_settings_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_DEFERRED_AUDIO_MIXER_SETTINGS_LIST, deferred_push_audio_mixer_settings_list},
{MENU_ENUM_LABEL_DEFERRED_LATENCY_SETTINGS_LIST, deferred_push_latency_settings_list},
#ifdef HAVE_LAKKA_SWITCH
{MENU_ENUM_LABEL_SWITCH_GPU_PROFILE, deferred_push_switch_gpu_profile},
#endif
#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX)
{MENU_ENUM_LABEL_SWITCH_CPU_PROFILE, deferred_push_switch_cpu_profile},
#endif
#if defined(HAVE_LAKKA)
{MENU_ENUM_LABEL_DEFERRED_CPU_PERFPOWER_LIST, deferred_push_cpu_perfpower},
{MENU_ENUM_LABEL_DEFERRED_CPU_POLICY_ENTRY, deferred_push_cpu_policy},
#endif
{MENU_ENUM_LABEL_DEFERRED_REMAPPINGS_PORT_LIST, deferred_push_remappings_port },
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_LIST, deferred_push_accounts_list},
{MENU_ENUM_LABEL_CORE_LIST, deferred_push_core_list},
{MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY, deferred_push_history_list},
2022-04-05 18:58:48 -04:00
{MENU_ENUM_LABEL_SAVESTATE_LIST, deferred_push_savestate_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_CORE_OPTIONS, deferred_push_core_options},
{MENU_ENUM_LABEL_DEFERRED_CORE_OPTION_OVERRIDE_LIST, deferred_push_core_option_override_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_NETWORK_INFORMATION, deferred_push_network_information},
{MENU_ENUM_LABEL_ONLINE_UPDATER, deferred_push_options},
{MENU_ENUM_LABEL_HELP_LIST, deferred_push_help},
{MENU_ENUM_LABEL_INFORMATION_LIST, deferred_push_information_list},
{MENU_ENUM_LABEL_INFORMATION, deferred_push_information},
{MENU_ENUM_LABEL_SHADER_OPTIONS, deferred_push_shader_options},
{MENU_ENUM_LABEL_DEFERRED_USER_BINDS_LIST, deferred_user_binds_list},
{MENU_ENUM_LABEL_DEFERRED_INPUT_RETROPAD_BINDS_LIST, deferred_push_input_retropad_binds_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_DEFERRED_INPUT_HOTKEY_BINDS_LIST, deferred_push_input_hotkey_binds_list},
{MENU_ENUM_LABEL_DEFERRED_QUICK_MENU_OVERRIDE_OPTIONS, deferred_push_quick_menu_override_options},
{MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_YOUTUBE_LIST, deferred_push_accounts_youtube_list},
{MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_TWITCH_LIST, deferred_push_accounts_twitch_list},
2020-12-19 07:14:14 -05:00
{MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_FACEBOOK_LIST, deferred_push_accounts_facebook_list},
2019-12-01 16:57:18 -05:00
{MENU_ENUM_LABEL_DEFERRED_VIDEO_SHADER_PRESET_SAVE_LIST, deferred_push_video_shader_preset_save},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_SHADER_PRESET_REMOVE_LIST, deferred_push_video_shader_preset_remove},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_SYSTEM_NAME, deferred_push_dropdown_box_list_manual_content_scan_system_name},
{MENU_ENUM_LABEL_DEFERRED_DROPDOWN_BOX_LIST_MANUAL_CONTENT_SCAN_CORE_NAME, deferred_push_dropdown_box_list_manual_content_scan_core_name},
{MENU_ENUM_LABEL_DEFERRED_RECORDING_SETTINGS_LIST, deferred_push_recording_settings_list},
2020-02-29 09:05:01 -05:00
{MENU_ENUM_LABEL_COLLECTION, deferred_push_content_collection_list},
2020-02-29 10:38:53 -05:00
{MENU_ENUM_LABEL_SETTINGS, deferred_push_settings},
{MENU_ENUM_LABEL_CONFIGURATIONS_LIST, deferred_push_configurations_list},
{MENU_ENUM_LABEL_DEFERRED_PLAYLIST_MANAGER_LIST, deferred_push_playlist_manager_list},
{MENU_ENUM_LABEL_DEFERRED_PLAYLIST_MANAGER_SETTINGS, deferred_push_playlist_manager_settings},
2020-03-26 12:47:31 -04:00
{MENU_ENUM_LABEL_LOAD_CONTENT_LIST, deferred_push_load_content_list},
{MENU_ENUM_LABEL_DEFERRED_PLAYLIST_SETTINGS_LIST, deferred_push_playlist_settings_list},
{MENU_ENUM_LABEL_MANAGEMENT, deferred_push_management_options},
{MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST, deferred_push_database_manager_list_deferred},
{MENU_ENUM_LABEL_CONFIGURATIONS, deferred_push_configurations},
2020-03-27 13:00:26 -04:00
{MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST, deferred_push_accounts_cheevos_list},
{MENU_ENUM_LABEL_DATABASE_MANAGER_LIST, deferred_push_database_manager_list},
#ifdef HAVE_LIBRETRODB
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST, deferred_push_cursor_manager_list_deferred},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER, deferred_push_cursor_manager_list_deferred_query_rdb_entry_publisher},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER, deferred_push_cursor_manager_list_deferred_query_rdb_entry_developer},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN, deferred_push_cursor_manager_list_deferred_query_rdb_entry_origin},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE, deferred_push_cursor_manager_list_deferred_query_rdb_entry_franchise},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW, deferred_push_cursor_manager_list_deferred_query_rdb_entry_enhancement_hw},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING, deferred_push_cursor_manager_list_deferred_query_rdb_entry_esrb_rating},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING, deferred_push_cursor_manager_list_deferred_query_rdb_entry_bbfc_rating},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING, deferred_push_cursor_manager_list_deferred_query_rdb_entry_elspa_rating},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING, deferred_push_cursor_manager_list_deferred_query_rdb_entry_pegi_rating},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING, deferred_push_cursor_manager_list_deferred_query_rdb_entry_cero_rating},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING, deferred_push_cursor_manager_list_deferred_query_rdb_entry_edge_magazine_rating},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE, deferred_push_cursor_manager_list_deferred_query_rdb_entry_edge_magazine_issue},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING, deferred_push_cursor_manager_list_deferred_query_rdb_entry_famitsu_magazine_rating},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS, deferred_push_cursor_manager_list_deferred_query_rdb_entry_max_users},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH, deferred_push_cursor_manager_list_deferred_query_rdb_entry_releasemonth},
{MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR, deferred_push_cursor_manager_list_deferred_query_rdb_entry_releaseyear},
#endif
{MENU_ENUM_LABEL_ACHIEVEMENT_PAUSE_MENU, deferred_push_achievement_pause_menu},
2020-03-27 13:00:26 -04:00
{MENU_ENUM_LABEL_ACHIEVEMENT_LIST, deferred_push_achievement_list},
{MENU_ENUM_LABEL_CORE_COUNTERS, deferred_push_core_counters},
{MENU_ENUM_LABEL_FRONTEND_COUNTERS, deferred_push_frontend_counters},
{MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PARAMETERS, deferred_push_video_shader_preset_parameters},
{MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS, deferred_push_video_shader_parameters},
{MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE, deferred_push_video_shader_preset_save},
{MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS, deferred_push_core_cheat_options},
{MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS, deferred_push_core_input_remapping_options},
{MENU_ENUM_LABEL_DEFERRED_REMAP_FILE_MANAGER_LIST, deferred_push_remap_file_manager},
2020-03-27 13:00:26 -04:00
{MENU_ENUM_LABEL_VIDEO_SHADER_PRESET, deferred_push_video_shader_preset},
{MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PREPEND, deferred_push_video_shader_preset_prepend},
{MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_APPEND, deferred_push_video_shader_preset_append},
2020-03-27 13:00:26 -04:00
{MENU_ENUM_LABEL_VIDEO_SHADER_PASS, deferred_push_video_shader_pass},
{MENU_ENUM_LABEL_VIDEO_FILTER, deferred_push_video_filter},
{MENU_ENUM_LABEL_MENU_WALLPAPER, deferred_push_images},
{MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN, deferred_push_audio_dsp_plugin},
{MENU_ENUM_LABEL_INPUT_OVERLAY, deferred_push_input_overlay},
{MENU_ENUM_LABEL_INPUT_OSK_OVERLAY, deferred_push_input_osk_overlay},
2020-03-27 13:00:26 -04:00
{MENU_ENUM_LABEL_VIDEO_FONT_PATH, deferred_push_video_font_path},
{MENU_ENUM_LABEL_XMB_FONT, deferred_push_xmb_font_path},
{MENU_ENUM_LABEL_CHEAT_FILE_LOAD, deferred_push_cheat_file_load},
{MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND, deferred_push_cheat_file_load_append},
{MENU_ENUM_LABEL_REMAP_FILE_LOAD, deferred_push_remap_file_load},
{MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD, deferred_push_override_file_load},
2020-03-27 13:00:26 -04:00
{MENU_ENUM_LABEL_RECORD_CONFIG, deferred_push_record_configfile},
{MENU_ENUM_LABEL_STREAM_CONFIG, deferred_push_stream_configfile},
{MENU_ENUM_LABEL_RGUI_MENU_THEME_PRESET, deferred_push_rgui_theme_preset},
{MENU_ENUM_LABEL_NETPLAY, deferred_push_netplay},
{MENU_ENUM_LABEL_CONTENT_SETTINGS, deferred_push_content_settings},
{MENU_ENUM_LABEL_ADD_CONTENT_LIST, deferred_push_add_content_list},
{MENU_ENUM_LABEL_DEFERRED_CORE_LIST, deferred_push_core_list_deferred},
{MENU_ENUM_LABEL_DEFERRED_CORE_LIST_SET, deferred_push_core_collection_list_deferred},
{MENU_ENUM_LABEL_DEFERRED_VIDEO_FILTER, deferred_push_video_filter},
{MENU_ENUM_LABEL_CONTENT_HISTORY_PATH, deferred_push_content_history_path},
{MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST, deferred_push_detect_core_list},
{MENU_ENUM_LABEL_FAVORITES, deferred_push_detect_core_list},
{MENU_ENUM_LABEL_DEFERRED_MANUAL_CONTENT_SCAN_LIST, deferred_push_manual_content_scan_list},
{MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_DAT_FILE, deferred_push_manual_content_scan_dat_file},
{MENU_ENUM_LABEL_DEFERRED_CORE_RESTORE_BACKUP_LIST, deferred_push_core_restore_backup_list},
{MENU_ENUM_LABEL_DEFERRED_CORE_DELETE_BACKUP_LIST, deferred_push_core_delete_backup_list},
2020-06-11 09:12:20 -04:00
{MENU_ENUM_LABEL_DEFERRED_CORE_MANAGER_LIST, deferred_push_core_manager_list},
#ifdef HAVE_MIST
{MENU_ENUM_LABEL_DEFERRED_STEAM_SETTINGS_LIST, deferred_push_steam_settings_list},
{MENU_ENUM_LABEL_DEFERRED_CORE_MANAGER_STEAM_LIST, deferred_push_core_manager_steam_list},
{MENU_ENUM_LABEL_DEFERRED_CORE_INFORMATION_STEAM_LIST, deferred_push_core_information_steam_list},
#endif
2020-03-27 13:00:26 -04:00
{MENU_ENUM_LABEL_SIDELOAD_CORE_LIST, deferred_push_file_browser_select_sideload_core},
{MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION_DETECT_CORE, deferred_archive_action_detect_core},
{MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION, deferred_archive_action},
{MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE, deferred_archive_open_detect_core},
{MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN, deferred_archive_open},
#ifdef HAVE_NETWORKING
{MENU_ENUM_LABEL_DEFERRED_LAKKA_LIST, deferred_push_lakka_list},
#endif
2019-12-01 16:38:53 -05:00
};
if (!string_is_equal(label, "null"))
{
for (i = 0; i < ARRAY_SIZE(info_list); i++)
2019-12-01 16:38:53 -05:00
{
if (string_is_equal(label, msg_hash_to_str(info_list[i].type)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, info_list[i].cb);
return 0;
}
2019-12-01 16:38:53 -05:00
}
/* MENU_ENUM_LABEL_DEFERRED_RDB_ENTRY_DETAIL requires special
* treatment, since the label has the format:
* <MENU_ENUM_LABEL_DEFERRED_RDB_ENTRY_DETAIL>|<entry_name>
* i.e. cannot use a normal string_is_equal() */
if (string_starts_with(label,
msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_RDB_ENTRY_DETAIL)))
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rdb_entry_detail);
}
2019-12-17 09:07:35 -05:00
}
2019-12-01 16:57:18 -05:00
if (cbs->enum_idx != MSG_UNKNOWN)
2018-02-05 09:10:10 -05:00
{
2019-12-01 16:57:18 -05:00
switch (cbs->enum_idx)
{
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_MAIN_MENU:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_main_menu_list);
break;
case MENU_ENUM_LABEL_DEFERRED_USER_BINDS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_user_binds_list);
break;
case MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_accounts_list);
break;
case MENU_ENUM_LABEL_DEFERRED_PLAYLIST_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_playlist_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_PLAYLIST_MANAGER_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_playlist_manager_list);
break;
case MENU_ENUM_LABEL_DEFERRED_PLAYLIST_MANAGER_SETTINGS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_playlist_manager_settings);
break;
case MENU_ENUM_LABEL_DEFERRED_RECORDING_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_recording_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_INPUT_RETROPAD_BINDS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_input_retropad_binds_list);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_INPUT_HOTKEY_BINDS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_input_hotkey_binds_list);
break;
case MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_CHEEVOS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_accounts_cheevos_list);
break;
case MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_YOUTUBE_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_accounts_youtube_list);
break;
case MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_TWITCH_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_accounts_twitch_list);
break;
2020-12-19 07:14:14 -05:00
case MENU_ENUM_LABEL_DEFERRED_ACCOUNTS_FACEBOOK_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_accounts_facebook_list);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION_DETECT_CORE:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_archive_action_detect_core);
break;
case MENU_ENUM_LABEL_DEFERRED_ARCHIVE_ACTION:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_archive_action);
break;
case MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN_DETECT_CORE:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_archive_open_detect_core);
break;
case MENU_ENUM_LABEL_DEFERRED_ARCHIVE_OPEN:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_archive_open);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_LIST:
2016-06-16 11:54:06 -04:00
#ifdef HAVE_NETWORKING
2019-12-01 16:57:18 -05:00
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_content_list);
#endif
2019-12-01 16:57:18 -05:00
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_LIST:
#ifdef HAVE_NETWORKING
2019-12-01 16:57:18 -05:00
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_content_dirs_list);
#endif
2019-12-01 16:57:18 -05:00
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_CONTENT_DIRS_SUBDIR_LIST:
#ifdef HAVE_NETWORKING
2019-12-01 16:57:18 -05:00
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_content_dirs_subdir_list);
#endif
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_SYSTEM_FILES_LIST:
#ifdef HAVE_NETWORKING
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_system_files_list);
2016-06-16 11:54:06 -04:00
#endif
2019-12-01 16:57:18 -05:00
break;
case MENU_ENUM_LABEL_DEFERRED_THUMBNAILS_UPDATER_LIST:
2016-06-16 11:54:06 -04:00
#ifdef HAVE_NETWORKING
2019-12-01 16:57:18 -05:00
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_thumbnails_updater_list);
#endif
2019-12-01 16:57:18 -05:00
break;
case MENU_ENUM_LABEL_DEFERRED_PL_THUMBNAILS_UPDATER_LIST:
#ifdef HAVE_NETWORKING
2019-12-01 16:57:18 -05:00
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_pl_thumbnails_updater_list);
2016-06-16 11:54:06 -04:00
#endif
2019-12-01 16:57:18 -05:00
break;
case MENU_ENUM_LABEL_DEFERRED_LAKKA_LIST:
#ifdef HAVE_NETWORKING
2019-12-01 16:57:18 -05:00
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_lakka_list);
#endif
2019-12-01 16:57:18 -05:00
break;
case MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_history_list);
break;
case MENU_ENUM_LABEL_DATABASE_MANAGER_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_database_manager_list);
break;
case MENU_ENUM_LABEL_CHEAT_FILE_LOAD:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cheat_file_load);
break;
case MENU_ENUM_LABEL_CHEAT_FILE_LOAD_APPEND:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cheat_file_load_append);
break;
case MENU_ENUM_LABEL_REMAP_FILE_LOAD:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_remap_file_load);
break;
case MENU_ENUM_LABEL_OVERRIDE_FILE_LOAD:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_override_file_load);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_RECORD_CONFIG:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_record_configfile);
break;
case MENU_ENUM_LABEL_STREAM_CONFIG:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_stream_configfile);
break;
case MENU_ENUM_LABEL_RGUI_MENU_THEME_PRESET:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rgui_theme_preset);
break;
case MENU_ENUM_LABEL_SHADER_OPTIONS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_shader_options);
break;
case MENU_ENUM_LABEL_ONLINE_UPDATER:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_options);
break;
case MENU_ENUM_LABEL_NETPLAY:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_netplay);
break;
case MENU_ENUM_LABEL_CONTENT_SETTINGS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_content_settings);
break;
case MENU_ENUM_LABEL_ADD_CONTENT_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_add_content_list);
break;
case MENU_ENUM_LABEL_CONFIGURATIONS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_configurations_list);
break;
case MENU_ENUM_LABEL_LOAD_CONTENT_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_load_content_list);
break;
case MENU_ENUM_LABEL_LOAD_CONTENT_SPECIAL:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_load_content_special);
break;
case MENU_ENUM_LABEL_INFORMATION_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_information_list);
break;
case MENU_ENUM_LABEL_INFORMATION:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_information);
break;
case MENU_ENUM_LABEL_MANAGEMENT:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_management_options);
break;
case MENU_ENUM_LABEL_HELP_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_help);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_list_deferred);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_LIST_SET:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_collection_list_deferred);
break;
case MENU_ENUM_LABEL_DEFERRED_VIDEO_FILTER:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_filter);
break;
case MENU_ENUM_LABEL_DEFERRED_DATABASE_MANAGER_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_database_manager_list_deferred);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred);
break;
2016-12-23 21:21:29 -05:00
#ifdef HAVE_LIBRETRODB
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PUBLISHER:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_publisher);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_DEVELOPER:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_developer);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ORIGIN:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_origin);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FRANCHISE:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_franchise);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ENHANCEMENT_HW:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_enhancement_hw);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ESRB_RATING:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_esrb_rating);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_BBFC_RATING:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_bbfc_rating);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_ELSPA_RATING:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_elspa_rating);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_PEGI_RATING:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_pegi_rating);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_CERO_RATING:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_cero_rating);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_RATING:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_edge_magazine_rating);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_EDGE_MAGAZINE_ISSUE:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_edge_magazine_issue);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_FAMITSU_MAGAZINE_RATING:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_famitsu_magazine_rating);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_MAX_USERS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_max_users);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEMONTH:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_releasemonth);
break;
case MENU_ENUM_LABEL_DEFERRED_CURSOR_MANAGER_LIST_RDB_ENTRY_RELEASEYEAR:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cursor_manager_list_deferred_query_rdb_entry_releaseyear);
break;
2016-12-23 21:21:29 -05:00
#endif
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_NETWORK_INFORMATION:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_network_information);
break;
case MENU_ENUM_LABEL_ACHIEVEMENT_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list);
break;
case MENU_ENUM_LABEL_CORE_COUNTERS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_counters);
break;
case MENU_ENUM_LABEL_FRONTEND_COUNTERS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_frontend_counters);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_preset_parameters);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_parameters);
break;
case MENU_ENUM_LABEL_SETTINGS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_settings);
break;
2022-04-05 18:58:48 -04:00
case MENU_ENUM_LABEL_SAVESTATE_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_savestate_list);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_CORE_OPTIONS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_options);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_OPTION_OVERRIDE_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_option_override_list);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_cheat_options);
break;
case MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_input_remapping_options);
break;
case MENU_ENUM_LABEL_DEFERRED_REMAP_FILE_MANAGER_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_remap_file_manager);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_CORE_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_list);
break;
case MENU_ENUM_LABEL_PLAYLISTS_TAB:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_content_collection_list);
break;
case MENU_ENUM_LABEL_CONFIGURATIONS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_configurations);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_preset);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PREPEND:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_preset_prepend);
break;
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_APPEND:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_preset_append);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_VIDEO_SHADER_PASS:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_shader_pass);
break;
case MENU_ENUM_LABEL_VIDEO_FILTER:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_filter);
break;
case MENU_ENUM_LABEL_MENU_WALLPAPER:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_images);
break;
case MENU_ENUM_LABEL_AUDIO_DSP_PLUGIN:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_audio_dsp_plugin);
break;
case MENU_ENUM_LABEL_INPUT_OVERLAY:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_input_overlay);
break;
case MENU_ENUM_LABEL_INPUT_OSK_OVERLAY:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_input_osk_overlay);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_VIDEO_FONT_PATH:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_font_path);
break;
case MENU_ENUM_LABEL_XMB_FONT:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_xmb_font_path);
break;
case MENU_ENUM_LABEL_CONTENT_HISTORY_PATH:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_content_history_path);
break;
case MENU_ENUM_LABEL_DEFERRED_VIDEO_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_VIDEO_FULLSCREEN_MODE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_fullscreen_mode_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_VIDEO_WINDOWED_MODE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_windowed_mode_settings_list);
break;
2019-12-19 13:39:02 -05:00
case MENU_ENUM_LABEL_DEFERRED_VIDEO_SYNCHRONIZATION_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_synchronization_settings_list);
break;
2019-12-19 13:15:57 -05:00
case MENU_ENUM_LABEL_DEFERRED_VIDEO_OUTPUT_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_output_settings_list);
break;
Add HDR support for D3D12 (rebased PR from MajorPainTheCactus) (#12917) * Add HDR support * Attempt to fix Mingw build and Metal builds * (D3D12) Fix relative header includes * Add missing hdr_sm5.hlsl.h * (d3d12_common.c) Some C89 build fixes * Fix MSVC build * - Attempt to fix build on mingw/msys unix with dirty hack - Fix shader compilation of hdr_sm5.hlsl.h on MSVC/Visual Studio - the define was seen as an error and was causing the first pipeline to error out - Make sure we manually set handle of backBuffer to NULL * Moving the release of the texture above the freeing of desc.srv_heap and desc.rtv_heap solves the hard crashes on teardown/setup in RA - it was crashing hard in d3d12_release_texture before * Add HAVE_D3D12_HDR ifdef - needs to be disabled for WinRT for now because of several things that are Windows desktop-specific right now (GetWindowRect) * Add dirty GUID hack - should work for both mingw/msys on Windows/Linux as well as MSVC/Visual Studio (hopefully) * Change HAVE_D3D12_HDR to HAVE_DXGI_HDR * Move away from camelcase named variables * Fix RARCH_ERR logs - they need a newline at the end * d3d12_check_display_hdr_support - make it return a bool on return and set d3d12->hdr.support and d3d12->hdr.enable outside of the function * (DXGI) Remove D3D12 dependencies from dxgi_check_display_hdr_support and move it to dxgi_common.c instead * (DXGI) move d3d12_swapchain_color_space over to dxgi_common.c and rename it dxgi_swapchain_color_space * (DXGI) move d3d12_set_hdr_metadata to dxgi_common.c and rename it dxgi_set_hdr_metadata * (DXGI) dxgi_check_display_hdr_support - better error handling? * Fix typo * Remove video_force_resolution * (D3D12) Address TODO/FIXME * (D3D12) Backport https://github.com/libretro/RetroArch/pull/12916/commits/c1b6c0bff2aa33cde035b43cb31ac7e78ff2a07a - Fixed resource transition for present when HDR is off Fixed cel shader displaying all black as blending was enabled when the hdr shader was being applied - turned off blending during this shader * Move d3d12_hdr_uniform_t to dxgi_common.h and rename it dxgi_hdr_uniform_t * (D3D11) Add HDR support * Add TODO/FIXME notes * Cache hdr_enable in video_frame_info_t * Update comment
2021-09-03 00:15:25 -04:00
case MENU_ENUM_LABEL_DEFERRED_VIDEO_HDR_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_hdr_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_VIDEO_SCALING_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_video_scaling_settings_list);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_CRT_SWITCHRES_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_crt_switchres_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_CONFIGURATION_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_configuration_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_SAVING_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_saving_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_CLOUD_SYNC_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cloud_sync_settings_list);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_LOGGING_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_logging_settings_list);
2019-12-01 16:57:18 -05:00
break;
case MENU_ENUM_LABEL_DEFERRED_FRAME_THROTTLE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_frame_throttle_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_FRAME_TIME_COUNTER_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_frame_time_counter_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_REWIND_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rewind_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_CHEEVOS_APPEARANCE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cheevos_appearance_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_CHEEVOS_VISIBILITY_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cheevos_visibility_settings_list);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_ONSCREEN_DISPLAY_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_onscreen_display_settings_list);
break;
#if defined(HAVE_OVERLAY)
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_ONSCREEN_OVERLAY_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_onscreen_overlay_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_OSK_OVERLAY_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_osk_overlay_settings_list);
break;
2019-03-30 20:17:08 -04:00
#endif
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_AUDIO_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_audio_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_AUDIO_OUTPUT_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_audio_output_settings_list);
break;
Add microphone support via a new driver (#14731) * Some slight fixes * Update libretro.h * Log calls to RETRO_ENVIRONMENT_GET_MICROPHONE_INTERFACE * Finish proof-of-concept for mic support - It works, but doesn't support floating-point audio yet - It may need to be resampled, too * Add macros that aren't available in SDL 2 * Comment out a variable definition for now - For C89 compliance * Add some comments for clarity * Let ALSA tolerate a null new_rate * Partial ALSA microphone support - Not yet tested - Mic is created and destroyed - Mic can also be paused or unpaused - Mic is paused or unpaused with the rest of the driver - Microphone is not yet read * Install error logging in the ALSA driver - It defers to RARCH_ERR * Free the ALSA microphone in alsa_free * Fix an indent * First draft of alsa_read_microphone * Deinitialize SDL Audio in sdl_audio_free * Save and restore the ALSA error logger - You should always practice safe global state * Add newlines to some RARCH_ERRs * Add some logging * Check for the mic being active via settings instead of via flags * Adjusted a log entry to be less misleading - A frequency of 0Hz looks weird to the uninformed - In reality, it means the driver used the requested frequency * Fix an incorrect format string * Tidy up logging in alsa.c * Rename audio_enable_microphone to audio_enable_input * Rename microphone_device to audio_input_device * Add audio_input_latency and audio_input_block_frames settings * Add all mic-related settings to the options menu * Adjust logging for alsa.c - Log the ALSA library version - Add errno details * Refer to the microphone in logs by name * Use %u instead of %d for some log items * Add input_samples_buf * Remove an inaccurate comment * Change type of input_samples_buf * Clean up audio_driver_flush_microphone_input * Comment convert_float_to_s16 - It helped me understand what it's doing - Turns out it'll work just fine on mono audio * Don't use the resampler for mic input * Fix crash in the ALSA driver when reading from a mic * Update some logging messages * ALSA support now works for mics * Reuse some common functions in alsa.c * Add alsa_thread_microphone_t * Refactor alsa.c - Introduce alsa_init_pcm to init any PCM that we're using - Vastly simplifies the implementation of alsa_init and alsa_init_microphone - Will be used for the read-based versions next * Make ALSA logging a little more consistent * Clean up the mic with alsa_free_microphone if alsa_init_microphone fails * Remove an unused function * Move some cleanup in alsa.c to a common function * First crack at mic support for alsathread - Refactor some duplicate code into functions - Use functions introduced in alsa.c - Create and destroy the mic * Slight cleanups for clarity * Implement alsa_thread_set/get_microphone_state * More work on alsathread - No more crashing, but the mic just returns silence * Slight cleanups for clarity * Add alsa_set_mic_enabled_internal - For setting the state of a microphone while considering its current state * Use alsa_set_mic_enabled_internal * Log a little more info * Log when the audio driver is started/stopped * Move base microphone driver code into a new directory - Add microphone_driver.c to Makefile.common - Rename functions as needed * Initialize and deinitialize the microphone driver * Implement sdl_microphone.c * Un-const an argument - In case the driver context needs to do any locking * Revise comments for microphone_driver.h * Remove an unimplemented function * Remove some functions from the mic driver * Remove mic functions from audio_thread_wrapper * Remove mic functions from sdl_audio * Fix microphone_null * Split the mic code for the alsa audio drivers into microphone drivers * Fix an extra struct member * Add a setting for the mic driver * Add a command to reinitialize the microphone driver * Rename mic-related settings * Add DRIVER_MICROPHONE_MASK to DRIVERS_CMD_ALL * Rename audio_enable_input to microphone_enable * Remove some labels from qt_options * Search for microphone_driver within find_driver_nonempty * Clean up some mic driver code * Pending mics now return silence * Adjust some logging and comments * Some cleanup in the microphone driver * Invert a flag check - Oops * Fix a log message * Fix the wrong flags being checked * Slight refactor of wasapi_init_device - Add a data_flow parameter - Declare it in a header - In preparation for WASAPI mic support * Add some WASAPI macros for _IAudioCaptureClient * Move some common WASAPI functions to audio/common/wasapi.c - They'll be used by the mic and the audio drivers * Add wasapi_log_hr * Generalize mmdevice_list_new to look for capture devices, too * Fix a function declaration * Move driver-specific device_list_new functions into their respective files * Clean up some declarations * First draft of wasapi microphone driver * Add wasapi_microphone_device_list_free * Change function parameter names to be consistent with microphone_driver * Partially implement wasapi_microphone_read - Mostly copied from the audio driver so far - It doesn't compile yet - But it'll be beautiful when I'm done with it * Refactor the mic driver's functions - Rename get_mic_active to mic_alive - Split set_mic_active into start_mic and stop_mic - Refactor the SDL mic driver accordingly * Edit some WASAPI functions for logging and clarity * Implement more of the WASAPI mic driver * Rename write_event to read_event * Pass the WASAPI driver context to the various read functions * Mostly implement the read function for the WASAPI mic driver * Fix a crash in microphone_driver - Forgot to move the position of the name of null_driver * Reduce some logging in wasapi common functions - Only log the chosen audio client format, not all attempted ones * Add some macro wrappers for IAudioClient methods * Update mic driver configuration - Make the mic driver configurable in the menu - Add config items for WASAPI-related options similar to the audio driver * Fix a menu entry scrolling through audio devices instead of mic devices * Add some utility functions * Expose the new utility functions in wasapi.h * Add extra logging in the WASAPI common functions * Add sharemode_name * Use _IAudioClient_Initialize macro in some places * Pass channels to wasapi_init_client - Remember, mics are in mono * Use _IAudioClient_Initialize macro some more * Forgot to pass channels in some places * Add some utility functions * Forgot an #include * Add wasapi_select_device_format * Simplify the format selection logic in wasapi_init_client_sh * Unset the microphone in wasapi_microphone_close_mic - Ought to prevent a potential segfault * Simplify some logging * Fix incorrect value being passed to _IAudioCaptureClient_ReleaseBuffer * Remove some unneeded logging * Add some values to hresult_name * Polish up wasapi_select_device_format - Test for formats manually when Windows can't - Add some debug logging - Check for channels * Compute the fields of WAVEFORMATEXTENSIBLE correctly - As per the doc's stated requirements * Simplify logic for WASAPI client creation * Fix a potential hang in wasapi_microphone_read_shared_buffered * Stop the microphone if the driver is stopped * Don't name the microphone event * Ensure that wasapi_init_client reports the correct format and rate * Implement exclusive microphone read access for WASAPI * Add _IAudioCaptureClient_GetNextPacketSize macro * Organize cases in hresult_name * Clear some extra fields if wasapi_set_format is setting a Pcm format * Adjust some logs * Adjust some logs * Remove unneeded local vars * Add a log * Update wasapi.c * Update wasapi.c * Fix shared-mode mic support in WASAPI producing broken input - Turns out it had nothing to do with shared mode * Reuse a common function - Remove wasapi_microphone_read_shared_buffered - Rename wasapi_microphone_read_exclusive to wasapi_microphone_read_buffered * Remove some code I was using for test purposes * Clarify some language * Double the default shared-mode mic buffer length * Split getting a device's name into a separate function, then use it * Fix the ALSA mic drivers - To comply with changes I previously made to the mic driver interface * Remove unused synchronization primitives from the SDL microphone driver * Add sdl_microphone_mic_use_float * Document audio_driver_state_flags - I needed to understand these to see if similar flags were required for the mic driver * Remove an unused function in wasapi.c * Add and document flags in microphone_driver.h * Remove driver-specific mic start/stop functions - The mic driver itself doesn't do much processing - That honor goes to individual mics * Remove some unused fields in microphone_driver.h * Add CMD_EVENT_MICROPHONE_STOP/START * Remove unused functions from microphone_null * Change how the mic driver state is referenced in some places * Simplify the SDL microphone driver - The driver backend no longer keeps a reference to the mic (the frontend does that) - Remove functions that are no longer needed - Don't track paused state, just query the mic itself * Simplify the WASAPI microphone driver - Don't track the driver running state or the microphone handle, the frontend does that now - Remove support for unbuffered input (hunterk suggested that it wasn't necessary) * Make microphone_wasapi_sh_buffer_length a uint, not an int - It won't be negative anymore - 0 now represents the default value * Make the microphone frontend more robust - Improve documentation for how various functions should be implemented - Closes all microphones before freeing the driver (so backends don't have to) - Tracks the enabled state of each microphone, so backends don't have to (but they still can) * Stop the mic driver in core_unload_game * Ensure mic support is compatible with the revised menu code * Move alsa.h into audio/common * Remove RETRO_ENVIRONMENT_GET_MICROPHONE_ENABLED - It was never really needed * Refactor the ALSA microphone driver - Move common ALSA functions to audio/common/alsa.c - Replace alsa_set_mic_enabled_internal with alsa_start/stop_pcm - Don't track the microphone handle in the ALSA driver context - Remove unneeded fields * Move some common alsathread code into audio/common/alsathread.c * Change return type of mic_driver_open_mic_internal to bool * First crack at resampling mic input * Remove an extraneous check - I think something distracted me when I was writing this line * Add stereo/mono conversion functions * Make alsa_start_pcm and alsa_stop_pcm more robust - They now return success if the stream is already running and stopped, respectively * Revise some mic-related comments in libretro.h * First crack at resampling mic input * Simplify an expression * Simplify an expression * Fix a log tag * Allow mic resampler to be configured separately from audio resampler * Add some comments * Set the source ratio to something sensible * Stop deadlock in `alsathread` mic driver * Allow mics to be initialized even when core is loaded from CLI - When loading content from CLI, the drivers are initialized a little differently - That threw off the mic initialization code * Rename the functions in retro_microphone_interface * Revise some mic-related comments in libretro.h * Update retro_microphone_interface - Add get_mic_rate - Add a parameter to open_mic - The modifications don't do anything yet * Use parameter objects in the microphone handle * Replace get_mic_rate with get_params * Add a microphone interface version * Remove part of a comment * Set the effective params in mic_driver_microphone_handle_init * Drop a stray newline * Change where the mic interface is zeroed - I was accidentally throwing out the version that the core was asking for * Reduce logspam for wasapi_set_nonblock_state - Now it only logs when the sync mode is changed * Change DEFAULT_WASAPI_SH_BUFFER_LENGTH to 0 - -16 is no longer a valid value * Set the new_rate in wasapi_init * Change description of microphone sample rate in the settings * First attempt at resampling configured mic input * Forgot a section * Fix some input samples being skipped * Rename a variable for clarity * Add microphone.outgoing_samples * Update the mic driver - Processed samples are now buffered - The resampler is skipped if the ratio is (very close to) 1 * Remove part of a comment * Update some comments in audio_resampler.h * Slightly refactor the SDL microphone driver - Move SDL_AudioSpec to a field of sdl_microphone_handle_t - Allow SDL to change the requested format and sample rate - Request floating-point input - Implement sdl_microphone_mic_use_float * Fix a non-C89-compliant declaration * Add new files to griffin.c * Remove a C++-style comment * Add two more files to griffin.c * Remove some unneeded declarations in microphone_driver.h * Remove a stray comma in configuration.c - For C89 compliance * Fix compilation on some platforms * Change some function signatures * Make the ALSA drivers always set the audio rate * Fix the alsathread mic driver * Make state_manager_frame_is_reversed return false if HAVE_REWIND isn't defined * Mute the microphone if the core is running in fast-forward, slow-mo, or rewind * Clarify a comment * Clarify a comment * Add a comment * Don't allocate memory for slowmo samples in the mic driver - We're not supporting slowmo for mics, so it's not needed * Fix a { * Add my name to AUTHORS.h * Add driver_lifetime_flags - For drivers that have special setup/teardown needs * Ensure that resetting the mic driver maintains active mic handles - Prevents fullscreen toggle from stopping all mic input * Update CHANGES.md * Move some default microphone settings to a new part of the config file * Ensure that RetroArch can use the audio format that Windows suggests * Remove references to mic support in the SDL audio driver * Remove unused WASAPI functions * Return failure if RetroArch couldn't select a WASAPI format * Ensure that Windows uses the WASAPI mic driver by default * Treat disabled mic support as a warning, not an error * Clarify some WASAPI-related microphone settings * Remove some unused variables * Add or revise microphone-related comments * Rearrange doc comments for microphone types in libretro.h * Remove a space * Remove some unused flags * Remove ALSA error logger - It was never used anyway * Remove unneeded microphone-related arguments * Document a parameter * Remove a logging call * Add a constant for the microphone's shared buffer length for WASAPI * Fix stylistic inconsistencies * Make mic_driver_get_sample_size a macro instead of a function * Move the microphone implementation to the audio directory * Make microphone support optional (but enabled by default) * Fix the griffin build
2023-06-06 15:55:06 -04:00
#ifdef HAVE_MICROPHONE
case MENU_ENUM_LABEL_DEFERRED_MICROPHONE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_microphone_settings_list);
break;
#endif
case MENU_ENUM_LABEL_DEFERRED_AUDIO_SYNCHRONIZATION_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_audio_synchronization_settings_list);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_LATENCY_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_latency_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_settings_list);
break;
2020-05-28 12:48:18 -04:00
case MENU_ENUM_LABEL_DEFERRED_CORE_INFORMATION_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_information_list);
break;
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_DUMP_DISC_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_dump_disk_list);
break;
#ifdef HAVE_LAKKA
case MENU_ENUM_LABEL_DEFERRED_EJECT_DISC:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_eject_disc);
break;
#endif
2019-12-01 16:57:18 -05:00
case MENU_ENUM_LABEL_DEFERRED_CDROM_INFO_DETAIL_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cdrom_info_detail_list);
break;
case MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST:
case MENU_ENUM_LABEL_FAVORITES:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_detect_core_list);
break;
case MENU_ENUM_LABEL_DEFERRED_MANUAL_CONTENT_SCAN_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_manual_content_scan_list);
break;
case MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_DAT_FILE:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_manual_content_scan_dat_file);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_RESTORE_BACKUP_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_restore_backup_list);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_DELETE_BACKUP_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_delete_backup_list);
break;
2020-06-11 09:12:20 -04:00
case MENU_ENUM_LABEL_DEFERRED_CORE_MANAGER_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_manager_list);
break;
#ifdef HAVE_MIST
case MENU_ENUM_LABEL_DEFERRED_STEAM_SETTINGS_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_steam_settings_list);
break;
case MENU_ENUM_LABEL_DEFERRED_CORE_MANAGER_STEAM_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_manager_steam_list);
break;
#endif
2020-01-09 09:13:21 -05:00
case MENU_ENUM_LABEL_SIDELOAD_CORE_LIST:
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_file_browser_select_sideload_core);
break;
2019-12-01 16:57:18 -05:00
default:
return -1;
}
2020-03-27 13:00:26 -04:00
return 0;
2018-02-05 09:10:10 -05:00
}
2020-03-27 13:00:26 -04:00
return -1;
}
2016-01-25 12:21:48 -05:00
static int menu_cbs_init_bind_deferred_push_compare_type(
2016-07-01 13:58:08 -04:00
menu_file_list_cbs_t *cbs, unsigned type)
{
2016-07-02 14:49:38 -04:00
if (type == FILE_TYPE_PLAYLIST_COLLECTION)
2015-10-11 15:08:07 -04:00
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_rdb_collection);
}
2015-06-25 03:15:34 -04:00
else if (type == MENU_SETTING_ACTION_CORE_DISK_OPTIONS)
2015-10-11 15:08:07 -04:00
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_disk_options);
}
2019-07-11 00:34:27 -04:00
else if (type == MENU_SET_CDROM_INFO)
{
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_cdrom_info_detail_list);
return 0;
}
else
return -1;
return 0;
}
int menu_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
2020-03-27 13:00:26 -04:00
const char *path, const char *label, unsigned type, size_t idx)
{
if (!cbs)
2015-06-07 12:36:10 -04:00
return -1;
2015-10-11 15:08:07 -04:00
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_default);
if (cbs->enum_idx != MENU_ENUM_LABEL_PLAYLIST_ENTRY &&
2020-03-27 13:00:26 -04:00
menu_cbs_init_bind_deferred_push_compare_label(cbs, label) == 0)
2015-06-07 12:36:10 -04:00
return 0;
2016-01-25 12:21:48 -05:00
if (menu_cbs_init_bind_deferred_push_compare_type(
2016-07-01 13:58:08 -04:00
cbs, type) == 0)
2015-06-07 12:36:10 -04:00
return 0;
2015-06-07 12:36:10 -04:00
return -1;
}