(GL1) Fixes crash on MSVC2005

This commit is contained in:
twinaphex 2020-02-18 05:51:23 +01:00
parent cf8f2ac56c
commit 2ba45d0acb

View File

@ -1266,14 +1266,28 @@ static void gl1_load_texture_data(
static void video_texture_load_gl1(
struct texture_image *ti,
enum texture_filter_type filter_type,
uintptr_t *id)
uintptr_t *idptr)
{
GLuint id;
unsigned width = 0;
unsigned height = 0;
const void *pixels = NULL;
/* Generate the OpenGL texture object */
glGenTextures(1, (GLuint*)id);
gl1_load_texture_data((GLuint)*id,
glGenTextures(1, &id);
*idptr = id;
if (ti)
{
width = ti->width;
height = ti->height;
pixels = ti->pixels;
}
gl1_load_texture_data(id,
RARCH_WRAP_EDGE, filter_type,
4 /* TODO/FIXME - dehardcode */,
ti->width, ti->height, ti->pixels,
width, height, pixels,
sizeof(uint32_t) /* TODO/FIXME - dehardcode */
);
}