Provides a Catch::toString() overload for the following SFML classes, that support at least operator== and operator!=, and can thus be used in Catch assertion expressions:
* String
* Time
* Vector2<T>
* Vector3<T>
* VideoMode
* Color
* Rect<T>
The intermediate header UnitTests.hpp is introduced to ensure string conversion visibility.
Do not include <catch.hpp> directly any longer.
Removed useless cast in SFML/System/Utf.inl at line 296.
This useless cast creates a warning when using -Wuseless-cast as an option in g++ and clang++.
Operations can't be made on types smaller than 4 bytes (32 bits), so types smaller than 4 bytes are converted to at least 4 bytes types, thus rendering the static_cast<Uint32> useless in this particular case.
On an X set-up with multiple monitors running separate X screens (as
opposed to merging them into one large X screen using Xinerama), the
selected X visual needs to be one for the screen where the colormap,
window, and other X resources are created. In fact, all these need to
match, and the GL context as well.
Most of the SFML windowing and graphics code uses (X)DefaultScreen()
for that, which is fine. Combined with XOpenDisplay(NULL), this will
create the window on the screen (and monitor) selected by the DISPLAY
enviroment variable. :0.0 will be the first monitor, :0.1 the second,
etc.
However, XGetVisualInfo() will return visuals for *all* screens, not
just the default one. They seem to be ordered by screen number, but I
don't think the standard makes any guarantees there.
If the visual doesn't match up with the screen, this will abort with
an X error. BadMatch, in many cases.
This means that in addition to other filtering,
GlxContext::selectBestVisual() needs to filter the visuals by screen
number, otherwise SFML won't work at all on any screens but the first.
This fixes issue #724.