Wrap the SDL render batch hint with SDL version conditional.
This commit is contained in:
parent
8035c99b15
commit
f9ad6073ea
1 changed files with 2 additions and 0 deletions
|
@ -36,9 +36,11 @@ window::window(const std::string& title,
|
|||
throw exception("Failed to create a SDL_Window object.", true);
|
||||
}
|
||||
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 10)
|
||||
// Rendering in batches (for efficiency) is enabled by default from SDL 2.0.10
|
||||
// The way Wesnoth uses SDL as of September 2019 does not work well with this rendering mode (eg story-only scenarios)
|
||||
SDL_SetHint(SDL_HINT_RENDER_BATCHING, "0");
|
||||
#endif
|
||||
|
||||
if(!SDL_CreateRenderer(window_, -1, render_flags)) {
|
||||
throw exception("Failed to create a SDL_Renderer object.", true);
|
||||
|
|
Loading…
Add table
Reference in a new issue