mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
More shader refactors - make sure we can compile entirely
without shader support if HAVE_CG, HAVE_GLSL, HAVE_SLANG and HAVE_HLSL are all not defined
This commit is contained in:
parent
388c4857d3
commit
b6b22a9a32
@ -335,6 +335,20 @@ ifeq ($(HAVE_IMAGEVIEWER), 1)
|
||||
OBJ += cores/libretro-imageviewer/image_core.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CG), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
ifeq ($(HAVE_GLSL), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
ifeq ($(HAVE_HLSL), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
ifeq ($(HAVE_SLANG), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
|
||||
|
||||
# Qt WIMP GUI
|
||||
|
||||
ifeq ($(HAVE_OPENSSL), 1)
|
||||
@ -350,7 +364,6 @@ ifeq ($(HAVE_QT), 1)
|
||||
ui/drivers/qt/ui_qt_load_core_window.o \
|
||||
ui/drivers/qt/ui_qt_msg_window.o \
|
||||
ui/drivers/qt/gridview.o \
|
||||
ui/drivers/qt/shaderparamsdialog.o \
|
||||
ui/drivers/qt/coreoptionsdialog.o \
|
||||
ui/drivers/qt/filedropwidget.o \
|
||||
ui/drivers/qt/coreinfodialog.o \
|
||||
@ -361,6 +374,9 @@ ifeq ($(HAVE_QT), 1)
|
||||
ui/drivers/qt/thumbnaildownload.o \
|
||||
ui/drivers/qt/thumbnailpackdownload.o \
|
||||
ui/drivers/qt/playlistthumbnaildownload.o
|
||||
ifeq ($(HAVE_SHADERS_COMMON),1)
|
||||
OBJ += ui/drivers/qt/shaderparamsdialog.o
|
||||
endif
|
||||
ifeq ($(HAVE_MENU), 1)
|
||||
OBJ += ui/drivers/qt/settingswidgets.o \
|
||||
ui/drivers/qt/options/achievements.o \
|
||||
@ -382,12 +398,14 @@ ifeq ($(HAVE_QT), 1)
|
||||
MOC_HEADERS += ui/drivers/ui_qt.h \
|
||||
ui/drivers/qt/ui_qt_load_core_window.h \
|
||||
ui/drivers/qt/gridview.h \
|
||||
ui/drivers/qt/shaderparamsdialog.h \
|
||||
ui/drivers/qt/coreoptionsdialog.h \
|
||||
ui/drivers/qt/filedropwidget.h \
|
||||
ui/drivers/qt/coreinfodialog.h \
|
||||
ui/drivers/qt/playlistentrydialog.h \
|
||||
ui/drivers/qt/viewoptionsdialog.h
|
||||
ifeq ($(HAVE_SHADERS_COMMON), 1)
|
||||
MOC_HEADERS += ui/drivers/qt/shaderparamsdialog.h
|
||||
endif
|
||||
ifeq ($(HAVE_MENU), 1)
|
||||
MOC_HEADERS += ui/drivers/qt/settingswidgets.h \
|
||||
ui/drivers/qt/options/options.h
|
||||
@ -773,23 +791,6 @@ ifeq ($(HAVE_LAKKA_SWITCH), 1)
|
||||
DEFINES += -DHAVE_LAKKA_SWITCH
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GL_MODERN), 1)
|
||||
HAVE_GLSL=1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CG), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
ifeq ($(HAVE_GLSL), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
ifeq ($(HAVE_GLSL), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
ifeq ($(HAVE_SLANG), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/menu_driver.o \
|
||||
menu/menu_content.o \
|
||||
@ -1352,6 +1353,7 @@ ifeq ($(HAVE_D3D9), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D10), 1)
|
||||
HAVE_D3D_COMMON = 1
|
||||
OBJ += gfx/drivers/d3d10.o \
|
||||
gfx/common/d3d10_common.o \
|
||||
gfx/drivers_font/d3d10_font.o
|
||||
@ -1362,6 +1364,7 @@ ifeq ($(HAVE_D3D10), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D11), 1)
|
||||
HAVE_D3D_COMMON = 1
|
||||
OBJ += gfx/drivers/d3d11.o \
|
||||
gfx/common/d3d11_common.o \
|
||||
gfx/drivers_font/d3d11_font.o
|
||||
@ -1372,6 +1375,7 @@ ifeq ($(HAVE_D3D11), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D12), 1)
|
||||
HAVE_D3D_COMMON = 1
|
||||
OBJ += gfx/drivers/d3d12.o \
|
||||
gfx/common/d3d12_common.o \
|
||||
gfx/drivers_font/d3d12_font.o
|
||||
|
@ -56,7 +56,9 @@
|
||||
#ifdef HAVE_MENU
|
||||
#include "menu/menu_driver.h"
|
||||
#include "menu/menu_content.h"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "menu/menu_shader.h"
|
||||
#endif
|
||||
#include "menu/widgets/menu_dialog.h"
|
||||
#ifdef HAVE_MENU_WIDGETS
|
||||
#include "menu/widgets/menu_widgets.h"
|
||||
@ -247,6 +249,7 @@ static const struct cmd_map map[] = {
|
||||
|
||||
bool command_set_shader(const char *arg)
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
char msg[256];
|
||||
bool is_preset = false;
|
||||
settings_t *settings = NULL;
|
||||
@ -276,6 +279,9 @@ bool command_set_shader(const char *arg)
|
||||
if (settings && !settings->bools.video_shader_enable)
|
||||
settings->bools.video_shader_enable = true;
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
|
||||
@ -2500,7 +2506,9 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_SHADERS_APPLY_CHANGES:
|
||||
#ifdef HAVE_MENU
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
menu_shader_manager_apply_changes();
|
||||
#endif
|
||||
#endif
|
||||
ui_companion_event_command(cmd);
|
||||
break;
|
||||
|
@ -971,9 +971,11 @@ d3d10_gfx_init(const video_info_t* video,
|
||||
{
|
||||
d3d10_fake_context.get_flags = d3d10_get_flags;
|
||||
video_context_driver_set(&d3d10_fake_context);
|
||||
#ifdef HAVE_SLANG
|
||||
const char *shader_preset = retroarch_get_shader_preset();
|
||||
enum rarch_shader_type type = video_shader_parse_type(shader_preset);
|
||||
d3d10_gfx_set_shader(d3d10, type, shader_preset);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -48,7 +48,9 @@ UI
|
||||
#include "../ui/drivers/qt/ui_qt_msg_window.cpp"
|
||||
#include "../ui/drivers/qt/ui_qt_application.cpp"
|
||||
#include "../ui/drivers/qt/gridview.cpp"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "../ui/drivers/qt/shaderparamsdialog.cpp"
|
||||
#endif
|
||||
#include "../ui/drivers/qt/coreoptionsdialog.cpp"
|
||||
#include "../ui/drivers/qt/filedropwidget.cpp"
|
||||
#include "../ui/drivers/qt/coreinfodialog.cpp"
|
||||
@ -84,7 +86,9 @@ UI
|
||||
#include "../ui/drivers/qt/moc_filedropwidget.cpp"
|
||||
#include "../ui/drivers/qt/moc_gridview.cpp"
|
||||
#include "../ui/drivers/qt/moc_playlistentrydialog.cpp"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "../ui/drivers/qt/moc_shaderparamsdialog.cpp"
|
||||
#endif
|
||||
#include "../ui/drivers/qt/moc_ui_qt_load_core_window.cpp"
|
||||
#include "../ui/drivers/qt/moc_viewoptionsdialog.cpp"
|
||||
#endif
|
||||
|
@ -46,7 +46,9 @@
|
||||
struct string_list *dir_list_new_special(const char *input_dir,
|
||||
enum dir_list_type type, const char *filter)
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
char ext_shaders[255];
|
||||
#endif
|
||||
char ext_name[255];
|
||||
const char *exts = NULL;
|
||||
bool recursive = false;
|
||||
@ -87,6 +89,7 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
||||
}
|
||||
break;
|
||||
case DIR_LIST_SHADERS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
{
|
||||
union string_list_elem_attr attr;
|
||||
struct string_list *str_list = string_list_new();
|
||||
@ -120,6 +123,7 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
||||
string_list_free(str_list);
|
||||
exts = ext_shaders;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case DIR_LIST_COLLECTIONS:
|
||||
exts = "lpl";
|
||||
|
@ -25,7 +25,9 @@
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_animation.h"
|
||||
#include "../menu_cbs.h"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "../menu_shader.h"
|
||||
#endif
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../input/input_driver.h"
|
||||
@ -186,6 +188,7 @@ static void menu_action_setting_disp_set_label_configurations(
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT), len);
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static void menu_action_setting_disp_set_label_shader_filter_pass(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
@ -220,6 +223,7 @@ static void menu_action_setting_disp_set_label_shader_filter_pass(
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
static void menu_action_setting_disp_set_label_netplay_mitm_server(
|
||||
@ -252,6 +256,7 @@ static void menu_action_setting_disp_set_label_netplay_mitm_server(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static void menu_action_setting_disp_set_label_shader_watch_for_changes(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
@ -420,6 +425,7 @@ static void menu_action_setting_disp_set_label_shader_scale_pass(
|
||||
else
|
||||
snprintf(s, len, "%ux", scale_value);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void menu_action_setting_disp_set_label_menu_file_core(
|
||||
file_list_t* list,
|
||||
@ -1265,28 +1271,40 @@ static int menu_cbs_init_bind_get_string_representation_compare_label(
|
||||
menu_action_setting_disp_set_label_remap_file_load);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_filter_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_scale_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_num_passes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SHADER_WATCH_FOR_CHANGES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_watch_for_changes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_DEFAULT_FILTER:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_shader_default_filter);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CONFIGURATIONS:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
@ -1621,6 +1639,7 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
{
|
||||
@ -1635,6 +1654,7 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
||||
menu_action_setting_disp_set_label_shader_preset_parameter);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (menu_cbs_init_bind_get_string_representation_compare_label(cbs) == 0)
|
||||
return 0;
|
||||
|
@ -28,7 +28,9 @@
|
||||
#include "../menu_cbs.h"
|
||||
#include "../menu_input.h"
|
||||
#include "../menu_setting.h"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "../menu_shader.h"
|
||||
#endif
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../core.h"
|
||||
@ -50,6 +52,7 @@
|
||||
|
||||
extern struct key_desc key_descriptors[RARCH_MAX_KEYS];
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int generic_shader_action_parameter_left(
|
||||
struct video_shader_parameter *param,
|
||||
unsigned type, const char *label, bool wraparound)
|
||||
@ -83,6 +86,7 @@ static int shader_action_parameter_left(unsigned type, const char *label, bool w
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_AUDIOMIXER
|
||||
static int audio_mixer_stream_volume_left(unsigned type, const char *label,
|
||||
@ -268,6 +272,7 @@ static int action_left_mainmenu(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int action_left_shader_scale_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
@ -315,6 +320,7 @@ static int action_left_shader_filter_default(unsigned type, const char *label,
|
||||
return menu_action_handle_setting(setting,
|
||||
setting_get_type(setting), MENU_ACTION_LEFT, wraparound);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_left_cheat_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
@ -331,6 +337,7 @@ static int action_left_cheat_num_passes(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int action_left_shader_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
@ -358,6 +365,7 @@ static int action_left_shader_watch_for_changes(unsigned type, const char *label
|
||||
settings->bools.video_shader_watch_files = !settings->bools.video_shader_watch_files;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_left_video_resolution(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
@ -590,19 +598,29 @@ static int menu_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_LEFT(cbs, action_left_mainmenu);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_LEFT(cbs, action_left_shader_scale_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_LEFT(cbs, action_left_shader_filter_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_DEFAULT_FILTER:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_LEFT(cbs, action_left_shader_filter_default);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SHADER_WATCH_FOR_CHANGES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_LEFT(cbs, action_left_shader_watch_for_changes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_LEFT(cbs, action_left_shader_num_passes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_NUM_PASSES:
|
||||
BIND_ACTION_LEFT(cbs, action_left_cheat_num_passes);
|
||||
@ -687,6 +705,7 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_LEFT(cbs, audio_mixer_stream_volume_left);
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
{
|
||||
@ -697,6 +716,7 @@ static int menu_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
BIND_ACTION_LEFT(cbs, shader_action_parameter_left);
|
||||
}
|
||||
#endif
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
{
|
||||
|
@ -44,7 +44,9 @@
|
||||
#include "../menu_cbs.h"
|
||||
#include "../menu_entries.h"
|
||||
#include "../menu_setting.h"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "../menu_shader.h"
|
||||
#endif
|
||||
#include "../widgets/menu_dialog.h"
|
||||
#include "../widgets/menu_filebrowser.h"
|
||||
#include "../widgets/menu_input_dialog.h"
|
||||
@ -52,7 +54,6 @@
|
||||
#include "../menu_input.h"
|
||||
#include "../menu_networking.h"
|
||||
#include "../menu_content.h"
|
||||
#include "../menu_shader.h"
|
||||
|
||||
#include "../../core.h"
|
||||
#include "../../configuration.h"
|
||||
@ -472,12 +473,14 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||
break;
|
||||
case ACTION_OK_DL_SHADER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
filebrowser_clear_type();
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = settings->paths.directory_video_shader;
|
||||
info_label = label;
|
||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||
#endif
|
||||
break;
|
||||
case ACTION_OK_DL_SHADER_PARAMETERS:
|
||||
info.type = MENU_SETTING_ACTION;
|
||||
@ -523,12 +526,14 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
dl_type = DISPLAYLIST_GENERIC;
|
||||
break;
|
||||
case ACTION_OK_DL_SHADER_PRESET:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
filebrowser_clear_type();
|
||||
info.type = type;
|
||||
info.directory_ptr = idx;
|
||||
info_path = settings->paths.directory_video_shader;
|
||||
info_label = label;
|
||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||
#endif
|
||||
break;
|
||||
case ACTION_OK_DL_CONTENT_LIST:
|
||||
info.type = FILE_TYPE_DIRECTORY;
|
||||
@ -1499,6 +1504,7 @@ static int generic_action_ok(const char *path,
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_LOAD_PRESET:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
{
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
flush_char = msg_hash_to_str(flush_id);
|
||||
@ -1506,8 +1512,10 @@ static int generic_action_ok(const char *path,
|
||||
video_shader_parse_type(action_path),
|
||||
action_path);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case ACTION_OK_LOAD_SHADER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
{
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
struct video_shader_pass *shader_pass = shader ? &shader->pass[menu->scratchpad.unsigned_var] : NULL;
|
||||
@ -1522,6 +1530,7 @@ static int generic_action_ok(const char *path,
|
||||
video_shader_resolve_parameters(NULL, shader);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case ACTION_OK_LOAD_STREAM_CONFIGFILE:
|
||||
{
|
||||
@ -1689,8 +1698,10 @@ default_action_ok_set(action_ok_cheat_file_load_append, ACTION_OK_LOAD_CHEA
|
||||
default_action_ok_set(action_ok_record_configfile_load, ACTION_OK_LOAD_RECORD_CONFIGFILE, MENU_ENUM_LABEL_RECORDING_SETTINGS)
|
||||
default_action_ok_set(action_ok_stream_configfile_load, ACTION_OK_LOAD_STREAM_CONFIGFILE, MENU_ENUM_LABEL_RECORDING_SETTINGS)
|
||||
default_action_ok_set(action_ok_remap_file_load, ACTION_OK_LOAD_REMAPPING_FILE, MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS )
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
default_action_ok_set(action_ok_shader_preset_load, ACTION_OK_LOAD_PRESET , MENU_ENUM_LABEL_SHADER_OPTIONS)
|
||||
default_action_ok_set(action_ok_shader_pass_load, ACTION_OK_LOAD_SHADER_PASS, MENU_ENUM_LABEL_SHADER_OPTIONS)
|
||||
#endif
|
||||
default_action_ok_set(action_ok_rgui_menu_theme_preset_load, ACTION_OK_LOAD_RGUI_MENU_THEME_PRESET, MENU_ENUM_LABEL_MENU_SETTINGS)
|
||||
|
||||
static int action_ok_file_load(const char *path,
|
||||
@ -2506,6 +2517,7 @@ static void menu_input_st_string_cb_enable_settings(void *userdata,
|
||||
menu_input_dialog_end();
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static void menu_input_st_string_cb_save_preset(void *userdata,
|
||||
const char *str)
|
||||
{
|
||||
@ -2540,6 +2552,7 @@ static void menu_input_st_string_cb_save_preset(void *userdata,
|
||||
|
||||
menu_input_dialog_end();
|
||||
}
|
||||
#endif
|
||||
|
||||
static void menu_input_st_string_cb_cheat_file_save_as(
|
||||
void *userdata, const char *str)
|
||||
@ -2579,10 +2592,12 @@ static int (funcname)(const char *path, const char *label_setting, unsigned type
|
||||
return 0; \
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
default_action_dialog_start(action_ok_shader_preset_save_as,
|
||||
msg_hash_to_str(MSG_INPUT_PRESET_FILENAME),
|
||||
(unsigned)idx,
|
||||
menu_input_st_string_cb_save_preset)
|
||||
#endif
|
||||
default_action_dialog_start(action_ok_enable_settings,
|
||||
msg_hash_to_str(MSG_INPUT_ENABLE_SETTINGS_PASSWORD),
|
||||
(unsigned)entry_idx,
|
||||
@ -2604,6 +2619,7 @@ default_action_dialog_start(action_ok_rename_entry,
|
||||
(unsigned)entry_idx,
|
||||
menu_input_st_string_cb_rename_entry)
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
enum
|
||||
{
|
||||
ACTION_OK_SHADER_PRESET_SAVE_CORE = 0,
|
||||
@ -2692,6 +2708,7 @@ static int action_ok_shader_preset_save_parent(const char *path,
|
||||
return generic_action_ok_shader_preset_save(path, label, type,
|
||||
idx, entry_idx, ACTION_OK_SHADER_PRESET_SAVE_PARENT);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int generic_action_ok_remap_file_operation(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx,
|
||||
@ -3730,6 +3747,7 @@ void cb_generic_download(retro_task_t *task,
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG:
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL:
|
||||
case MENU_ENUM_LABEL_CB_UPDATE_SHADERS_SLANG:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
{
|
||||
static char shaderdir[PATH_MAX_LENGTH] = {0};
|
||||
const char *dirname = NULL;
|
||||
@ -3751,6 +3769,7 @@ void cb_generic_download(retro_task_t *task,
|
||||
|
||||
dir_path = shaderdir;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CB_LAKKA_DOWNLOAD:
|
||||
dir_path = LAKKA_UPDATE_DIR;
|
||||
@ -3996,9 +4015,11 @@ default_action_ok_download(action_ok_lakka_download, MENU_ENUM_LABEL_CB_LAKKA_DO
|
||||
default_action_ok_download(action_ok_update_assets, MENU_ENUM_LABEL_CB_UPDATE_ASSETS)
|
||||
default_action_ok_download(action_ok_update_core_info_files, MENU_ENUM_LABEL_CB_UPDATE_CORE_INFO_FILES)
|
||||
default_action_ok_download(action_ok_update_overlays, MENU_ENUM_LABEL_CB_UPDATE_OVERLAYS)
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
default_action_ok_download(action_ok_update_shaders_cg, MENU_ENUM_LABEL_CB_UPDATE_SHADERS_CG)
|
||||
default_action_ok_download(action_ok_update_shaders_glsl, MENU_ENUM_LABEL_CB_UPDATE_SHADERS_GLSL)
|
||||
default_action_ok_download(action_ok_update_shaders_slang, MENU_ENUM_LABEL_CB_UPDATE_SHADERS_SLANG)
|
||||
#endif
|
||||
default_action_ok_download(action_ok_update_databases, MENU_ENUM_LABEL_CB_UPDATE_DATABASES)
|
||||
default_action_ok_download(action_ok_update_cheats, MENU_ENUM_LABEL_CB_UPDATE_CHEATS)
|
||||
default_action_ok_download(action_ok_update_autoconfig_profiles, MENU_ENUM_LABEL_CB_UPDATE_AUTOCONFIG_PROFILES)
|
||||
@ -4058,7 +4079,9 @@ default_action_ok_cmd_func(action_ok_resume_content, CMD_EVENT_RESUME)
|
||||
default_action_ok_cmd_func(action_ok_restart_content, CMD_EVENT_RESET)
|
||||
default_action_ok_cmd_func(action_ok_screenshot, CMD_EVENT_TAKE_SCREENSHOT)
|
||||
default_action_ok_cmd_func(action_ok_disk_cycle_tray_status, CMD_EVENT_DISK_EJECT_TOGGLE)
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
default_action_ok_cmd_func(action_ok_shader_apply_changes, CMD_EVENT_SHADERS_APPLY_CHANGES)
|
||||
#endif
|
||||
default_action_ok_cmd_func(action_ok_show_wimp, CMD_EVENT_UI_COMPANION_TOGGLE)
|
||||
|
||||
static int action_ok_set_core_association(const char *path,
|
||||
@ -4440,7 +4463,9 @@ default_action_ok_func(action_ok_goto_images, ACTION_OK_DL_IMAGES_LIST)
|
||||
default_action_ok_func(action_ok_cdrom_info_list, ACTION_OK_DL_CDROM_INFO_DETAIL_LIST)
|
||||
default_action_ok_func(action_ok_goto_video, ACTION_OK_DL_VIDEO_LIST)
|
||||
default_action_ok_func(action_ok_goto_music, ACTION_OK_DL_MUSIC_LIST)
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
default_action_ok_func(action_ok_shader_parameters, ACTION_OK_DL_SHADER_PARAMETERS)
|
||||
#endif
|
||||
default_action_ok_func(action_ok_parent_directory_push, ACTION_OK_DL_PARENT_DIRECTORY_PUSH)
|
||||
default_action_ok_func(action_ok_directory_push, ACTION_OK_DL_DIRECTORY_PUSH)
|
||||
default_action_ok_func(action_ok_configurations_list, ACTION_OK_DL_CONFIGURATIONS_LIST)
|
||||
@ -4494,7 +4519,9 @@ default_action_ok_func(action_ok_subsystem_add_load, ACTION_OK_DL_SUBSYSTEM_LOAD
|
||||
default_action_ok_func(action_ok_record_configfile, ACTION_OK_DL_RECORD_CONFIGFILE)
|
||||
default_action_ok_func(action_ok_stream_configfile, ACTION_OK_DL_STREAM_CONFIGFILE)
|
||||
default_action_ok_func(action_ok_remap_file, ACTION_OK_DL_REMAP_FILE)
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
default_action_ok_func(action_ok_shader_preset, ACTION_OK_DL_SHADER_PRESET)
|
||||
#endif
|
||||
default_action_ok_func(action_ok_push_generic_list, ACTION_OK_DL_GENERIC)
|
||||
default_action_ok_func(action_ok_audio_dsp_plugin, ACTION_OK_DL_AUDIO_DSP_PLUGIN)
|
||||
default_action_ok_func(action_ok_rpl_entry, ACTION_OK_DL_RPL_ENTRY)
|
||||
@ -4560,6 +4587,7 @@ static int action_ok_open_picker(const char *path,
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int action_ok_shader_pass(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -4572,6 +4600,7 @@ static int action_ok_shader_pass(const char *path,
|
||||
return generic_action_ok_displaylist_push(path, NULL, label, type, idx,
|
||||
entry_idx, ACTION_OK_DL_SHADER_PASS);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_ok_netplay_connect_room(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
@ -5986,10 +6015,14 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_OK(cbs, action_ok_help_load_content);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_preset);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_FILE_LOAD:
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_file);
|
||||
@ -6037,7 +6070,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
#endif
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PARAMETERS:
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_parameters);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_ACCOUNTS_LIST:
|
||||
BIND_ACTION_OK(cbs, action_ok_push_accounts_list);
|
||||
@ -6172,22 +6207,32 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_OK(cbs, action_ok_push_generic_list);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SHADER_APPLY_CHANGES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_apply_changes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_APPLY_CHANGES:
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_apply_changes);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_AS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_preset_save_as);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_GAME:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_preset_save_game);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_CORE:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_preset_save_core);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_preset_save_parent);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_FILE_SAVE_AS:
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_file_save_as);
|
||||
@ -6342,13 +6387,19 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_OK(cbs, action_ok_update_databases);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_UPDATE_GLSL_SHADERS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_update_shaders_glsl);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_UPDATE_CG_SHADERS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_update_shaders_cg);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_UPDATE_SLANG_SHADERS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_update_shaders_slang);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_UPDATE_CHEATS:
|
||||
BIND_ACTION_OK(cbs, action_ok_update_cheats);
|
||||
@ -6396,10 +6447,14 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_OK(cbs, action_ok_load_archive);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_preset);
|
||||
#endif
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_FILE_LOAD:
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_file);
|
||||
@ -6429,7 +6484,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
#endif
|
||||
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_PARAMETERS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_parameters);
|
||||
#endif
|
||||
break;
|
||||
case MENU_LABEL_ACCOUNTS_LIST:
|
||||
BIND_ACTION_OK(cbs, action_ok_push_accounts_list);
|
||||
@ -6447,13 +6504,17 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_OK(cbs, action_ok_file_load_detect_core);
|
||||
break;
|
||||
case MENU_LABEL_SHADER_APPLY_CHANGES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_apply_changes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_APPLY_CHANGES:
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_apply_changes);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PRESET_SAVE_AS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_preset_save_as);
|
||||
#endif
|
||||
break;
|
||||
case MENU_LABEL_CHEAT_FILE_SAVE_AS:
|
||||
BIND_ACTION_OK(cbs, action_ok_cheat_file_save_as);
|
||||
@ -6663,12 +6724,16 @@ static int menu_cbs_init_bind_ok_compare_type(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_OK(cbs, action_ok_remap_file_load);
|
||||
break;
|
||||
case FILE_TYPE_SHADER_PRESET:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
/* TODO/FIXME - handle scan case */
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_preset_load);
|
||||
#endif
|
||||
break;
|
||||
case FILE_TYPE_SHADER:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
/* TODO/FIXME - handle scan case */
|
||||
BIND_ACTION_OK(cbs, action_ok_shader_pass_load);
|
||||
#endif
|
||||
break;
|
||||
case FILE_TYPE_IMAGE:
|
||||
/* TODO/FIXME - handle scan case */
|
||||
|
@ -28,7 +28,9 @@
|
||||
#include "../menu_cbs.h"
|
||||
#include "../menu_input.h"
|
||||
#include "../menu_setting.h"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "../menu_shader.h"
|
||||
#endif
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../core.h"
|
||||
@ -51,6 +53,7 @@
|
||||
|
||||
extern struct key_desc key_descriptors[RARCH_MAX_KEYS];
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int generic_shader_action_parameter_right(struct video_shader_parameter *param,
|
||||
unsigned type, const char *label, bool wraparound)
|
||||
{
|
||||
@ -83,6 +86,7 @@ int shader_action_parameter_right(unsigned type, const char *label, bool wraparo
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
int generic_action_cheat_toggle(size_t idx, unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
@ -292,6 +296,7 @@ static int action_right_cheat_delete_all(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int action_right_shader_scale_pass(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
@ -338,6 +343,7 @@ static int action_right_shader_filter_default(unsigned type, const char *label,
|
||||
setting_get_type(setting), MENU_ACTION_RIGHT,
|
||||
wraparound);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_right_cheat_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
@ -353,6 +359,7 @@ static int action_right_cheat_num_passes(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int action_right_shader_num_passes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
@ -372,6 +379,7 @@ static int action_right_shader_num_passes(unsigned type, const char *label,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_right_video_gpu_index(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
@ -455,6 +463,7 @@ static int action_right_video_gpu_index(unsigned type, const char *label,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int action_right_shader_watch_for_changes(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
{
|
||||
@ -462,6 +471,7 @@ static int action_right_shader_watch_for_changes(unsigned type, const char *labe
|
||||
settings->bools.video_shader_watch_files = !settings->bools.video_shader_watch_files;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_right_video_resolution(unsigned type, const char *label,
|
||||
bool wraparound)
|
||||
@ -576,6 +586,7 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_RIGHT(cbs, audio_mixer_stream_volume_right);
|
||||
}
|
||||
#endif
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
{
|
||||
@ -586,6 +597,7 @@ static int menu_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
BIND_ACTION_RIGHT(cbs, shader_action_parameter_right);
|
||||
}
|
||||
#endif
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
{
|
||||
@ -735,19 +747,29 @@ static int menu_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *cbs,
|
||||
BIND_ACTION_RIGHT(cbs, action_right_cheat_delete_all);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_RIGHT(cbs, action_right_shader_scale_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_RIGHT(cbs, action_right_shader_filter_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_DEFAULT_FILTER:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_RIGHT(cbs, action_right_shader_filter_default);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SHADER_WATCH_FOR_CHANGES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_RIGHT(cbs, action_right_shader_watch_for_changes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_RIGHT(cbs, action_right_shader_num_passes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_NUM_PASSES:
|
||||
BIND_ACTION_RIGHT(cbs, action_right_cheat_num_passes);
|
||||
|
@ -122,6 +122,7 @@ static int action_select_core_setting(const char *path, const char *label, unsig
|
||||
return action_ok_core_option_dropdown_list(path, label, type, idx, 0);
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int shader_action_parameter_select(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
@ -133,6 +134,7 @@ static int shader_action_parameter_preset_select(const char *path, const char *l
|
||||
{
|
||||
return shader_action_parameter_right(type, label, true);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_select_cheat(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
@ -195,6 +197,7 @@ static int menu_cbs_init_bind_select_compare_type(
|
||||
{
|
||||
BIND_ACTION_SELECT(cbs, action_select_cheat);
|
||||
}
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
else if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
{
|
||||
@ -205,6 +208,7 @@ static int menu_cbs_init_bind_select_compare_type(
|
||||
{
|
||||
BIND_ACTION_SELECT(cbs, shader_action_parameter_preset_select);
|
||||
}
|
||||
#endif
|
||||
else if (type >= MENU_SETTINGS_INPUT_DESC_BEGIN
|
||||
&& type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
{
|
||||
|
@ -26,7 +26,9 @@
|
||||
#include "../menu_cbs.h"
|
||||
#include "../menu_input.h"
|
||||
#include "../menu_setting.h"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "../menu_shader.h"
|
||||
#endif
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../core.h"
|
||||
@ -130,6 +132,7 @@ static int action_start_input_desc(unsigned type, const char *label)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int action_start_shader_action_parameter(
|
||||
unsigned type, const char *label)
|
||||
{
|
||||
@ -178,6 +181,7 @@ static int action_start_shader_filter_pass(unsigned type, const char *label)
|
||||
unsigned pass = type - MENU_SETTINGS_SHADER_PASS_FILTER_0;
|
||||
return menu_shader_manager_clear_pass_filter(pass);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_start_netplay_mitm_server(unsigned type, const char *label)
|
||||
{
|
||||
@ -186,6 +190,7 @@ static int action_start_netplay_mitm_server(unsigned type, const char *label)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static int action_start_shader_watch_for_changes(unsigned type, const char *label)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -197,6 +202,7 @@ static int action_start_shader_num_passes(unsigned type, const char *label)
|
||||
{
|
||||
return menu_shader_manager_clear_num_passes();
|
||||
}
|
||||
#endif
|
||||
|
||||
static int action_start_cheat_num_passes(unsigned type, const char *label)
|
||||
{
|
||||
@ -278,19 +284,29 @@ static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs)
|
||||
BIND_ACTION_START(cbs, action_start_video_filter_file_load);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_START(cbs, action_start_shader_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_SCALE_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_START(cbs, action_start_shader_scale_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_FILTER_PASS:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_START(cbs, action_start_shader_filter_pass);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_SHADER_WATCH_FOR_CHANGES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_START(cbs, action_start_shader_watch_for_changes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADER_NUM_PASSES:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
BIND_ACTION_START(cbs, action_start_shader_num_passes);
|
||||
#endif
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEAT_NUM_PASSES:
|
||||
BIND_ACTION_START(cbs, action_start_cheat_num_passes);
|
||||
@ -315,6 +331,7 @@ static int menu_cbs_init_bind_start_compare_label(menu_file_list_cbs_t *cbs)
|
||||
static int menu_cbs_init_bind_start_compare_type(menu_file_list_cbs_t *cbs,
|
||||
unsigned type)
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (type >= MENU_SETTINGS_SHADER_PARAMETER_0
|
||||
&& type <= MENU_SETTINGS_SHADER_PARAMETER_LAST)
|
||||
{
|
||||
@ -325,7 +342,9 @@ static int menu_cbs_init_bind_start_compare_type(menu_file_list_cbs_t *cbs,
|
||||
{
|
||||
BIND_ACTION_START(cbs, action_start_shader_action_parameter);
|
||||
}
|
||||
else if (type >= MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN &&
|
||||
else
|
||||
#endif
|
||||
if (type >= MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_BEGIN &&
|
||||
type <= MENU_SETTINGS_LIBRETRO_PERF_COUNTERS_END)
|
||||
{
|
||||
BIND_ACTION_START(cbs, action_start_performance_counters_core);
|
||||
|
@ -69,7 +69,9 @@
|
||||
#include "menu_content.h"
|
||||
#include "menu_driver.h"
|
||||
#include "menu_entries.h"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "menu_shader.h"
|
||||
#endif
|
||||
#include "menu_networking.h"
|
||||
#include "widgets/menu_dialog.h"
|
||||
#include "widgets/menu_filebrowser.h"
|
||||
@ -1936,6 +1938,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
MENU_ENUM_LABEL_DISK_OPTIONS,
|
||||
MENU_SETTING_ACTION_CORE_DISK_OPTIONS, 0, 0);
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (video_shader_any_supported())
|
||||
{
|
||||
if (settings->bools.quick_menu_show_shaders && !settings->bools.kiosk_mode_enable)
|
||||
@ -1947,6 +1950,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((settings->bools.quick_menu_show_save_core_overrides ||
|
||||
settings->bools.quick_menu_show_save_game_overrides) &&
|
||||
@ -4593,6 +4597,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (video_shader_any_supported())
|
||||
{
|
||||
if (menu_displaylist_parse_settings_enum(list,
|
||||
@ -4600,6 +4605,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
PARSE_ONLY_BOOL, false) == 0)
|
||||
count++;
|
||||
}
|
||||
#endif
|
||||
|
||||
{
|
||||
menu_displaylist_build_info_t build_list[] = {
|
||||
@ -5620,6 +5626,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
break;
|
||||
case DISPLAYLIST_OPTIONS_SHADERS:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
{
|
||||
unsigned i;
|
||||
struct video_shader *shader = menu_shader_get();
|
||||
@ -5724,6 +5731,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (count == 0)
|
||||
menu_entries_append_enum(info->list,
|
||||
@ -7348,6 +7356,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
MENU_SETTING_ACTION, 0, 0))
|
||||
count++;
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (video_shader_is_supported(RARCH_SHADER_CG))
|
||||
{
|
||||
if (menu_entries_append_enum(info->list,
|
||||
@ -7378,6 +7387,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
count++;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -7623,6 +7633,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
case DISPLAYLIST_SHADER_PARAMETERS:
|
||||
case DISPLAYLIST_SHADER_PARAMETERS_PRESET:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
{
|
||||
video_shader_ctx_t shader_info;
|
||||
|
||||
@ -7642,6 +7653,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
count++;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (count == 0)
|
||||
menu_entries_append_enum(info->list,
|
||||
@ -8003,6 +8015,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
case DISPLAYLIST_SHADER_PASS:
|
||||
case DISPLAYLIST_SHADER_PRESET:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
{
|
||||
char new_exts[PATH_MAX_LENGTH];
|
||||
union string_list_elem_attr attr;
|
||||
@ -8050,6 +8063,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
string_list_free(str_list);
|
||||
use_filebrowser = true;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case DISPLAYLIST_IMAGES:
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
@ -49,7 +49,9 @@
|
||||
#include "menu_input.h"
|
||||
#include "menu_entries.h"
|
||||
#include "widgets/menu_dialog.h"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "menu_shader.h"
|
||||
#endif
|
||||
|
||||
#include "../config.def.h"
|
||||
#include "../content.h"
|
||||
@ -1880,7 +1882,9 @@ static bool menu_init(menu_handle_t *menu_data)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
menu_shader_manager_init();
|
||||
#endif
|
||||
|
||||
menu_disp_ca.allocated = 0;
|
||||
|
||||
@ -2413,7 +2417,9 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
return true;
|
||||
|
||||
playlist_free_cached();
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
menu_shader_manager_free();
|
||||
#endif
|
||||
|
||||
if (menu_driver_data)
|
||||
{
|
||||
|
@ -65,7 +65,9 @@
|
||||
#include "menu_driver.h"
|
||||
#include "menu_animation.h"
|
||||
#include "menu_input.h"
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "menu_shader.h"
|
||||
#endif
|
||||
#include "widgets/menu_input_dialog.h"
|
||||
#include "widgets/menu_input_bind_dialog.h"
|
||||
|
||||
@ -3695,6 +3697,7 @@ static void setting_get_string_representation_uint_ozone_menu_color_theme(
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#if defined(HAVE_XMB) && defined(HAVE_SHADERPIPELINE)
|
||||
static void setting_get_string_representation_uint_xmb_shader_pipeline(
|
||||
rarch_setting_t *setting,
|
||||
@ -3741,6 +3744,7 @@ static void setting_get_string_representation_uint_xmb_shader_pipeline(
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static void setting_get_string_representation_uint_video_monitor_index(rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
@ -5687,6 +5691,7 @@ void general_write_handler(rarch_setting_t *setting)
|
||||
switch (setting->enum_idx)
|
||||
{
|
||||
case MENU_ENUM_LABEL_VIDEO_SHADERS_ENABLE:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
{
|
||||
if (*setting->value.target.boolean)
|
||||
{
|
||||
@ -5708,6 +5713,8 @@ void general_write_handler(rarch_setting_t *setting)
|
||||
settings->bools.video_shader_enable = false;
|
||||
}
|
||||
}
|
||||
/* TODO/FIXME - fallthrough here intentional? */
|
||||
#endif
|
||||
case MENU_ENUM_LABEL_VIDEO_THREADED:
|
||||
{
|
||||
if (*setting->value.target.boolean)
|
||||
@ -11782,6 +11789,7 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
if (video_shader_any_supported())
|
||||
{
|
||||
@ -11802,6 +11810,7 @@ static bool setting_append_list(
|
||||
menu_settings_list_current_add_range(list, list_info, 0, XMB_SHADER_PIPELINE_LAST-1, 1, true, true);
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
CONFIG_UINT(
|
||||
@ -13047,6 +13056,7 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (video_shader_any_supported())
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
@ -13064,6 +13074,7 @@ static bool setting_append_list(
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
}
|
||||
#endif
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
@ -14525,6 +14536,7 @@ static bool setting_append_list(
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
settings->paths.directory_video_shader,
|
||||
@ -14539,6 +14551,7 @@ static bool setting_append_list(
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
#endif
|
||||
|
||||
if (string_is_not_equal(settings->arrays.record_driver, "null"))
|
||||
{
|
||||
|
@ -378,6 +378,15 @@ elif [ "$HAVE_OPENGLES" != 'no' ] && [ "$HAVE_OPENGLES3" != 'yes' ]; then
|
||||
HAVE_OPENGL_CORE='no'
|
||||
fi
|
||||
|
||||
if [ "$HAVE_OPENGL" != 'no' ] || [ "$HAVE_OPENGLES" != 'no' ] || [ "$HAVE_OPENGLES3" != 'no' ]; then
|
||||
HAVE_GLSL='yes'
|
||||
else
|
||||
if [ "$HAVE_GLSL" != "no" ]; then
|
||||
die : 'Notice: glsl disabled.'
|
||||
HAVE_GLSL='no'
|
||||
fi
|
||||
fi
|
||||
|
||||
check_enabled ZLIB BUILTINZLIB 'builtin zlib' 'zlib is' true
|
||||
|
||||
check_val '' ZLIB '-lz' '' zlib '' '' false
|
||||
|
16
retroarch.c
16
retroarch.c
@ -773,10 +773,12 @@ static settings_t *configuration_settings = NULL;
|
||||
static enum rarch_core_type current_core_type = CORE_TYPE_PLAIN;
|
||||
static enum rarch_core_type explicit_current_core_type = CORE_TYPE_PLAIN;
|
||||
static char error_string[255] = {0};
|
||||
static char runtime_shader_preset[255] = {0};
|
||||
|
||||
static bool has_set_username = false;
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static char runtime_shader_preset[255] = {0};
|
||||
static bool shader_presets_need_reload = true;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_THREAD_STORAGE
|
||||
static sthread_tls_t rarch_tls;
|
||||
@ -19376,18 +19378,23 @@ void retroarch_unset_switching_display_mode(void)
|
||||
/* set a runtime shader preset without overwriting the settings value */
|
||||
void retroarch_set_shader_preset(const char* preset)
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (!string_is_empty(preset))
|
||||
strlcpy(runtime_shader_preset, preset, sizeof(runtime_shader_preset));
|
||||
else
|
||||
runtime_shader_preset[0] = '\0';
|
||||
#endif
|
||||
}
|
||||
|
||||
/* unset a runtime shader preset */
|
||||
void retroarch_unset_shader_preset(void)
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
runtime_shader_preset[0] = '\0';
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
static bool retroarch_load_shader_preset_internal(
|
||||
const char *shader_directory,
|
||||
const char *core_name,
|
||||
@ -19507,15 +19514,19 @@ success:
|
||||
free(shader_directory);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
void retroarch_shader_presets_set_need_reload(void)
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
shader_presets_need_reload = true;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* get the name of the current shader preset */
|
||||
char* retroarch_get_shader_preset(void)
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
settings_t *settings = configuration_settings;
|
||||
if (!settings->bools.video_shader_enable)
|
||||
return NULL;
|
||||
@ -19531,6 +19542,7 @@ char* retroarch_get_shader_preset(void)
|
||||
|
||||
if (!string_is_empty(settings->paths.path_shader))
|
||||
return settings->paths.path_shader;
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -20685,6 +20697,7 @@ static enum runloop_state runloop_check_state(
|
||||
RARCH_CHEAT_INDEX_MINUS, CMD_EVENT_CHEAT_INDEX_MINUS,
|
||||
RARCH_CHEAT_TOGGLE, CMD_EVENT_CHEAT_TOGGLE);
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (settings->bools.video_shader_watch_files)
|
||||
{
|
||||
static rarch_timer_t timer = {0};
|
||||
@ -20724,6 +20737,7 @@ static enum runloop_state runloop_check_state(
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return RUNLOOP_STATE_ITERATE;
|
||||
}
|
||||
|
@ -76,7 +76,9 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
#include "../menu/menu_shader.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
#include "../cheevos-new/cheevos.h"
|
||||
@ -627,7 +629,9 @@ static bool content_load(content_ctx_info_t *info)
|
||||
content_clear_subsystem();
|
||||
}
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
menu_shader_manager_init();
|
||||
#endif
|
||||
|
||||
command_event(CMD_EVENT_HISTORY_INIT, NULL);
|
||||
command_event(CMD_EVENT_RESUME, NULL);
|
||||
|
@ -41,7 +41,6 @@
|
||||
#include "ui_qt_load_core_window.h"
|
||||
#include "ui_qt_themes.h"
|
||||
#include "gridview.h"
|
||||
#include "shaderparamsdialog.h"
|
||||
#include "coreoptionsdialog.h"
|
||||
#include "filedropwidget.h"
|
||||
#include "coreinfodialog.h"
|
||||
@ -52,6 +51,10 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../../version.h"
|
||||
#include "../../../verbosity.h"
|
||||
#include "../../../retroarch.h"
|
||||
@ -86,6 +89,7 @@ extern "C" {
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "shaderparamsdialog.h"
|
||||
#include "../../../AUTHORS.h"
|
||||
|
||||
#define TIMER_MSEC 1000 /* periodic timer for gathering statistics */
|
||||
@ -327,7 +331,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
,m_allPlaylistsGridMaxCount(0)
|
||||
,m_playlistEntryDialog(NULL)
|
||||
,m_statusMessageElapsedTimer()
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
,m_shaderParamsDialog(new ShaderParamsDialog())
|
||||
#endif
|
||||
,m_coreOptionsDialog(new CoreOptionsDialog())
|
||||
,m_networkManager(new QNetworkAccessManager(this))
|
||||
,m_updateProgressDialog(new QProgressDialog())
|
||||
@ -672,7 +678,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
connect(this, SIGNAL(gotLogMessage(const QString&)), this, SLOT(onGotLogMessage(const QString&)), Qt::AutoConnection);
|
||||
connect(this, SIGNAL(gotStatusMessage(QString,unsigned,unsigned,bool)), this, SLOT(onGotStatusMessage(QString,unsigned,unsigned,bool)), Qt::AutoConnection);
|
||||
connect(this, SIGNAL(gotReloadPlaylists()), this, SLOT(onGotReloadPlaylists()), Qt::AutoConnection);
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
connect(this, SIGNAL(gotReloadShaderParams()), this, SLOT(onGotReloadShaderParams()), Qt::AutoConnection);
|
||||
#endif
|
||||
connect(this, SIGNAL(gotReloadCoreOptions()), this, SLOT(onGotReloadCoreOptions()), Qt::AutoConnection);
|
||||
|
||||
/* these are always queued */
|
||||
@ -1109,17 +1117,29 @@ void MainWindow::onGotStatusMessage(QString msg, unsigned priority, unsigned dur
|
||||
|
||||
void MainWindow::deferReloadShaderParams()
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
emit gotReloadShaderParams();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::onShaderParamsClicked()
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (!m_shaderParamsDialog)
|
||||
return;
|
||||
|
||||
m_shaderParamsDialog->show();
|
||||
|
||||
onGotReloadShaderParams();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::onGotReloadShaderParams()
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
if (m_shaderParamsDialog && m_shaderParamsDialog->isVisible())
|
||||
m_shaderParamsDialog->reload();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::onCoreOptionsClicked()
|
||||
@ -1132,12 +1152,6 @@ void MainWindow::onCoreOptionsClicked()
|
||||
onGotReloadCoreOptions();
|
||||
}
|
||||
|
||||
void MainWindow::onGotReloadShaderParams()
|
||||
{
|
||||
if (m_shaderParamsDialog && m_shaderParamsDialog->isVisible())
|
||||
m_shaderParamsDialog->reload();
|
||||
}
|
||||
|
||||
void MainWindow::onGotReloadCoreOptions()
|
||||
{
|
||||
if (m_coreOptionsDialog && m_coreOptionsDialog->isVisible())
|
||||
|
@ -351,7 +351,9 @@ static void* ui_companion_qt_init(void)
|
||||
QObject::connect(viewClosedDocksMenu, SIGNAL(aboutToShow()), mainwindow, SLOT(onViewClosedDocksAboutToShow()));
|
||||
|
||||
viewMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_CORE_OPTIONS), mainwindow, SLOT(onCoreOptionsClicked()));
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
viewMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SHADER_OPTIONS), mainwindow, SLOT(onShaderParamsClicked()));
|
||||
#endif
|
||||
|
||||
viewMenu->addSeparator();
|
||||
viewMenu->addAction(msg_hash_to_str(MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_ICONS), mainwindow, SLOT(onIconViewClicked()));
|
||||
@ -690,8 +692,10 @@ static void ui_companion_qt_event_command(void *data, enum event_command cmd)
|
||||
{
|
||||
case CMD_EVENT_SHADERS_APPLY_CHANGES:
|
||||
case CMD_EVENT_SHADER_PRESET_LOADED:
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
RARCH_LOG("[Qt]: Reloading shader parameters.\n");
|
||||
win_handle->qtWindow->deferReloadShaderParams();
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
@ -49,9 +49,14 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include <retro_assert.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <queues/task_queue.h>
|
||||
|
||||
#include "../ui_companion_driver.h"
|
||||
#include "../../retroarch.h"
|
||||
|
||||
@ -97,7 +102,9 @@ class MainWindow;
|
||||
class ThumbnailWidget;
|
||||
class ThumbnailLabel;
|
||||
class GridView;
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
class ShaderParamsDialog;
|
||||
#endif
|
||||
class CoreOptionsDialog;
|
||||
class CoreInfoDialog;
|
||||
class PlaylistEntryDialog;
|
||||
@ -611,7 +618,9 @@ private:
|
||||
int m_allPlaylistsGridMaxCount;
|
||||
PlaylistEntryDialog *m_playlistEntryDialog;
|
||||
QElapsedTimer m_statusMessageElapsedTimer;
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
QPointer<ShaderParamsDialog> m_shaderParamsDialog;
|
||||
#endif
|
||||
QPointer<CoreOptionsDialog> m_coreOptionsDialog;
|
||||
QNetworkAccessManager *m_networkManager;
|
||||
|
||||
@ -653,7 +662,9 @@ protected:
|
||||
|
||||
Q_DECLARE_METATYPE(ThumbnailWidget)
|
||||
Q_DECLARE_METATYPE(QPointer<ThumbnailWidget>)
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
Q_DECLARE_METATYPE(struct video_shader_parameter*)
|
||||
#endif
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user