Revert "Fix Win32 build."

This reverts commit cf655355d7.
This commit is contained in:
twinaphex 2013-04-06 03:54:18 +02:00
parent 9f5c6678b5
commit 83ffe437b3
2 changed files with 33 additions and 4 deletions

View File

@ -653,10 +653,31 @@ void D3DVideo::init_chain_singlepass(const video_info_t &video_info)
info.shader_path = cg_shader;
#endif
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;
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;
}
chain = std::unique_ptr<RenderChain>(new RenderChain(
video_info,
@ -664,6 +685,9 @@ 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<std::string> tokenize(const std::string &str)

View File

@ -2255,6 +2255,11 @@ 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();