mirror of
https://github.com/libretro/RetroArch
synced 2025-01-26 09:35:21 +00:00
Revert "More scrubbing - no more render_to_texture, fbo_scale_x / fbo_scale_y,"
This reverts commit 7155dd9ca905aec44c6e707f8c3a908cc728894a.
This commit is contained in:
parent
c083efb5a4
commit
cbfe5ff111
@ -350,6 +350,26 @@ static void populate_setting_item(void *data, unsigned input)
|
||||
sizeof(current_item->comment));
|
||||
}
|
||||
break;
|
||||
#ifdef HAVE_FBO
|
||||
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));
|
||||
@ -682,6 +702,12 @@ static void populate_setting_item(void *data, unsigned input)
|
||||
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));
|
||||
@ -1358,6 +1384,7 @@ static bool osk_callback_enter_filename(void *data)
|
||||
memset(¤t_settings, 0, sizeof(current_settings));
|
||||
current_settings.shader[0] = g_settings.video.cg_shader_path;
|
||||
current_settings.filter_linear[0] = g_settings.video.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);
|
||||
*/
|
||||
@ -1586,6 +1613,68 @@ 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_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))
|
||||
|
@ -103,6 +103,10 @@ enum
|
||||
SETTING_FONT_SIZE,
|
||||
SETTING_KEEP_ASPECT_RATIO,
|
||||
SETTING_HW_TEXTURE_FILTER,
|
||||
#ifdef HAVE_FBO
|
||||
SETTING_SCALE_ENABLED,
|
||||
SETTING_SCALE_FACTOR,
|
||||
#endif
|
||||
#ifdef _XBOX1
|
||||
SETTING_FLICKER_FILTER,
|
||||
SETTING_SOFT_DISPLAY_FILTER,
|
||||
@ -177,6 +181,9 @@ enum
|
||||
INGAME_MENU_ASPECT_RATIO,
|
||||
INGAME_MENU_OVERSCAN,
|
||||
INGAME_MENU_ROTATION,
|
||||
#ifdef HAVE_FBO
|
||||
INGAME_MENU_SCALE_FACTOR,
|
||||
#endif
|
||||
INGAME_MENU_RESIZE_MODE,
|
||||
INGAME_MENU_FRAME_ADVANCE,
|
||||
INGAME_MENU_SCREENSHOT_MODE,
|
||||
|
@ -53,6 +53,7 @@ enum
|
||||
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,
|
||||
@ -290,6 +291,9 @@ static void menu_settings_create_menu_item_label_w(wchar_t *strwbuf, unsigned se
|
||||
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;
|
||||
@ -685,10 +689,13 @@ 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_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");
|
||||
@ -793,6 +800,18 @@ 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_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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -878,10 +897,42 @@ 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_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;
|
||||
}
|
||||
@ -954,10 +1005,39 @@ 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_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;
|
||||
}
|
||||
|
@ -27,6 +27,8 @@ enum
|
||||
SETTING_GAMMA_CORRECTION_ENABLED,
|
||||
SETTING_SHADER,
|
||||
SETTING_HW_TEXTURE_FILTER,
|
||||
SETTING_SCALE_ENABLED,
|
||||
SETTING_SCALE_FACTOR,
|
||||
SETTING_ENABLE_SRAM_PATH,
|
||||
SETTING_ENABLE_STATE_PATH,
|
||||
};
|
||||
|
@ -348,7 +348,9 @@ void xdk_d3d_init_fbo(void *data)
|
||||
HRESULT ret;
|
||||
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)data;
|
||||
|
||||
#if 0
|
||||
if (!g_settings.video.render_to_texture)
|
||||
return;
|
||||
|
||||
xdk_d3d_deinit_fbo(d3d);
|
||||
|
||||
ret = d3d->d3d_render_device->CreateTexture(d3d->tex_w * g_settings.video.fbo.scale_x, d3d->tex_h * g_settings.video.fbo.scale_y,
|
||||
@ -376,7 +378,6 @@ void xdk_d3d_init_fbo(void *data)
|
||||
xdk_convert_texture_to_as16_srgb(&d3d->lpTexture_ot_as16srgb);
|
||||
|
||||
d3d->fbo_inited = true;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user