mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-23 03:10:14 +00:00
Fix crash on startup with threaded video
This commit is contained in:
parent
c7d5b82cce
commit
7daf9fae03
@ -319,27 +319,6 @@ static inline GLenum min_filter_to_mag(GLenum type)
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
#ifndef HAVE_OPENGLES
|
||||
case RARCH_WRAP_BORDER:
|
||||
return GL_CLAMP_TO_BORDER;
|
||||
#else
|
||||
case RARCH_WRAP_BORDER:
|
||||
#endif
|
||||
case RARCH_WRAP_EDGE:
|
||||
return GL_CLAMP_TO_EDGE;
|
||||
case RARCH_WRAP_REPEAT:
|
||||
return GL_REPEAT;
|
||||
case RARCH_WRAP_MIRRORED_REPEAT:
|
||||
return GL_MIRRORED_REPEAT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_FBO
|
||||
static void gl_shader_scale(gl_t *gl, unsigned idx,
|
||||
struct gfx_fbo_scale *scale)
|
||||
|
@ -33,7 +33,7 @@ void gl_load_texture_data(GLuint id,
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, id);
|
||||
|
||||
wrap = driver.video->wrap_type_to_enum(wrap_type);
|
||||
wrap = gl_wrap_type_to_enum(wrap_type);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrap);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrap);
|
||||
|
@ -414,4 +414,25 @@ void gl_load_texture_data(GLuint id,
|
||||
bool gl_load_luts(const struct video_shader *generic_shader,
|
||||
GLuint *lut_textures);
|
||||
|
||||
static INLINE unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
#ifndef HAVE_OPENGLES
|
||||
case RARCH_WRAP_BORDER:
|
||||
return GL_CLAMP_TO_BORDER;
|
||||
#else
|
||||
case RARCH_WRAP_BORDER:
|
||||
#endif
|
||||
case RARCH_WRAP_EDGE:
|
||||
return GL_CLAMP_TO_EDGE;
|
||||
case RARCH_WRAP_REPEAT:
|
||||
return GL_REPEAT;
|
||||
case RARCH_WRAP_MIRRORED_REPEAT:
|
||||
return GL_MIRRORED_REPEAT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user