Discussion thread: http://en.sfml-dev.org/forums/index.php?topic=20875.0
Basically, the issue with sf::Image::create was, that it would either
occupy space, it doesn't need, because std::vector::resize doesn't
actually shrink the vector, or reallocate in an inefficient way by
needlessly copying the whole old image over. Neither did it grant strong
exception safety guarantee because it changed the non-throwing members
(m_size) prior to doing the critical stuff (reallocating) which may
throw. Changing the order and using a temporary
(create-temporary-and-swap idiom; see http://www.gotw.ca/gotw/059.htm)
fixes both of these problems.
Changed the error message for using uniforms to use the word uniform instead of the word parameter since parameter's deprecation.
A minor text output alteration to keep consistent with the new interface.
This commit fixes the FindXCB.cmake module for the case no components
are requested. The previous version assigned `XCB_FIND_COMPONENTS`
list to an empty variable name.
I was lucky enough to catch the bug in a corner case where both
`XCB_COMPONENTS` and `XCB_FIND_COMPONENTS` were empty and `set()`
command failed, but note this awesome CMake language supports more annoying
corner cases like `XCB_COMPONENTS` empty and `XCB_FIND_COMPONENTS`
with two elements, which results in the following `set()` invocation:
``` cmake
set(${XCB_FIND_COMPONENTS[0]} ${XCB_FIND_COMPONENTS[1]})
```
So always beware of CMake secret charms...
* Updated the Android toolchain file to support NDKs up to the latest release (r12b; based on https://github.com/gongminmin/android-cmake).
* Fixed missing sRGB extension defines - also SFML once again compiles for older target API levels not having the sRGB extensions (fixes#1079, supersedes #1085).
* Changed SFML's default STL runtime to `stlport_shared`, since `c++_shared` is no longer supported.
This implementation uses the following workaround:
- resize flag is removed from the window when the cursor is grabbed
- when grabbed, the cursor is projected inside the view if needed
- to avoid letting the user clic outside the view, the cursor is
disconnected and manually moved using relative motion
- the initial potential projection of the cursor results in a big
delta for the next move and needed to be somehow ignored (see
note about m_deltaXBuffer and m_deltaYBuffer in SFOpenGLView.h)
* When grabbed, the mouse cursor may not be moved outside a window's client frame.
* Fullscreen windows always grab the mouse cursor.
* The effect is only active while the SFML window is the active
foreground window.
* Right now this is only implemented for Windows.
Signed-off-by: Marco Antognini <antognini.marco@gmail.com>