mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Cut down on some HAVE_FBO ifdefs
This commit is contained in:
parent
79db520ae8
commit
083bc4eed3
@ -2730,11 +2730,10 @@ unsigned *height_p, size_t *pitch_p)
|
||||
unsigned width = gl->last_width[gl->tex_index];
|
||||
unsigned height = gl->last_height[gl->tex_index];
|
||||
size_t pitch = gl->tex_w * gl->base_size;
|
||||
void* buffer = NULL;
|
||||
void* buffer_texture = NULL;
|
||||
|
||||
#ifdef HAVE_FBO
|
||||
void* buffer = NULL;
|
||||
|
||||
if (gl->hw_render_use)
|
||||
{
|
||||
buffer = malloc(pitch * height);
|
||||
@ -2742,14 +2741,13 @@ unsigned *height_p, size_t *pitch_p)
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
buffer_texture = malloc(pitch * gl->tex_h);
|
||||
|
||||
if (!buffer_texture)
|
||||
{
|
||||
#ifdef HAVE_FBO
|
||||
if (buffer)
|
||||
free(buffer);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -2757,9 +2755,9 @@ unsigned *height_p, size_t *pitch_p)
|
||||
glGetTexImage(GL_TEXTURE_2D, 0,
|
||||
gl->texture_type, gl->texture_fmt, buffer_texture);
|
||||
|
||||
*width_p = width;
|
||||
*width_p = width;
|
||||
*height_p = height;
|
||||
*pitch_p = pitch;
|
||||
*pitch_p = pitch;
|
||||
|
||||
#ifdef HAVE_FBO
|
||||
if (gl->hw_render_use)
|
||||
|
Loading…
x
Reference in New Issue
Block a user