summaryrefslogtreecommitdiff
path: root/render_sdl.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2020-04-30 23:30:22 -0700
committerMichael Pavone <pavone@retrodev.com>2020-04-30 23:30:22 -0700
commite872964e6a147ef0e1f5a14913127660b6627a5e (patch)
tree2981c8c8a7a233bfd0d6836a661a7011cffcc582 /render_sdl.c
parentf6cf347dc78e3d7032dbd0b4aa9411bcccf34ac3 (diff)
Remove usage of GCC pointer arithmetic on void * extension
Diffstat (limited to 'render_sdl.c')
-rwxr-xr-xrender_sdl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/render_sdl.c b/render_sdl.c
index 5526dd7..1077109 100755
--- a/render_sdl.c
+++ b/render_sdl.c
@@ -1361,14 +1361,14 @@ uint32_t *render_get_framebuffer(uint8_t which, int *pitch)
warning("Request for invalid framebuffer number %d\n", which);
return NULL;
}
- void *pixels;
- if (SDL_LockTexture(sdl_textures[which], NULL, &pixels, pitch) < 0) {
+ uint8_t *pixels;
+ if (SDL_LockTexture(sdl_textures[which], NULL, (void **)&pixels, pitch) < 0) {
warning("Failed to lock texture: %s\n", SDL_GetError());
return NULL;
}
static uint8_t last;
if (which <= FRAMEBUFFER_EVEN) {
- locked_pixels = pixels;
+ locked_pixels = (uint32_t *)pixels;
if (which == FRAMEBUFFER_EVEN) {
pixels += *pitch;
}
@@ -1378,7 +1378,7 @@ uint32_t *render_get_framebuffer(uint8_t which, int *pitch)
}
last = which;
}
- return pixels;
+ return (uint32_t *)pixels;
#ifndef DISABLE_OPENGL
}
#endif