Serious-Engine
Serious-Engine copied to clipboard
avoid assert when 640x480 resolution not found
original code search 640x480 as fallback resolution, and crash if not found, but this resolution is not always avaible. this fix just return last resolution (which is lowest). this may fix #60 (not confirmed)
I feel that, instead of removing the assert completely, it should check for extreme cases where no resolutions were given at all, i.e.
ASSERT(_ctResolutions <= 0);
if no resolution avaible , can SDL video init successful ? (I've not check the whole logic flow, not sure if these resolution detected by SDL)
The list of resolutions are not generated by SDL afaik.
That's kinda the point of assertions though, no need to second guess the assumptions, just test them :).