mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Fix C89 variable declaration issue
This commit is contained in:
parent
c8b64bef1d
commit
52e1c38cf1
@ -710,6 +710,10 @@ void CORE_PREFIX(retro_run)(void)
|
|||||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
||||||
if (use_gl)
|
if (use_gl)
|
||||||
{
|
{
|
||||||
|
const uint8_t *src;
|
||||||
|
int stride, width;
|
||||||
|
unsigned y;
|
||||||
|
|
||||||
#ifndef HAVE_OPENGLES
|
#ifndef HAVE_OPENGLES
|
||||||
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, frames[1].pbo);
|
glBindBuffer(GL_PIXEL_UNPACK_BUFFER, frames[1].pbo);
|
||||||
#ifdef __MACH__
|
#ifdef __MACH__
|
||||||
@ -719,11 +723,10 @@ void CORE_PREFIX(retro_run)(void)
|
|||||||
0, media.width * media.height * sizeof(uint32_t), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
|
0, media.width * media.height * sizeof(uint32_t), GL_MAP_WRITE_BIT | GL_MAP_INVALIDATE_BUFFER_BIT);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
src = ctx->target->data[0];
|
||||||
const uint8_t *src = ctx->target->data[0];
|
stride = ctx->target->linesize[0];
|
||||||
int stride = ctx->target->linesize[0];
|
width = media.width * sizeof(uint32_t);
|
||||||
int width = media.width * sizeof(uint32_t);
|
for (y = 0; y < media.height; y++, src += stride, data += width/4)
|
||||||
for (unsigned y = 0; y < media.height; y++, src += stride, data += width/4)
|
|
||||||
memcpy(data, src, width);
|
memcpy(data, src, width);
|
||||||
|
|
||||||
#ifndef HAVE_OPENGLES
|
#ifndef HAVE_OPENGLES
|
||||||
@ -745,10 +748,11 @@ void CORE_PREFIX(retro_run)(void)
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
unsigned y;
|
||||||
const uint8_t *src = ctx->target->data[0];
|
const uint8_t *src = ctx->target->data[0];
|
||||||
int stride = ctx->target->linesize[0];
|
int stride = ctx->target->linesize[0];
|
||||||
size_t width = media.width * sizeof(uint32_t);
|
size_t width = media.width * sizeof(uint32_t);
|
||||||
for (unsigned y = 0; y < media.height; y++, src += stride, data += width/4)
|
for (y = 0; y < media.height; y++, src += stride, data += width/4)
|
||||||
memcpy(data, src, width);
|
memcpy(data, src, width);
|
||||||
|
|
||||||
dupe = false;
|
dupe = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user