From f58a038a5f72d203403ece665cb4d29ac5da1489 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 5 Apr 2013 23:58:30 +0200 Subject: [PATCH] (PS3) Remove fixed shader slots --- frontend/menu/rmenu.c | 78 ++----------------------------------------- frontend/menu/rmenu.h | 2 -- 2 files changed, 2 insertions(+), 78 deletions(-) diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index 29a1422900..4c12c6d1cd 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -304,12 +304,6 @@ static void populate_setting_item(void *data, unsigned input) strlcpy(current_item->setting_text, fname, sizeof(current_item->setting_text)); strlcpy(current_item->comment, "INFO - Select a shader as [Shader #1].", sizeof(current_item->comment)); break; - case SETTING_SHADER_2: - fill_pathname_base(fname, g_settings.video.second_pass_shader, sizeof(fname)); - strlcpy(current_item->text, "Shader #2", sizeof(current_item->text)); - strlcpy(current_item->setting_text, fname, sizeof(current_item->setting_text)); - strlcpy(current_item->comment, "INFO - Select a shader as [Shader #2].", sizeof(current_item->comment)); - break; #endif case SETTING_EMU_SKIN: fill_pathname_base(fname, g_extern.console.menu_texture_path, sizeof(fname)); @@ -357,21 +351,6 @@ static void populate_setting_item(void *data, unsigned input) } break; #ifdef HAVE_FBO - case SETTING_HW_TEXTURE_FILTER_2: - strlcpy(current_item->text, "Hardware filtering #2", sizeof(current_item->text)); - if (g_settings.video.second_pass_smooth) - { - strlcpy(current_item->setting_text, "Bilinear", sizeof(current_item->setting_text)); - strlcpy(current_item->comment, "INFO - Hardware filtering #2 is set to Bilinear.", - sizeof(current_item->comment)); - } - else - { - strlcpy(current_item->setting_text, "Point", sizeof(current_item->setting_text)); - strlcpy(current_item->comment, "INFO - Hardware filtering #2 is set to Point.", - sizeof(current_item->comment)); - } - break; case SETTING_SCALE_ENABLED: strlcpy(current_item->text, "FBO Mode", sizeof(current_item->text)); if (g_settings.video.render_to_texture) @@ -1104,22 +1083,6 @@ static int select_file(uint8_t menu_type, uint64_t input) g_extern.lifecycle_mode_state &= ~(1ULL << MODE_LOAD_FIRST_SHADER); } - - if (g_extern.lifecycle_mode_state & (1ULL << MODE_LOAD_SECOND_SHADER)) - { - strlcpy(g_settings.video.second_pass_shader, path, sizeof(g_settings.video.second_pass_shader)); - - if (g_settings.video.shader_type != RARCH_SHADER_NONE) - { - driver.video->set_shader(driver.video_data, (enum rarch_shader_type)g_settings.video.shader_type, path, RARCH_SHADER_INDEX_PASS1); - if (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) - msg_queue_push(g_extern.msg_queue, "INFO - Shader successfully loaded.", 1, 180); - } - else - RARCH_ERR("Shaders are unsupported on this platform.\n"); - - g_extern.lifecycle_mode_state &= ~(1ULL << MODE_LOAD_SECOND_SHADER); - } break; case PRESET_CHOICE: strlcpy(g_extern.file_state.cgp_path, path, sizeof(g_extern.file_state.cgp_path)); @@ -1416,15 +1379,15 @@ static bool osk_callback_enter_filename(void *data) snprintf(filepath, sizeof(filepath), "%s/%s.cgp", default_paths.cgp_dir, tmp_str); RARCH_LOG("[osk_callback_enter_filename]: filepath is: %s.\n", filepath); + /* struct gl_cg_cgp_info current_settings; memset(¤t_settings, 0, sizeof(current_settings)); current_settings.shader[0] = g_settings.video.cg_shader_path; - current_settings.shader[1] = g_settings.video.second_pass_shader; current_settings.filter_linear[0] = g_settings.video.smooth; - current_settings.filter_linear[1] = g_settings.video.second_pass_smooth; current_settings.render_to_texture = true; current_settings.fbo_scale = g_settings.video.fbo.scale_x; //fbo.scale_x and y are the same anyway gl_cg_save_cgp(filepath, ¤t_settings); + */ break; case INPUT_PRESET_FILE: snprintf(filepath, sizeof(filepath), "%s/%s.cfg", default_paths.input_presets_dir, tmp_str); @@ -1551,26 +1514,6 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t RARCH_ERR("Shaders are unsupported on this platform.\n"); } break; - case SETTING_SHADER_2: - if ((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B))) - { - menu_stack_push(SHADER_CHOICE); - filebrowser_set_root_and_ext(filebrowser, EXT_SHADERS, default_paths.shader_dir); - g_extern.lifecycle_mode_state |= (1ULL << MODE_LOAD_SECOND_SHADER); - } - if (input & (1ULL << RMENU_DEVICE_NAV_START)) - { - strlcpy(g_settings.video.second_pass_shader, default_paths.shader_file, sizeof(g_settings.video.second_pass_shader)); - if (g_settings.video.shader_type != RARCH_SHADER_NONE) - { - driver.video->set_shader(driver.video_data, (enum rarch_shader_type)g_settings.video.shader_type, NULL, RARCH_SHADER_INDEX_PASS1); - if (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) - msg_queue_push(g_extern.msg_queue, "INFO - Shader successfully loaded.", 1, 180); - } - else - RARCH_ERR("Shaders are unsupported on this platform.\n"); - } - break; case SETTING_EMU_SKIN: if ((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B))) { @@ -1671,22 +1614,6 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t } break; #ifdef HAVE_FBO - case SETTING_HW_TEXTURE_FILTER_2: - if ((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B))) - { - settings_set(1ULL << S_HW_TEXTURE_FILTER_2); - - if (driver.video_poke->set_filtering) - driver.video_poke->set_filtering(driver.video_data, 2, g_settings.video.second_pass_smooth); - } - if (input & (1ULL << RMENU_DEVICE_NAV_START)) - { - settings_set(1ULL << S_DEF_HW_TEXTURE_FILTER_2); - - if (driver.video_poke->set_filtering) - driver.video_poke->set_filtering(driver.video_data, 2, g_settings.video.second_pass_smooth); - } - break; case SETTING_SCALE_ENABLED: if ((input & (1ULL << RMENU_DEVICE_NAV_LEFT)) || (input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B))) { @@ -1884,7 +1811,6 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t { #if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) set_setting_action(NULL, SETTING_SHADER, 1ULL << RMENU_DEVICE_NAV_START); - set_setting_action(NULL, SETTING_SHADER_2, 1ULL << RMENU_DEVICE_NAV_START); #endif } break; diff --git a/frontend/menu/rmenu.h b/frontend/menu/rmenu.h index 5836e9d9e5..a1a3455fc0 100644 --- a/frontend/menu/rmenu.h +++ b/frontend/menu/rmenu.h @@ -99,13 +99,11 @@ enum #if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) SETTING_SHADER_PRESETS, SETTING_SHADER, - SETTING_SHADER_2, #endif SETTING_FONT_SIZE, SETTING_KEEP_ASPECT_RATIO, SETTING_HW_TEXTURE_FILTER, #ifdef HAVE_FBO - SETTING_HW_TEXTURE_FILTER_2, SETTING_SCALE_ENABLED, SETTING_SCALE_FACTOR, #endif