SDL
SDL copied to clipboard
Better handling of `SDL_DialogFileFilter`
This issue includes code that initialises the filters as:
constexpr static SDL_DialogFileFilter filters[] = { {"Any file", "*"}};
...which misses the terminating { NULL, NULL } entry. I expect this to be a frequent problem.
I thought at first about adding an example code directly in the documentation, so that people can easily copy and paste that code and fine-tune it to their needs, but I'm having second thoughts about whether it would be better to replace the terminating null entry with an extra parameter that would be the number of filters.
What would be the best option?