Commit Graph

2618 Commits

Author SHA1 Message Date
Chris Thrasher
2a5ce3c989 Apply compiler warnings to tests 2022-05-02 08:39:02 +02:00
Chris Thrasher
8a4563361f Set compiler warnings on a per-target, not per-file basis
No 1st party SFML targets contain 3rd party source code so it's
safe and correct to apply warnings to the entire target.
2022-05-02 08:39:02 +02:00
Chris Thrasher
f320fc0db4 Remove local variables that shadowed global 2022-05-02 08:39:02 +02:00
Lukas Dürrenberger
d1ff823d9d
Merge pull request #2082 from feature/backmerge
Backmerge 2.6.x to master
2022-05-02 08:35:39 +02:00
Lukas Dürrenberger
08982064f5 Add clarification of SFML's status of development
Co-authored-by: kimci86 <kimci86@hotmail.fr>
2022-05-02 08:30:59 +02:00
Coder-Rahul-Y
33cb8f4391 Corrected/clarified the setLoopPoints() documentation
The previous documentation talks about 'end points' but the current code does not take end point as an argument and hence does not allow specifying the end point of the loop. (Instead the functions allows specifying the beginning offset and the length of the loop.)
2022-04-28 20:12:29 +02:00
Lukas Dürrenberger
9a6142bd22 Merge branch '2.6.x' 2022-04-27 08:12:25 +02:00
Radek Dutkiewicz
b6ca47e128 DRM Implementation
Ported sfml-pi DRM/KMS backend written by @mickelson 
Port co-authored by @substring

Co-authored-by: Andrew Mickelson <andrew.mickelson@gmail.com>
Co-authored-by: Gil Delescluse <frog2wah@gmail.com>
2022-04-26 07:44:14 +02:00
Lukas Dürrenberger
3ae85854e4
Merge pull request #2080 from SFML/feature/backmerge
2.6.x -> master backmerge
2022-04-23 12:12:17 +02:00
Lukas Dürrenberger
af209510d9 Merge branch '2.6.x' into master 2022-04-21 08:31:37 +02:00
kimci86
f7c88ee7ef Fix font pages not being created with the desired smoothness 2022-04-21 08:24:40 +02:00
Peter Chapman
470822cfe4 Fixed incorrect value for fully transparent pixels 2022-04-21 08:23:10 +02:00
Chris Thrasher
f8c1ec283a Print absolute paths when file not found
This is helpful when debugging why files won't load. By printing
the whole path we're making it more clear to the user exactly what
file is failing to load.
2022-04-21 08:22:19 +02:00
Chris Thrasher
c7705a8d9a Remove remaining use of this-> 2022-04-20 08:29:45 +02:00
Nadpher
8bad90df7c Added community section to README 2022-04-19 09:54:38 +02:00
Chris Thrasher
4b93727413 Enable MSVC standards conformance 2022-04-19 08:33:27 +02:00
kimci86
28279c0686 Fix incorrect cast in Cursor::loadFromPixels Unix implementation 2022-04-13 08:49:20 +02:00
Chris Thrasher
9010e7ba38 Add tests for sf::RectangleShape 2022-04-12 08:15:44 +02:00
Chris Thrasher
a302a9829e Ensure files end with newline character 2022-04-12 08:13:48 +02:00
Chris Thrasher
92ece7dcc3 Remove iOS 7 workarounds 2022-04-12 08:13:18 +02:00
Chris Thrasher
9cbd9c5976 Add tests for sf::Shape 2022-04-08 16:46:51 +02:00
Chris Thrasher
2adc3c0e23 Increase precision of sf::Rect<T> operator<<
This has been a recurring problem. I had to add similar code to the
sf::Angle operator<< because I was getting tiny floating point
differences that after rounding were imperceptable.
2022-04-08 16:46:51 +02:00
Lukas Dürrenberger
cf155fbb1b
Merge pull request #2062 from 2.6.x
Back merge from 2.6.x
2022-04-08 16:39:54 +02:00
Lukas Dürrenberger
cb675b2bbc Merge branch '2.6.x' into feature/back-merge 2022-04-07 08:57:06 +02:00
binary1248
4afa91422f Added back the missing WINAPI calling convention declaration that was left out in 9a0cc4b7dc. Closes #2057. 2022-04-07 08:48:17 +02:00
kimci86
e0d03ec6a8 Fix success condition for sending end-of-stream packet in voip example 2022-04-06 12:01:42 +02:00
kimci86
fae91bbbf2 Allow SoundStream::play to be called again after reaching the end 2022-04-06 12:01:42 +02:00
binary1248
8e95d1c73a Abort looping in SoundStream::streamData if an OpenAL error occurs that would have caused it to never terminate. Fixes #1831 2022-04-06 11:50:17 +02:00
Chris Thrasher
c5f3aeca72 Use std::quoted 2022-04-05 22:45:22 +02:00
Lukas Dürrenberger
2837b3623b Remove VS 2017 as GitHub Actions compiler
VS 2017 doesn't fully support C++17
2022-04-05 09:35:29 +02:00
Lukas Dürrenberger
fe3a7fc21e Add support for VS 2022 to the GitHub Actions workflow 2022-04-05 09:35:29 +02:00
Chris Thrasher
f3d98a9ebf Require all modules are built before building tests 2022-04-02 12:17:59 +02:00
Chris Thrasher
bc7ec1277a Move sf::Rect printer to GraphicsUtil 2022-03-30 09:06:08 +02:00
friendlyanon
9b3735c05f Honor OPTIONAL_COMPONENTS when finding SFML
The "main" component is not available everywhere, but passing it to the
find_package(SFML) call via the OPTIONAL_COMPONENTS still fails the call
on platforms like Linux.

This commit enables SFML to be used the same in a cross-platform fashion
without forcing consumers to put custom logic around importing SFML.
Example that works with this commit, but break before:

    find_package(SFML REQUIRED graphics OPTIONAL_COMPONENTS main)
    target_link_libraries(dummy PRIVATE SFML::graphics)
    if(SFML_MAIN_FOUND)
      target_link_libraries(dummy PRIVATE SFML::main)
    endif()
2022-03-29 00:30:04 +02:00
Chris Thrasher
8f6903d008 Remove empty file 2022-03-25 17:03:46 +01:00
Vittorio Romeo
8838030d67 Fix -Wmissing-braces warning under clang 2022-03-18 08:34:41 +01:00
Chris Thrasher
5c9b571c70 Add tests for sf::VertexArray 2022-03-16 09:56:29 +01:00
Chris Thrasher
33a7c4d2a8 Clean up filesystem path usage in examples 2022-03-15 15:21:45 +01:00
Chris Thrasher
d64cbff463 Remove redundant quotes when printing filesystem paths
operator<< for std::filesystem::path already adds quotes around the
path so we don't need to keep manually quoting them.
2022-03-15 15:21:45 +01:00
marwen.azouzi
79250d9584 Fixes the following compilation error
error: implicit conversion from 'size_t' (aka 'unsigned long') to 'CGFloat' (aka 'double') may lose precision [-Werror,-Wimplicit-int-float-conversion]
2022-03-15 12:52:50 +01:00
binary1248
3315456dc3 Replaced select with poll in JoystickImpl to function even when a large number of file descriptors are open. 2022-03-12 13:09:11 +01:00
Chris Thrasher
2e6c363e64 Mark external headers as SYSTEM headers
Among other benefits this ensures that the compiler doesn't emit
warnings on headers in these paths.
2022-03-10 21:26:39 +01:00
Chris Thrasher
7dfc7f0202 Use new sf::Vector2<T> utilities 2022-03-03 19:20:09 +00:00
Vittorio Romeo
411d702d7a Use 'ccache' if available 2022-03-03 14:41:07 +00:00
Jan Haller
28e935673c Const-qualify local variables in Vector2 test, where possible 2022-02-28 16:18:00 +00:00
Jan Haller
2eef193c0e Unit tests for Vector2 extensions
Also adds ApproxVec and ApproxDeg types for more readable comparison of approximate vectors/angles.
2022-02-28 16:18:00 +00:00
Jan Haller
70eeba5067 Add Vector2 extension methods (inspired from Thor)
Adds vector algebra functionality as member functions for Vector2<T>, with some methods limited to floating-point T.
Also adds UnitX and UnitY constants for the two axis unit vectors.
2022-02-28 16:18:00 +00:00
kimci86
fab2c93d7a Simplify CI workflow 2022-02-20 17:00:43 +01:00
Chris Thrasher
106da21dd1 Revert accidental filesystem conversion
"extension" in this context is not referring to a file extension.
2022-02-18 19:48:54 +00:00
Chris Thrasher
80004d87b1 Build sf::Transformable tests
Transformable.cpp was originally compiled when I first submitted
PR #1973. While that PR was in review, #2012 got merged which
changed how tests are compiled. These two PR were in conflict so
when I went to resolve conflicts on #1973, I accidentaly removed
the line which added Transformable.cpp to the build. Because not
compiling this file caused no build breaks, nobody noticed until
after #1973 got merged. My bad, everybody.
2022-02-18 19:48:29 +00:00