Locale doesn't rely on boost, so it must have been some other issue in Boost 1.60
that was incidentally fixed by including that file. If anyone ever happens to build
with 1.60 again we can revisit this.
For the record, there are no issues with VS 2017 and Boost 1.66.
It was broken by b95c9996bf because
ignoring SIGCHLD makes it impossible to query exit status of wesnothd
subprocess. Fix this by spawning a thread to wait for the browser
instead of ignoring SIGCHLD.
I originally did this in 699047766a and then reverted it in
08a866dc20 due to @gfgtdf pointing out the object was never
actually destroyed since io_service::stop was never called (issue #1927).
This new method foregoes the custom wrapper class and instead waits for the worker thread
to terminate in the wesnothd_connection dtor. The use of the wrapper class is also why using
thread::detach alone worked (@jyrkive) and using join did not.
Additionally, the ptr alias is now of a unique_ptr instead of a shared_ptr.
I have verified that the connection dtor is actually called. This new method makes it clearer
what's actually going on.
We use both SDL_KEYDOWN and SDL_TEXTINPUT events for hotkeys. It's possible
for both events (caused by the same keypress) to trigger the hotkey command
and we don't want that. Hence, let's drop duplicate commands.
Fixes#1736.
Also covers uses of boost::this_thread.
Turns out std::thread calls std::terminate if it's destroyed while still joinable.
thread::detach needs to be called or else the program will crash.
There's also no standard library equivalent of boost:🧵:timed_join so I just
replaced it with the is_worker_running_ variable.
Closes#2873.
(This is part of a commented-out block in master because Vultraz hasn't
updated the code yet. He said I could forward-port the patch into it
anyway. For the time being unit descriptions are just completely missing
because of this.)
This reverts commit c42401a8de.
As @CelticMinstrel pointed out, that commit made it impossible to input characters which require
AltGr to type (e.g. @, € and $ in Finnish keyboard).
Reopens#1736.
This reverts afaa75842c and replaces it with a more general
no-assert-during-events check. This is because there are other instances besides [inspect]
where this function can be called mid-event, and it wouldn't be convenient to add nested
'strict' parameters to multiple functions just to handle them.
Fixes#2750.
This results in the same behavior as before (default color outside a scenario, side's
chosen color during one) and is more consistent with other places in the code. They
both end up accessing `game_config::team_rgb_range` anyway, this is just in a slightly
more roundabout way.
This isn't used anywhere yet. Right now it only takes a directory and generates one
sheet for all the images in that directory and its sub-directories. The sheets are
fully-functional textures, and a path -> rect mapping exists, but I haven't added anything
that uses it yet.
This will definitely need some improvements and changes to properly integrate with @jyrkive 's
OGL work.
I had been unconditionally selecting the first entry after setting the active
sorting option. This overrode the previous unit selection.
Regression from 6b52d16fae.
The problem with them is that the "libraries" into which Wesnoth is split
have circular dependencies, and linking of the game succeeds only by chance
(everything just happens to be used by the time the linker encounters it).
Fixed by allowing the linker to use multiple passes over the libraries
until all references are resolved.
* The one case of get_side_color_range().mid() was converted to get_side_color();
These are equivalent
* get_side_rgb() was removed. Before color_range was refactored to use color_t
(f2ab245e8d), the only difference between it and
get_side_color() was that the former used to return uint32_t (the color they returned
was the same.
* get_side_rgb_min() and get_side_rgb_max() were renamed to get_side_color_min() and
get_side_color_max(), respectively. Both were unused in any case.
* get_side_highlight_pango() was renamed get_side_color_pango() and now takes a 1-indexed
side like the other color functions instead of taking 0-indexed and adding 1.
This changes:
utf8::char_t -> char
utf8::string -> std::string
utf16::char_t -> char16_t
utf16::string -> std::u16string
ucs4::char_t -> char32_t
ucs4::string -> std::u32string
utf16::string and ucs4::string are now proper strings instead of vectors of characters too.
In order to get this change to compile at all, I needed to add a ucs4_convert_impl::convert_impl
specialization for wchar_t alongside the new char16_t specialization; both point to the same
conversion implementation type.
This commit doesn't do any additional cleanup. I'm sure if we looked, we could get rid of a
lot of the custom conversion code and probably a bunch of stuff that might have had to do with
supporting utf16::string and ucs4::string being vectors instead of basic_string specializations.
Either way, I don't know the code (or encoding handling in general) to make a call as to what's
needed or not. I'll let someone else do that.
They're still in the game_config namespace but are now in a more logical header.
game_config::version has been replaced with wesnoth_version.str(), save for one case
where it was replaced with wesnoth_version directly (it was a comparison against another
version_info object; no need to compare against a string...).
Also cleaned up a bunch of game_config.hpp includes.
See https://forums.wesnoth.org/viewtopic.php?p=625159#p625159
Since this problem can also be solved with make_neutral_surface, and is_neutral already
check a surface's alpha mask, I moved the is-not-indexed check to is_neutral and made use
of it for the on-load standardization check.
This ensures the window object is managed by a smart pointer from the moment of its
creation, instead of being passed around as a raw pointer first. If an exception were
thrown during window creation, it would have resulted in a memory leak.
* Moved window_ member assignment to build_window() in both modal_dialog and modeless_dialog.
* Added an assertion after window creation in modeless_dialog.
* Renamed the global build() function to build_window_impl() to avoid confusion with
builder_widget::build.