Disable SDL default render batches behaviour.
* Rendering in batches is default behaviour as of SDL 2.0.10 but causes rendering issues in Wesnoth. * Fixes #4237 * Fixes #4245 * Not sure if #4309 may benefit as well
This commit is contained in:
parent
425802413b
commit
6436f90249
1 changed files with 4 additions and 0 deletions
|
@ -36,6 +36,10 @@ window::window(const std::string& title,
|
|||
throw exception("Failed to create a SDL_Window object.", true);
|
||||
}
|
||||
|
||||
// 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");
|
||||
|
||||
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