mirror of
https://github.com/yawut/SDL.git
synced 2026-08-22 08:45:31 -05:00
Better error messaging when SDL can't create a window surface.
This commit is contained in:
@@ -67,9 +67,6 @@ static const SDL_RenderDriver *render_drivers[] = {
|
||||
&SW_RenderDriver
|
||||
#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 texture_magic;
|
||||
|
||||
|
||||
@@ -239,6 +239,7 @@ SDL_CreateWindowTexture(_THIS, SDL_Window * window, Uint32 * format, void ** pix
|
||||
}
|
||||
}
|
||||
if (!renderer) {
|
||||
SDL_SetError("No hardware accelerated renderers available");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user