Better error messaging when SDL can't create a window surface.
This commit is contained in:
parent
0de29d8f1a
commit
d0375e624c
2 changed files with 1 additions and 3 deletions
|
@ -67,9 +67,6 @@ static const SDL_RenderDriver *render_drivers[] = {
|
||||||
&SW_RenderDriver
|
&SW_RenderDriver
|
||||||
#endif /* !SDL_RENDER_DISABLED */
|
#endif /* !SDL_RENDER_DISABLED */
|
||||||
};
|
};
|
||||||
/* If this triggers you may need to install OpenGL development environment */
|
|
||||||
SDL_COMPILE_TIME_ASSERT(HAS_RENDER_DRIVERS, SDL_arraysize(render_drivers) > 0);
|
|
||||||
|
|
||||||
static char renderer_magic;
|
static char renderer_magic;
|
||||||
static char texture_magic;
|
static char texture_magic;
|
||||||
|
|
||||||
|
|
|
@ -239,6 +239,7 @@ SDL_CreateWindowTexture(_THIS, SDL_Window * window, Uint32 * format, void ** pix
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!renderer) {
|
if (!renderer) {
|
||||||
|
SDL_SetError("No hardware accelerated renderers available");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue