From d9f75d3a6a546be4156cf8dac549ba14af2f220d Mon Sep 17 00:00:00 2001 From: Themaister Date: Tue, 11 Jan 2011 19:23:21 +0100 Subject: [PATCH] Add message when shader init fails. --- gfx/gl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gfx/gl.c b/gfx/gl.c index fd77397af9..aa1679e5e4 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -318,6 +318,13 @@ static void* gl_init(video_info_t *video, const input_driver_t **input, void **i // Remove that ugly mouse :D SDL_ShowCursor(SDL_DISABLE); + if (!gl_shader_init()) + { + SSNES_ERR("Shader init failed.\n"); + SDL_QuitSubSystem(SDL_INIT_VIDEO); + return NULL; + } + gl_t *gl = calloc(1, sizeof(gl_t)); if (!gl) return NULL; @@ -371,7 +378,6 @@ static void* gl_init(video_info_t *video, const input_driver_t **input, void **i gl->last_width = gl->tex_w; gl->last_height = gl->tex_h; - gl_shader_init(); // Hook up SDL input driver to get SDL_QUIT events and RESIZE. sdl_input_t *sdl_input = input_sdl.init();