Don't use video_driver_get_ptr inside shader_null

This commit is contained in:
twinaphex 2015-11-23 16:41:50 +01:00
parent efb1d741f9
commit 8030f91667
2 changed files with 3 additions and 6 deletions

View File

@ -33,6 +33,7 @@
#include "../font_renderer_driver.h" #include "../font_renderer_driver.h"
#include "../../content.h" #include "../../content.h"
#include "../../runloop.h" #include "../../runloop.h"
#include "../../verbosity.h"
typedef struct typedef struct
{ {

View File

@ -54,11 +54,8 @@ static bool shader_null_set_mvp(void *data, const math_matrix_4x4 *mat)
{ {
#ifdef HAVE_OPENGL #ifdef HAVE_OPENGL
#ifndef NO_GL_FF_MATRIX #ifndef NO_GL_FF_MATRIX
gl_t *gl = (gl_t*)video_driver_get_ptr(false); if (!strcmp(video_driver_get_ident(), "gl"))
if (gl)
{
gl_ff_matrix(mat); gl_ff_matrix(mat);
}
#endif #endif
#endif #endif
return false; return false;
@ -68,8 +65,7 @@ static bool shader_null_set_coords(const void *data)
{ {
#ifdef HAVE_OPENGL #ifdef HAVE_OPENGL
#ifndef NO_GL_FF_VERTEX #ifndef NO_GL_FF_VERTEX
gl_t *gl = (gl_t*)video_driver_get_ptr(false); if (!strcmp(video_driver_get_ident(), "gl"))
if (gl)
{ {
const struct gfx_coords *coords = (const struct gfx_coords*)data; const struct gfx_coords *coords = (const struct gfx_coords*)data;
gl_ff_vertex(coords); gl_ff_vertex(coords);