Use uint8_t* instead of void* for texture data

NOTE: In texture_setimage, I had to move variables to the top of the
scope because microsoft's C compiler will give the legacy C90 error of:
'illegal use of this type as an expression'.

To sum it up, microsoft's C compiler is still utter garbage.
This commit is contained in:
jp9000
2014-06-27 21:29:06 -07:00
parent 9478624b22
commit 7b12133af3
15 changed files with 55 additions and 53 deletions

View File

@@ -48,14 +48,14 @@ static void xcursor_create(xcursor_t *data, XFixesCursorImage *xc) {
if (data->tex
&& data->last_height == xc->width
&& data->last_width == xc->height) {
texture_setimage(data->tex, (void **) pixels,
texture_setimage(data->tex, (const uint8_t *) pixels,
xc->width * sizeof(uint32_t), False);
} else {
if (data->tex)
texture_destroy(data->tex);
data->tex = gs_create_texture(xc->width, xc->height,
GS_BGRA, 1, (const void **) &pixels, GS_DYNAMIC);
GS_BGRA, 1, (const uint8_t **) &pixels, GS_DYNAMIC);
}
bfree(pixels);