mirror of
https://github.com/libretro/RetroArch
synced 2025-04-25 09:02:44 +00:00
(GL1) Fixes crash on MSVC2005
This commit is contained in:
parent
cf8f2ac56c
commit
2ba45d0acb
@ -1266,14 +1266,28 @@ static void gl1_load_texture_data(
|
|||||||
static void video_texture_load_gl1(
|
static void video_texture_load_gl1(
|
||||||
struct texture_image *ti,
|
struct texture_image *ti,
|
||||||
enum texture_filter_type filter_type,
|
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 */
|
/* Generate the OpenGL texture object */
|
||||||
glGenTextures(1, (GLuint*)id);
|
glGenTextures(1, &id);
|
||||||
gl1_load_texture_data((GLuint)*id,
|
*idptr = id;
|
||||||
|
|
||||||
|
if (ti)
|
||||||
|
{
|
||||||
|
width = ti->width;
|
||||||
|
height = ti->height;
|
||||||
|
pixels = ti->pixels;
|
||||||
|
}
|
||||||
|
|
||||||
|
gl1_load_texture_data(id,
|
||||||
RARCH_WRAP_EDGE, filter_type,
|
RARCH_WRAP_EDGE, filter_type,
|
||||||
4 /* TODO/FIXME - dehardcode */,
|
4 /* TODO/FIXME - dehardcode */,
|
||||||
ti->width, ti->height, ti->pixels,
|
width, height, pixels,
|
||||||
sizeof(uint32_t) /* TODO/FIXME - dehardcode */
|
sizeof(uint32_t) /* TODO/FIXME - dehardcode */
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user