mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 17:43:02 +00:00
Move forced IOS viewport logic further up.
If using multipass, the forced viewport update will ruin the viewport.
This commit is contained in:
parent
7de7c3d743
commit
49e4020437
11
gfx/gl.c
11
gfx/gl.c
@ -657,9 +657,6 @@ void gl_init_fbo(void *data, unsigned width, unsigned height)
|
|||||||
if (scale_last.valid)
|
if (scale_last.valid)
|
||||||
gl->fbo_pass++;
|
gl->fbo_pass++;
|
||||||
|
|
||||||
if (gl->fbo_pass <= 0)
|
|
||||||
gl->fbo_pass = 1;
|
|
||||||
|
|
||||||
if (!scale.valid)
|
if (!scale.valid)
|
||||||
{
|
{
|
||||||
scale.scale_x = 1.0f;
|
scale.scale_x = 1.0f;
|
||||||
@ -1343,6 +1340,10 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
|||||||
|
|
||||||
gl_shader_use_func(gl, 1);
|
gl_shader_use_func(gl, 1);
|
||||||
|
|
||||||
|
#ifdef IOS // Apparently the viewport is lost each frame, thanks apple.
|
||||||
|
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_FBO
|
#ifdef HAVE_FBO
|
||||||
// Render to texture in first pass.
|
// Render to texture in first pass.
|
||||||
if (gl->fbo_inited)
|
if (gl->fbo_inited)
|
||||||
@ -1363,10 +1364,6 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
|||||||
gl_update_resize(gl);
|
gl_update_resize(gl);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef IOS // Apparently the viewport is lost each frame, thanks apple.
|
|
||||||
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (frame) // Can be NULL for frame dupe / NULL render.
|
if (frame) // Can be NULL for frame dupe / NULL render.
|
||||||
{
|
{
|
||||||
gl->tex_index = (gl->tex_index + 1) & TEXTURES_MASK;
|
gl->tex_index = (gl->tex_index + 1) & TEXTURES_MASK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user