diff --git a/android/phoenix/res/values/array.xml b/android/phoenix/res/values/array.xml index 674439d631..c6fcc02043 100644 --- a/android/phoenix/res/values/array.xml +++ b/android/phoenix/res/values/array.xml @@ -40,22 +40,6 @@ 1 - - 1.0x - 2.0x - 3.0x - 4.0x - 5.0x - - - - 1.0 - 2.0 - 3.0 - 4.0 - 5.0 - - UNBOUND SOFT LEFT diff --git a/android/phoenix/res/xml/prefs.xml b/android/phoenix/res/xml/prefs.xml index 949bba3ea1..1ddf627121 100644 --- a/android/phoenix/res/xml/prefs.xml +++ b/android/phoenix/res/xml/prefs.xml @@ -132,39 +132,6 @@ android:targetPackage="org.retroarch" /> - - - - - - - - - - - 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)); @@ -356,41 +350,6 @@ static void populate_setting_item(void *data, unsigned input) sizeof(current_item->comment)); } 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) - { - strlcpy(current_item->setting_text, "ON", sizeof(current_item->setting_text)); - strlcpy(current_item->comment, "INFO - FBO Mode is set to 'ON' - 2x shaders will look much\nbetter, and you can select a shader for [Shader #2].", sizeof(current_item->comment)); - } - else - { - strlcpy(current_item->setting_text, "OFF", sizeof(current_item->setting_text)); - strlcpy(current_item->comment, "INFO - FBO Mode is set to 'OFF'.", sizeof(current_item->comment)); - } - break; - case SETTING_SCALE_FACTOR: - strlcpy(current_item->text, "Scaling Factor", sizeof(current_item->text)); - snprintf(current_item->setting_text, sizeof(current_item->setting_text), "%fx (X) / %fx (Y)", g_settings.video.fbo.scale_x, g_settings.video.fbo.scale_y); - snprintf(current_item->comment, sizeof(current_item->comment), "INFO - Scaling Factor is set to: '%fx (X) / %fx (Y)'.", g_settings.video.fbo.scale_x, g_settings.video.fbo.scale_y); - break; -#endif #ifdef _XBOX1 case SETTING_FLICKER_FILTER: strlcpy(current_item->text, "Flicker Filter", sizeof(current_item->text)); @@ -722,13 +681,6 @@ static void populate_setting_item(void *data, unsigned input) strlcpy(current_item->setting_text, rotation_lut[g_extern.console.screen.orientation], sizeof(current_item->setting_text)); strlcpy(current_item->comment, "Change orientation of the screen.", sizeof(current_item->comment)); break; -#ifdef HAVE_FBO - case INGAME_MENU_SCALE_FACTOR: - strlcpy(current_item->text, "Scaling Factor", sizeof(current_item->text)); - snprintf(current_item->setting_text, sizeof(current_item->setting_text), "%fx (X) / %fx (Y)", g_settings.video.fbo.scale_x, g_settings.video.fbo.scale_y); - strlcpy(current_item->comment, "Change scaling of the screen.", sizeof(current_item->comment)); - break; -#endif case INGAME_MENU_RESIZE_MODE: strlcpy(current_item->text, "Resize Mode", sizeof(current_item->text)); strlcpy(current_item->setting_text, "", sizeof(current_item->setting_text)); @@ -1104,22 +1056,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)); @@ -1415,16 +1351,7 @@ static bool osk_callback_enter_filename(void *data) case SHADER_PRESET_FILE: 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); + /* TODO - stub */ break; case INPUT_PRESET_FILE: snprintf(filepath, sizeof(filepath), "%s/%s.cfg", default_paths.input_presets_dir, tmp_str); @@ -1551,26 +1478,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))) { @@ -1670,84 +1577,6 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t driver.video_poke->set_filtering(driver.video_data, 1, g_settings.video.smooth); } 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))) - { - settings_set(1ULL << S_SCALE_ENABLED); - - if (driver.video_poke->set_fbo_state) - { - if (g_settings.video.render_to_texture) - driver.video_poke->set_fbo_state(driver.video_data, FBO_INIT); - else - driver.video_poke->set_fbo_state(driver.video_data, FBO_DEINIT); - } - } - if (input & (1ULL << RMENU_DEVICE_NAV_START)) - { - settings_set(1ULL << S_DEF_SCALE_ENABLED); - - if (driver.video_poke->set_fbo_state) - driver.video_poke->set_fbo_state(driver.video_data, FBO_REINIT); - } - break; - case SETTING_SCALE_FACTOR: - case INGAME_MENU_SCALE_FACTOR: - if (input & (1ULL << RMENU_DEVICE_NAV_LEFT)) - { - if (g_settings.video.render_to_texture) - { - bool should_decrement = g_settings.video.fbo.scale_x > MIN_SCALING_FACTOR; - - if (should_decrement) - { - settings_set(1ULL << S_SCALE_FACTOR_DECREMENT); - - if (driver.video_poke->set_fbo_state) - driver.video_poke->set_fbo_state(driver.video_data, FBO_REINIT); - } - } - } - if ((input & (1ULL << RMENU_DEVICE_NAV_RIGHT)) || (input & (1ULL << RMENU_DEVICE_NAV_B))) - { - if (g_settings.video.render_to_texture) - { - bool should_increment = g_settings.video.fbo.scale_x < MAX_SCALING_FACTOR; - if (should_increment) - { - settings_set(1ULL << S_SCALE_FACTOR_INCREMENT); - - if (driver.video_poke->set_fbo_state) - driver.video_poke->set_fbo_state(driver.video_data, FBO_REINIT); - } - } - } - if (input & (1ULL << RMENU_DEVICE_NAV_START)) - { - settings_set(1ULL << S_DEF_SCALE_FACTOR); - - if (driver.video_poke->set_fbo_state) - driver.video_poke->set_fbo_state(driver.video_data, FBO_REINIT); - } - break; -#endif #ifdef _XBOX1 case SETTING_FLICKER_FILTER: if (input & (1ULL << RMENU_DEVICE_NAV_LEFT)) @@ -1884,7 +1713,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..669d6d6104 100644 --- a/frontend/menu/rmenu.h +++ b/frontend/menu/rmenu.h @@ -99,16 +99,10 @@ 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 #ifdef _XBOX1 SETTING_FLICKER_FILTER, SETTING_SOFT_DISPLAY_FILTER, diff --git a/frontend/menu/rmenu_xui.cpp b/frontend/menu/rmenu_xui.cpp index 5fec0b523d..aa1ecf8c21 100644 --- a/frontend/menu/rmenu_xui.cpp +++ b/frontend/menu/rmenu_xui.cpp @@ -51,9 +51,7 @@ enum { S_LBL_ASPECT_RATIO = 0, S_LBL_SHADER, - S_LBL_SHADER_2, S_LBL_RARCH_VERSION, - S_LBL_SCALE_FACTOR, S_LBL_ROTATION, S_LBL_LOAD_STATE_SLOT, S_LBL_SAVE_STATE_SLOT, @@ -288,15 +286,9 @@ static void menu_settings_create_menu_item_label_w(wchar_t *strwbuf, unsigned se case S_LBL_SHADER: snprintf(str, size, "Shader #1: %s", g_settings.video.cg_shader_path); break; - case S_LBL_SHADER_2: - snprintf(str, size, "Shader #2: %s", g_settings.video.second_pass_shader); - break; case S_LBL_RARCH_VERSION: snprintf(str, size, "RetroArch %s", PACKAGE_VERSION); break; - case S_LBL_SCALE_FACTOR: - snprintf(str, size, "Scale Factor: %f (X) / %f (Y)", g_settings.video.fbo.scale_x, g_settings.video.fbo.scale_y); - break; case S_LBL_ROTATION: snprintf(str, size, "Rotation: %s", rotation_lut[g_extern.console.screen.orientation]); break; @@ -692,14 +684,8 @@ HRESULT CRetroArchSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled) m_settingslist.SetText(SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma correction: ON" : L"Gamma correction: OFF"); m_settingslist.SetText(SETTING_AUDIO_RESAMPLER_TYPE, strstr(g_settings.audio.resampler, "sinc") ? L"Audio Resampler: Sinc" : L"Audio Resampler: Hermite"); m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Hardware filtering shader #1: Linear interpolation" : L"Hardware filtering shader #1: Point filtering"); - m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER_2, g_settings.video.second_pass_smooth ? L"Hardware filtering shader #2: Linear interpolation" : L"Hardware filtering shader #2: Point filtering"); - m_settingslist.SetText(SETTING_SCALE_ENABLED, g_settings.video.render_to_texture ? L"Custom Scaling/Dual Shaders: ON" : L"Custom Scaling/Dual Shaders: OFF"); menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_SHADER, sizeof(strw_buffer)); m_settingslist.SetText(SETTING_SHADER, strw_buffer); - menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_SHADER_2, sizeof(strw_buffer)); - m_settingslist.SetText(SETTING_SHADER_2, strw_buffer); - menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_SCALE_FACTOR, sizeof(strw_buffer)); - m_settingslist.SetText(SETTING_SCALE_FACTOR, strw_buffer); menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_REWIND_GRANULARITY, sizeof(strw_buffer)); m_settingslist.SetText(SETTING_EMU_REWIND_GRANULARITY, strw_buffer); m_settingslist.SetText(SETTING_ENABLE_SRAM_PATH, (g_extern.lifecycle_mode_state & (1ULL << MODE_LOAD_GAME_SRAM_DIR_ENABLE)) ? L"SRAM Path Enable: ON" : L"SRAM Path Enable: OFF"); @@ -794,20 +780,6 @@ HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled hCur = app.hShaderBrowser; - if (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) - msg_queue_push(g_extern.msg_queue, - "INFO - Select a shader from the menu.", 1, 180); - - NavigateForward(app.hShaderBrowser); - break; - case SETTING_SHADER_2: - g_extern.lifecycle_mode_state |= (1ULL << MODE_LOAD_SECOND_SHADER); - hr = XuiSceneCreate((g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_HD)) ? L"file://game:/media/hd/" : L"file://game:/media/sd/", L"rarch_shader_browser.xur", NULL, &app.hShaderBrowser); - if (hr < 0) - RARCH_ERR("Failed to load scene.\n"); - - hCur = app.hShaderBrowser; - if (g_extern.lifecycle_mode_state & (1ULL << MODE_INFO_DRAW)) msg_queue_push(g_extern.msg_queue, "INFO - Select a shader from the menu.", 1, 180); @@ -818,22 +790,6 @@ HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled g_settings.video.smooth = !g_settings.video.smooth; m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Hardware filtering shader #1: Linear interpolation" : L"Hardware filtering shader #1: Point filtering"); break; - case SETTING_HW_TEXTURE_FILTER_2: - g_settings.video.second_pass_smooth = !g_settings.video.second_pass_smooth; - m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER_2, g_settings.video.second_pass_smooth ? L"Hardware filtering shader #2: Linear interpolation" : L"Hardware filtering shader #2: Point filtering"); - break; - case SETTING_SCALE_ENABLED: - g_settings.video.render_to_texture = !g_settings.video.render_to_texture; - m_settingslist.SetText(SETTING_SCALE_ENABLED, g_settings.video.render_to_texture ? L"Custom Scaling/Dual Shaders: ON" : L"Custom Scaling/Dual Shaders: OFF"); - - if (driver.video_poke->set_fbo_state) - { - if(g_settings.video.render_to_texture) - driver.video_poke->set_fbo_state(driver.video_data, FBO_INIT); - else - driver.video_poke->set_fbo_state(driver.video_data, FBO_DEINIT); - } - break; } } @@ -919,46 +875,10 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro driver.video->restart(); m_settingslist.SetText(SETTING_GAMMA_CORRECTION_ENABLED, g_extern.console.screen.gamma_correction ? L"Gamma correction: ON" : L"Gamma correction: OFF"); break; - case SETTING_SCALE_FACTOR: - if (driver.video_poke->get_fbo_state) - { - if(driver.video_poke->get_fbo_state(driver.video_data)) - { - if((g_settings.video.fbo.scale_x > MIN_SCALING_FACTOR)) - { - settings_set(1ULL << S_SCALE_FACTOR_DECREMENT); - - if (driver.video_poke->set_fbo_state) - { - if(g_settings.video.render_to_texture) - driver.video_poke->set_fbo_state(driver.video_data, FBO_REINIT); - } - - menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_SCALE_FACTOR, sizeof(strw_buffer)); - m_settingslist.SetText(SETTING_SCALE_FACTOR, strw_buffer); - } - } - } - break; case SETTING_HW_TEXTURE_FILTER: g_settings.video.smooth = !g_settings.video.smooth; m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Hardware filtering shader #1: Linear interpolation" : L"Hardware filtering shader #1: Point filtering"); break; - case SETTING_HW_TEXTURE_FILTER_2: - g_settings.video.second_pass_smooth = !g_settings.video.second_pass_smooth; - m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER_2, g_settings.video.second_pass_smooth ? L"Hardware filtering shader #2: Linear interpolation" : L"Hardware filtering shader #2: Point filtering"); - break; - case SETTING_SCALE_ENABLED: - g_settings.video.render_to_texture = !g_settings.video.render_to_texture; - m_settingslist.SetText(SETTING_SCALE_ENABLED, g_settings.video.render_to_texture ? L"Custom Scaling/Dual Shaders: ON" : L"Custom Scaling/Dual Shaders: OFF"); - if (driver.video_poke->set_fbo_state) - { - if(g_settings.video.render_to_texture) - driver.video_poke->set_fbo_state(driver.video_data, FBO_INIT); - else - driver.video_poke->set_fbo_state(driver.video_data, FBO_DEINIT); - } - break; default: break; } @@ -1031,43 +951,10 @@ HRESULT CRetroArchSettings::OnControlNavigate(XUIMessageControlNavigate *pContro g_extern.lifecycle_mode_state |= (1ULL << MODE_LOAD_GAME_STATE_DIR_ENABLE); m_settingslist.SetText(SETTING_ENABLE_STATE_PATH, (g_extern.lifecycle_mode_state & (1ULL << MODE_LOAD_GAME_STATE_DIR_ENABLE)) ? L"Savestate Path Enable: ON" : L"Savestate Path Enable: OFF"); break; - case SETTING_SCALE_FACTOR: - if (driver.video_poke->get_fbo_state) - { - if(driver.video_poke->get_fbo_state(driver.video_data)) - { - if((g_settings.video.fbo.scale_x < MAX_SCALING_FACTOR)) - { - settings_set(1ULL << S_SCALE_FACTOR_INCREMENT); - - if (driver.video_poke->set_fbo_state) - driver.video_poke->set_fbo_state(driver.video_data, FBO_REINIT); - menu_settings_create_menu_item_label_w(strw_buffer, S_LBL_SCALE_FACTOR, sizeof(strw_buffer)); - m_settingslist.SetText(SETTING_SCALE_FACTOR, strw_buffer); - } - } - } - break; case SETTING_HW_TEXTURE_FILTER: g_settings.video.smooth = !g_settings.video.smooth; m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Hardware filtering shader #1: Linear interpolation" : L"Hardware filtering shader #1: Point filtering"); break; - case SETTING_HW_TEXTURE_FILTER_2: - g_settings.video.second_pass_smooth = !g_settings.video.second_pass_smooth; - m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER_2, g_settings.video.second_pass_smooth ? L"Hardware filtering shader #2: Linear interpolation" : L"Hardware filtering shader #2: Point filtering"); - break; - case SETTING_SCALE_ENABLED: - g_settings.video.render_to_texture = !g_settings.video.render_to_texture; - m_settingslist.SetText(SETTING_SCALE_ENABLED, g_settings.video.render_to_texture ? L"Custom Scaling/Dual Shaders: ON" : L"Custom Scaling/Dual Shaders: OFF"); - - if (driver.video_poke->set_fbo_state) - { - if(g_settings.video.render_to_texture) - driver.video_poke->set_fbo_state(driver.video_data, FBO_INIT); - else - driver.video_poke->set_fbo_state(driver.video_data, FBO_DEINIT); - } - break; default: break; } diff --git a/frontend/menu/rmenu_xui.h b/frontend/menu/rmenu_xui.h index cdf48ce79f..0be51719cc 100644 --- a/frontend/menu/rmenu_xui.h +++ b/frontend/menu/rmenu_xui.h @@ -26,11 +26,7 @@ enum SETTING_AUDIO_RESAMPLER_TYPE, SETTING_GAMMA_CORRECTION_ENABLED, SETTING_SHADER, - SETTING_SHADER_2, SETTING_HW_TEXTURE_FILTER, - SETTING_HW_TEXTURE_FILTER_2, - SETTING_SCALE_ENABLED, - SETTING_SCALE_FACTOR, SETTING_ENABLE_SRAM_PATH, SETTING_ENABLE_STATE_PATH, }; diff --git a/general.h b/general.h index c801ece649..64d09ff74a 100644 --- a/general.h +++ b/general.h @@ -109,7 +109,6 @@ enum menu_enums MODE_LOAD_GAME_SRAM_DIR_ENABLE, MODE_LOAD_GAME_STATE_DIR_ENABLE, MODE_LOAD_FIRST_SHADER, - MODE_LOAD_SECOND_SHADER, MODE_INIT, MODE_MENU, MODE_MENU_WIDESCREEN, @@ -185,16 +184,6 @@ struct settings float refresh_rate; bool threaded; - bool render_to_texture; - - struct - { - float scale_x; - float scale_y; - } fbo; - - char second_pass_shader[PATH_MAX]; - bool second_pass_smooth; char shader_dir[PATH_MAX]; char font_path[PATH_MAX]; diff --git a/gfx/d3d9/d3d9.cpp b/gfx/d3d9/d3d9.cpp index 8a90024186..9daf1e5f96 100644 --- a/gfx/d3d9/d3d9.cpp +++ b/gfx/d3d9/d3d9.cpp @@ -653,31 +653,10 @@ void D3DVideo::init_chain_singlepass(const video_info_t &video_info) info.shader_path = cg_shader; #endif - bool second_pass = g_settings.video.render_to_texture; - - if (second_pass) - { - info.scale_x = g_settings.video.fbo.scale_x; - info.scale_y = g_settings.video.fbo.scale_y; - info.filter_linear = video_info.smooth; - info.tex_w = next_pow2(RARCH_SCALE_BASE * video_info.input_scale); - info.tex_h = next_pow2(RARCH_SCALE_BASE * video_info.input_scale); - info.scale_type_x = info.scale_type_y = LinkInfo::Relative; - - info_second.scale_x = info_second.scale_y = 1.0f; - info_second.scale_type_x = info_second.scale_type_y = LinkInfo::Viewport; - info_second.filter_linear = g_settings.video.second_pass_smooth; - info_second.tex_w = next_pow2(info.tex_w * info.scale_x); - info_second.tex_h = next_pow2(info.tex_h * info.scale_y); - info_second.shader_path = g_settings.video.second_pass_shader; - } - else - { - info.scale_x = info.scale_y = 1.0f; - info.filter_linear = video_info.smooth; - info.tex_w = info.tex_h = RARCH_SCALE_BASE * video_info.input_scale; - info.scale_type_x = info.scale_type_y = LinkInfo::Viewport; - } + info.scale_x = info.scale_y = 1.0f; + ino.filter_linear = video_info.smooth; + info.tex_w = info.tex_h = RARCH_SCALE_BASE * video_info.input_scale; + info.scale_type_x = info.scale_type_y = LinkInfo::Viewport; chain = std::unique_ptr(new RenderChain( video_info, @@ -685,9 +664,6 @@ void D3DVideo::init_chain_singlepass(const video_info_t &video_info) info, video_info.rgb32 ? RenderChain::ARGB : RenderChain::RGB565, final_viewport)); - - if (second_pass) - chain->add_pass(info_second); } static std::vector tokenize(const std::string &str) diff --git a/gfx/gl.c b/gfx/gl.c index 05e6e2e04a..0366c01ef0 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -534,7 +534,7 @@ static void gl_create_fbo_textures(void *data) glGenTextures(gl->fbo_pass, gl->fbo_texture); - GLuint base_filt = g_settings.video.second_pass_smooth ? GL_LINEAR : GL_NEAREST; + GLuint base_filt = gl->tex_filter; for (int i = 0; i < gl->fbo_pass; i++) { glBindTexture(GL_TEXTURE_2D, gl->fbo_texture[i]); @@ -662,7 +662,7 @@ void gl_init_fbo(void *data, unsigned width, unsigned height) // No need to use FBOs. #ifndef RARCH_CONSOLE /* we always want FBO to be at least initialized on startup for consoles */ - if (!g_settings.video.render_to_texture && gl_shader_num_func(gl) == 0) + if (gl_shader_num_func(gl) == 0) return; #endif @@ -673,7 +673,7 @@ void gl_init_fbo(void *data, unsigned width, unsigned height) // No need to use FBOs. #ifndef RARCH_CONSOLE /* we always want FBO to be at least initialized on startup for consoles */ - if (gl_shader_num_func(gl) == 1 && !scale.valid && !g_settings.video.render_to_texture) + if (gl_shader_num_func(gl) == 1 && !scale.valid) return; #endif @@ -692,8 +692,8 @@ void gl_init_fbo(void *data, unsigned width, unsigned height) if (!scale.valid) { - scale.scale_x = g_settings.video.fbo.scale_x; - scale.scale_y = g_settings.video.fbo.scale_y; + scale.scale_x = 1.0f; + scale.scale_y = 1.0f; scale.type_x = scale.type_y = RARCH_SCALE_INPUT; scale.valid = true; } @@ -2255,11 +2255,6 @@ static void gl_start(void) // Comes too early for console - moved to gl_start gl->font_ctx = gl_font_init_first(gl, g_settings.video.font_path, g_settings.video.font_size); -#ifdef HAVE_FBO - if (!g_settings.video.render_to_texture) - gl_deinit_fbo(gl); -#endif - #ifdef HAVE_RMENU context_get_available_resolutions_func(); diff --git a/gfx/shader_cg.c b/gfx/shader_cg.c index 869767f6db..a338431d60 100644 --- a/gfx/shader_cg.c +++ b/gfx/shader_cg.c @@ -492,31 +492,15 @@ static bool load_plain(const char *path) if (!load_program(1, path, true)) return false; - - if (*g_settings.video.second_pass_shader -#ifndef RARCH_CONSOLE - && g_settings.video.render_to_texture -#endif - ) - { - if (!load_program(2, g_settings.video.second_pass_shader, true)) - return false; - - cg_shader_num = 2; - } - else - { - prg[2] = prg[0]; - cg_shader_num = 1; - } } else { RARCH_LOG("Loading stock Cg file.\n"); - prg[2] = prg[1] = prg[0]; - cg_shader_num = 1; + prg[1] = prg[0]; } + cg_shader_num = 1; + return true; } @@ -818,11 +802,6 @@ static bool load_shader(const char *cgp_path, unsigned i, config_file_t *conf) strlcpy(g_settings.video.cg_shader_path, path_buf, sizeof(g_settings.video.cg_shader_path)); break; - - case 1: - strlcpy(g_settings.video.second_pass_shader, - path_buf, sizeof(g_settings.video.second_pass_shader)); - break; } #endif @@ -961,16 +940,6 @@ static bool load_shader_params(unsigned i, config_file_t *conf) } } -#ifdef HAVE_RMENU - // In RMenu, need to set FBO scaling factors for first pass. - if (i == 0 && scale->type_x == RARCH_SCALE_INPUT && scale->type_y && RARCH_SCALE_INPUT - && scale->scale_x == scale->scale_y) - { - g_settings.video.fbo.scale_x = scale->scale_x; - g_settings.video.fbo.scale_y = scale->scale_y; - } -#endif - return true; } @@ -1034,10 +1003,6 @@ static bool load_preset(const char *path) case 0: g_settings.video.smooth = fbo_smooth[1] == FILTER_LINEAR; break; - - case 1: - g_settings.video.second_pass_smooth = fbo_smooth[2] == FILTER_LINEAR; - break; } #endif } @@ -1351,46 +1316,6 @@ bool gl_cg_load_shader(unsigned index, const char *path) } } -bool gl_cg_save_cgp(const char *path, const struct gl_cg_cgp_info *info) -{ - if (!info->shader[0] || !*info->shader[0]) - return false; - - FILE *file = fopen(path, "w"); - if (!file) - return false; - - unsigned shaders = info->shader[1] && *info->shader[1] ? 2 : 1; - fprintf(file, "shaders = %u\n", shaders); - - fprintf(file, "shader0 = \"%s\"\n", info->shader[0]); - if (shaders == 2) - fprintf(file, "shader1 = \"%s\"\n", info->shader[1]); - - fprintf(file, "filter_linear0 = %s\n", info->filter_linear[0] ? "true" : "false"); - - if (info->render_to_texture) - { - fprintf(file, "filter_linear1 = %s\n", info->filter_linear[1] ? "true" : "false"); - fprintf(file, "scale_type0 = source\n"); - fprintf(file, "scale0 = %.1f\n", info->fbo_scale); - } - - if (info->lut_texture_path && info->lut_texture_id) - { - fprintf(file, "textures = %s\n", info->lut_texture_id); - fprintf(file, "%s = \"%s\"\n", - info->lut_texture_id, info->lut_texture_path); - - fprintf(file, "%s_absolute = %s\n", - info->lut_texture_id, - info->lut_texture_absolute ? "true" : "false"); - } - - fclose(file); - return true; -} - void gl_cg_invalidate_context(void) { cgCtx = NULL; diff --git a/gfx/shader_cg.h b/gfx/shader_cg.h index 848fad2b7b..a4fd59282c 100644 --- a/gfx/shader_cg.h +++ b/gfx/shader_cg.h @@ -53,19 +53,6 @@ void gl_cg_set_compiler_args(const char **argv); bool gl_cg_load_shader(unsigned index, const char *path); -struct gl_cg_cgp_info -{ - const char *shader[2]; - bool filter_linear[2]; - bool render_to_texture; - float fbo_scale; - - const char *lut_texture_path; - const char *lut_texture_id; - bool lut_texture_absolute; -}; - -bool gl_cg_save_cgp(const char *path, const struct gl_cg_cgp_info *info); void gl_cg_invalidate_context(void); // Call when resetting GL context on PS3. struct gl_cg_lut_info diff --git a/gfx/shader_glsl.c b/gfx/shader_glsl.c index 16ac41c431..e0aeacd564 100644 --- a/gfx/shader_glsl.c +++ b/gfx/shader_glsl.c @@ -1248,27 +1248,6 @@ bool gl_glsl_init(const char *path) if (!compile_programs(&gl_program[1], progs, num_progs)) return false; - // RetroArch custom two-pass with two different files. - if (num_progs == 1 && *g_settings.video.second_pass_shader && g_settings.video.render_to_texture) - { - unsigned secondary_progs = get_xml_shaders(g_settings.video.second_pass_shader, progs + 1, 1); - if (secondary_progs == 1) - { - if (!compile_programs(&gl_program[2], progs + 1, 1)) - { - RARCH_ERR("Failed to compile second pass shader.\n"); - return false; - } - - num_progs++; - } - else - { - RARCH_ERR("Did not find exactly one valid shader in secondary shader file.\n"); - return false; - } - } - for (unsigned i = 0; i <= num_progs; i++) find_uniforms(gl_program[i], &gl_uniforms[i]); diff --git a/retroarch.cfg b/retroarch.cfg index d1610d4d50..2314307df8 100644 --- a/retroarch.cfg +++ b/retroarch.cfg @@ -110,20 +110,6 @@ # Defines a directory where XML shaders are kept. # video_shader_dir = -# Render to texture first. Useful when doing multi-pass shaders or control the output of shaders better. -# video_render_to_texture = false - -# Defines the video scale of render-to-texture. -# The output FBO size is scaled by these amounts against the input size (typically 256 * 224 for SNES). -# video_fbo_scale_x = 2.0 -# video_fbo_scale_y = 2.0 - -# Define shader to use for second pass (needs render-to-texture). -# video_second_pass_shader = "/path/to/second/shader.{cg,shader}" - -# Defines if bilinear filtering is used during second pass (needs render-to-texture). -# video_second_pass_smooth = true - # CPU-based filter. Path to a bSNES CPU filter (*.filter) # video_filter = diff --git a/settings.c b/settings.c index 77f7ef4b27..caa10ee2a4 100644 --- a/settings.c +++ b/settings.c @@ -183,13 +183,6 @@ void config_set_defaults(void) g_settings.video.msg_color_g = ((message_color >> 8) & 0xff) / 255.0f; g_settings.video.msg_color_b = ((message_color >> 0) & 0xff) / 255.0f; -#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_HLSL) - g_settings.video.render_to_texture = render_to_texture; - g_settings.video.second_pass_smooth = second_pass_smooth; - g_settings.video.fbo.scale_x = fbo_scale_x; - g_settings.video.fbo.scale_y = fbo_scale_y; -#endif - g_settings.video.refresh_rate = refresh_rate; g_settings.video.post_filter_record = post_filter_record; g_settings.video.gpu_record = gpu_record; @@ -253,7 +246,6 @@ void config_set_defaults(void) g_extern.lifecycle_mode_state |= ((1ULL << MODE_INFO_DRAW) | (1ULL << MODE_MENU)); #if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) strlcpy(g_settings.video.cg_shader_path, default_paths.shader_file, sizeof(g_settings.video.cg_shader_path)); - strlcpy(g_settings.video.second_pass_shader, default_paths.shader_file, sizeof(g_settings.video.second_pass_shader)); #endif strlcpy(g_settings.system_directory, default_paths.system_dir, sizeof(g_settings.system_directory)); @@ -455,11 +447,6 @@ bool config_load_file(const char *path) CONFIG_GET_PATH(video.cg_shader_path, "video_cg_shader"); CONFIG_GET_PATH(video.xml_shader_path, "video_xml_shader"); - CONFIG_GET_PATH(video.second_pass_shader, "video_second_pass_shader"); - CONFIG_GET_BOOL(video.render_to_texture, "video_render_to_texture"); - CONFIG_GET_FLOAT(video.fbo.scale_x, "video_fbo_scale_x"); - CONFIG_GET_FLOAT(video.fbo.scale_y, "video_fbo_scale_y"); - CONFIG_GET_BOOL(video.second_pass_smooth, "video_second_pass_smooth"); CONFIG_GET_BOOL(video.allow_rotate, "video_allow_rotate"); CONFIG_GET_PATH(video.font_path, "video_font_path"); @@ -1186,13 +1173,6 @@ bool config_save_file(const char *path) config_set_int(conf, "rewind_granularity", g_settings.rewind_granularity); config_set_string(conf, "video_cg_shader", g_settings.video.cg_shader_path); config_set_float(conf, "video_aspect_ratio", g_extern.system.aspect_ratio); -#ifdef HAVE_FBO - config_set_float(conf, "video_fbo_scale_x", g_settings.video.fbo.scale_x); - config_set_float(conf, "video_fbo_scale_y", g_settings.video.fbo.scale_y); - config_set_string(conf, "video_second_pass_shader", g_settings.video.second_pass_shader); - config_set_bool(conf, "video_render_to_texture", g_settings.video.render_to_texture); - config_set_bool(conf, "video_second_pass_smooth", g_settings.video.second_pass_smooth); -#endif config_set_bool(conf, "video_smooth", g_settings.video.smooth); config_set_bool(conf, "video_vsync", g_settings.video.vsync); config_set_int(conf, "aspect_ratio_index", g_settings.video.aspect_ratio_idx); @@ -1368,9 +1348,6 @@ void settings_set(uint64_t settings) if (settings & (1ULL << S_HW_TEXTURE_FILTER)) g_settings.video.smooth = !g_settings.video.smooth; - if (settings & (1ULL << S_HW_TEXTURE_FILTER_2)) - g_settings.video.second_pass_smooth = !g_settings.video.second_pass_smooth; - if (settings & (1ULL << S_OVERSCAN_DECREMENT)) { g_extern.console.screen.overscan_amount -= 0.01f; @@ -1432,21 +1409,6 @@ void settings_set(uint64_t settings) if (settings & (1ULL << S_SAVESTATE_INCREMENT)) g_extern.state_slot++; - if (settings & (1ULL << S_SCALE_ENABLED)) - g_settings.video.render_to_texture = !g_settings.video.render_to_texture; - - if (settings & (1ULL << S_SCALE_FACTOR_DECREMENT)) - { - g_settings.video.fbo.scale_x -= 1.0f; - g_settings.video.fbo.scale_y -= 1.0f; - } - - if (settings & (1ULL << S_SCALE_FACTOR_INCREMENT)) - { - g_settings.video.fbo.scale_x += 1.0f; - g_settings.video.fbo.scale_y += 1.0f; - } - if (settings & (1ULL << S_THROTTLE)) { if(!g_extern.system.force_nonblock) @@ -1503,9 +1465,6 @@ void settings_set(uint64_t settings) if (settings & (1ULL << S_DEF_HW_TEXTURE_FILTER)) g_settings.video.smooth = video_smooth; - if (settings & (1ULL << S_DEF_HW_TEXTURE_FILTER_2)) - g_settings.video.second_pass_smooth = second_pass_smooth; - if (settings & (1ULL << S_DEF_OVERSCAN)) { g_extern.console.screen.overscan_amount = 0.0f; @@ -1527,19 +1486,6 @@ void settings_set(uint64_t settings) if (settings & (1ULL << S_DEF_SAVE_STATE)) g_extern.state_slot = 0; - if (settings & (1ULL << S_DEF_SCALE_ENABLED)) - { - g_settings.video.render_to_texture = render_to_texture; - g_settings.video.fbo.scale_x = fbo_scale_x; - g_settings.video.fbo.scale_y = fbo_scale_y; - } - - if (settings & (1ULL << S_DEF_SCALE_FACTOR)) - { - g_settings.video.fbo.scale_x = fbo_scale_x; - g_settings.video.fbo.scale_y = fbo_scale_y; - } - if (settings & (1ULL << S_DEF_REFRESH_RATE)) g_settings.video.refresh_rate = refresh_rate;