mirror of
https://github.com/libretro/RetroArch.git
synced 2024-10-07 14:23:29 +00:00
read_viewport can return false during video record.
This commit is contained in:
parent
897167789f
commit
a25dcf337c
2
gfx/gl.c
2
gfx/gl.c
@ -1542,7 +1542,7 @@ static bool gl_read_viewport(void *data, uint8_t *buffer)
|
||||
RARCH_PERFORMANCE_INIT(read_viewport);
|
||||
RARCH_PERFORMANCE_START(read_viewport);
|
||||
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, get_alignment(gl->vp.width * 3));
|
||||
|
||||
#ifdef HAVE_OPENGLES
|
||||
glReadPixels(gl->vp.x, gl->vp.y,
|
||||
|
@ -226,9 +226,11 @@ static void recording_dump_frame(const void *data, unsigned width, unsigned heig
|
||||
return;
|
||||
}
|
||||
|
||||
// Big bottleneck. Also adds one frame "delay" to video output as we haven't rendered the current frame yet.
|
||||
// It will probably improve performance a lot though, who knows.
|
||||
video_read_viewport_func(g_extern.record_gpu_buffer);
|
||||
// Big bottleneck.
|
||||
// Since we might need to do read-backs asynchronously, it might take 3-4 times
|
||||
// before this returns true ...
|
||||
if (!video_read_viewport_func(g_extern.record_gpu_buffer))
|
||||
return;
|
||||
|
||||
ffemu_data.pitch = g_extern.record_gpu_width * 3;
|
||||
ffemu_data.width = g_extern.record_gpu_width;
|
||||
|
Loading…
Reference in New Issue
Block a user