diff --git a/core_type.h b/core_type.h index 93901f20e1..c9ab1af576 100644 --- a/core_type.h +++ b/core_type.h @@ -23,7 +23,7 @@ enum rarch_core_type CORE_TYPE_FFMPEG, CORE_TYPE_IMAGEVIEWER, CORE_TYPE_NETRETROPAD, - CORE_TYPE_VIDEOPROCESSOR + CORE_TYPE_VIDEO_PROCESSOR }; #endif diff --git a/cores/libretro-video-processor/video_processor_v4l2.c b/cores/libretro-video-processor/video_processor_v4l2.c index 194c6222da..b0107778cc 100644 --- a/cores/libretro-video-processor/video_processor_v4l2.c +++ b/cores/libretro-video-processor/video_processor_v4l2.c @@ -434,9 +434,9 @@ RETRO_API void VIDEOPROC_CORE_PREFIX(retro_get_system_info)(struct retro_system_ { info->library_name = LIBRARY_NAME; info->library_version = LIBRARY_VERSION; - info->valid_extensions = ""; - info->need_fullpath = true; - info->block_extract = true; + info->valid_extensions = NULL; /* Anything is fine, we don't care. */ + info->need_fullpath = false; + info->block_extract = true; } RETRO_API void VIDEOPROC_CORE_PREFIX(retro_get_system_av_info)(struct retro_system_av_info *info) diff --git a/dynamic.c b/dynamic.c index cce6db3c6e..597508d145 100644 --- a/dynamic.c +++ b/dynamic.c @@ -549,7 +549,7 @@ static void load_symbols(enum rarch_core_type type, struct retro_core_t *current SYMBOL_NETRETROPAD(retro_get_memory_size); #endif break; - case CORE_TYPE_VIDEOPROCESSOR: + case CORE_TYPE_VIDEO_PROCESSOR: #if defined(HAVE_VIDEO_PROCESSOR) SYMBOL_VIDEOPROCESSOR(retro_init); SYMBOL_VIDEOPROCESSOR(retro_deinit); diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 78333da4e3..0f6c1ca760 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -2692,6 +2692,8 @@ static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg) return "take_screenshot"; case MENU_ENUM_LABEL_CORE_UPDATER_LIST: return "core_updater_list"; + case MENU_ENUM_LABEL_START_VIDEO_PROCESSOR: + return "menu_start_video_processor"; case MENU_ENUM_LABEL_START_NET_RETROPAD: return "menu_start_net_retropad"; case MENU_ENUM_LABEL_THUMBNAILS_UPDATER_LIST: @@ -3296,6 +3298,8 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg) return "Unlocked Achievements:"; case MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS: return "Locked Achievements:"; + case MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR: + return "Start Video Processor"; case MENU_ENUM_LABEL_VALUE_START_NET_RETROPAD: return "Start Remote RetroPad"; case MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST: diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 757a629c60..2e33373a54 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1707,6 +1707,14 @@ static int action_ok_start_net_retropad_core(const char *path, CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU); } +static int action_ok_start_video_processor_core(const char *path, + const char *label, unsigned type, size_t idx, size_t entry_idx) +{ + return generic_action_ok_file_load(NULL, NULL, + CORE_TYPE_FFMPEG, + CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU); +} + #ifdef HAVE_FFMPEG static int action_ok_file_load_ffmpeg(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) @@ -3156,6 +3164,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, case MENU_ENUM_LABEL_START_NET_RETROPAD: BIND_ACTION_OK(cbs, action_ok_start_net_retropad_core); break; + case MENU_ENUM_LABEL_START_VIDEO_PROCESSOR: + BIND_ACTION_OK(cbs, action_ok_start_video_processor_core); + break; case MENU_ENUM_LABEL_OPEN_ARCHIVE_DETECT_CORE: BIND_ACTION_OK(cbs, action_ok_open_archive_detect_core); break; diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index fb5982db67..37d40708ad 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -1621,6 +1621,9 @@ static int mui_list_push(void *data, void *userdata, menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); } + entry.enum_idx = MENU_ENUM_LABEL_START_VIDEO_PROCESSOR; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + entry.enum_idx = MENU_ENUM_LABEL_START_NET_RETROPAD; menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index c2b851cf44..e7bace124c 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -3147,6 +3147,9 @@ static int xmb_list_push(void *data, void *userdata, menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); } + entry.enum_idx = MENU_ENUM_LABEL_START_VIDEO_PROCESSOR; + menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); + entry.enum_idx = MENU_ENUM_LABEL_START_NET_RETROPAD; menu_displaylist_ctl(DISPLAYLIST_SETTING_ENUM, &entry); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 2f3e4c77a7..67830a39bd 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -4201,6 +4201,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_START_CORE, PARSE_ACTION, false); + menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_START_VIDEO_PROCESSOR, PARSE_ACTION, false); + menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_START_NET_RETROPAD, PARSE_ACTION, false); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 3281adb93b..b581364035 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -3988,6 +3988,17 @@ static bool setting_append_list( parent_group); menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_START_CORE); +#if defined(HAVE_VIDEO_PROCESSOR) + CONFIG_ACTION( + list, list_info, + msg_hash_to_str(MENU_ENUM_LABEL_START_VIDEO_PROCESSOR), + msg_hash_to_str(MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR), + &group_info, + &subgroup_info, + parent_group); + menu_settings_list_current_add_enum_idx(list, list_info, MENU_ENUM_LABEL_START_VIDEO_PROCESSOR); +#endif + #if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) CONFIG_ACTION( list, list_info, diff --git a/msg_hash.h b/msg_hash.h index 491c7a9d0d..88d4ce1039 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -354,6 +354,8 @@ enum msg_hash_enums MENU_ENUM_LABEL_SYSTEM_INFO_ENTRY, MENU_ENUM_LABEL_CORE_INFO_ENTRY, MENU_ENUM_LABEL_PLAYLIST_ENTRY, + MENU_ENUM_LABEL_START_VIDEO_PROCESSOR, + MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, MENU_ENUM_LABEL_START_NET_RETROPAD, MENU_ENUM_LABEL_VALUE_START_NET_RETROPAD, diff --git a/tasks/task_content.c b/tasks/task_content.c index b5879b4f08..bc4fcce551 100644 --- a/tasks/task_content.c +++ b/tasks/task_content.c @@ -1732,6 +1732,9 @@ bool task_push_content_load_default( switch (mode) { case CONTENT_MODE_LOAD_NOTHING_WITH_NEW_CORE_FROM_MENU: +#if defined(HAVE_VIDEO_PROCESSOR) + case CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU: +#endif #if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: #endif @@ -1753,6 +1756,7 @@ bool task_push_content_load_default( switch (mode) { case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU: + case CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU: case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: case CONTENT_MODE_LOAD_CONTENT_FROM_PLAYLIST_FROM_MENU: case CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU: @@ -1776,6 +1780,7 @@ bool task_push_content_load_default( { case CONTENT_MODE_LOAD_NOTHING_WITH_DUMMY_CORE: case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU: + case CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU: case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL); break; @@ -1888,11 +1893,16 @@ bool task_push_content_load_default( case CONTENT_MODE_LOAD_NOTHING_WITH_NEW_CORE_FROM_MENU: retroarch_set_current_core_type(type, true); break; -#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: +#if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) retroarch_set_current_core_type(CORE_TYPE_NETRETROPAD, true); break; #endif + case CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU: +#ifdef HAVE_VIDEO_PROCESSOR + retroarch_set_current_core_type(CORE_TYPE_VIDEO_PROCESSOR, true); +#endif + break; default: break; } @@ -1904,6 +1914,9 @@ bool task_push_content_load_default( case CONTENT_MODE_LOAD_FROM_CLI: #if defined(HAVE_NETPLAY) && defined(HAVE_NETWORKGAMEPAD) case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: +#endif +#ifdef HAVE_VIDEO_PROCESSOR + case CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU: #endif case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU: case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU: @@ -1955,6 +1968,7 @@ error: { case CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU: case CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU: + case CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU: case CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU: case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU: case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU: diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index 078ee6e6bc..fa9266ca56 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -41,6 +41,7 @@ enum content_mode_load CONTENT_MODE_LOAD_NOTHING_WITH_CURRENT_CORE_FROM_MENU, CONTENT_MODE_LOAD_NOTHING_WITH_NEW_CORE_FROM_MENU, CONTENT_MODE_LOAD_NOTHING_WITH_NET_RETROPAD_CORE_FROM_MENU, + CONTENT_MODE_LOAD_NOTHING_WITH_VIDEO_PROCESSOR_CORE_FROM_MENU, CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU, CONTENT_MODE_LOAD_CONTENT_WITH_NEW_CORE_FROM_MENU, CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU,