| Summary: | Fix build for disabled SDL render subsystem | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Marcus von Appen <mva> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq |
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: | SDL_render.c patch for a disabled SDL render subsystem | ||
Are there any news for this issue? I can't reproduce this using configure+make on Linux. configure --disable-render make Compiles perfectly. Compiling testsprite2 against this library yields: "Couldn't create renderer: Couldn't find matching render driver" as expected. Can you let me know what platforms are giving you problems so I can verify? Try any system that uses a pure ISO C90 compiler. SDL_RENDER_DISABLED constructs a zero length array for render_drivers, which works well on most compilers, but not for e.g. Visual C++. Fixed, thanks! http://hg.libsdl.org/SDL/rev/003d40e446f5 |
Created attachment 939 [details] SDL_render.c patch for a disabled SDL render subsystem If one wants to disable the SDL render subsystem, the build breaks on several platforms due to an empty render_drivers array in SDL_render.c. The attached patch fixes the build by using a NULL pointer. This however might lead to issues with the ARRAY_SIZE macros for the SDL_Render* functions (although they should not be able to be used on such a build).