
This covers several things: Instead of creating a new worker thread manually and having it set class member state flags, I instead utilized std::future and std::async. As far as I can tell, this should avoid the (albeit unlikely) potential race condition wherein the ls could close before loading at all if the thread was delayed in starting. Removed the timer interface and split it into two components: * A drawing callback that handles the animation. This has its granularity retained at 100 ms, but can be easily adjusted if we want it to go faster. * A pump monitor that runs much more frequently (every time events::run_event_loop is called, technically). This handles checking the state of the std::future object and will then close the window. This makes the loading screen a bit speedier compared to the previous iteration since it no longer wastes time waiting for the next timer callback to close. The one bit I'm not 100% sure about is the check for the future object's ready state in the dtor. Though, relatedly, I wonder if perhaps we should wait for the worker thread to complete in that case instead of exiting.... Also shuffled a few things around, such as immediately setting enter/esc disabled in pre_show instead of waiting for everything there to finish. Do note there occasionally seem to be a few odd issues with the dot animation after this commit. Will look into that. But it may be some texture cache-related issue... This also cleans up some unused log defines and a VS 2013 conditional include.
About
The Battle for Wesnoth is an Open Source, turn-based tactical strategy game with a high fantasy theme, featuring both singleplayer and online/hotseat multiplayer combat. Fight a desperate battle to reclaim the throne of Wesnoth, or take hand in any number of other adventures.
License
Please see the wiki for information regarding The Battle for Wesnoth's licensing:
https://wiki.wesnoth.org/Wesnoth:Copyrights
Installing
See INSTALL.md for instructions on how to build the game from source code.
More Information
For extensive documentation about all aspects of the game, see the official Battle for Wesnoth web site.
A (translated) description of how to play the game can be found in doc/manual/manual.*.html, or online at:
https://wiki.wesnoth.org/WesnothManual
The official Battle for Wesnoth Forums (with over 400,000 posts from more than 20,000 registered members) can be found at: