Commit Graph

3530 Commits

Author SHA1 Message Date
Chris Thrasher
a71b3a497b Remove use of deprecated ALooper_pollAll 2024-08-08 14:14:14 -06:00
binary1248
e185f6d53e Replace factory functions with throwing constructors 2024-08-08 09:19:32 -06:00
binary1248
698f265277 (Re-)Introduce default constructors and load/open member functions for resource objects that can be reused. 2024-08-08 09:19:32 -06:00
Chris Thrasher
6b4da70e15 Remove use of deprecated ALooper_pollAll 2024-08-07 17:28:48 -06:00
Chris Thrasher
2a4ca6e053 Prevent crash when setting empty uniform array
The root of the problem is accessing the first element of an empty
array which reads out-of-bounds memory.
2024-08-01 14:03:58 -06:00
Chris Thrasher
dffdaa52a7 Pass sf::Colors by value 2024-07-31 09:25:21 -06:00
Chris Thrasher
779b963530 Stop using macOS 11 images 2024-07-29 07:21:08 +02:00
Lorenzooone
03179abbf6 Fix issue with openal arm requiring vc_redist 2024-07-29 00:11:07 +02:00
Chris Thrasher
b50f62da43 Test constexpr construction of aggregates 2024-07-27 17:27:39 -06:00
ZXShady
8c895fd7e1 Pass sf::IpAddress by value
`sf::IpAddress` is a wrapper around `std::uint32_t` and should be passed by value
2024-07-27 15:53:03 -06:00
ZXShady
d6acbf7efb
Update InputSoundFile.cpp (#3177) 2024-07-26 07:15:41 +02:00
ZXShady
a256c5cdcd
Remove useless attributes from implementation files (#3175) 2024-07-21 22:50:00 -06:00
Chris Thrasher
b0b4c7ff3d Fix documentation regarding bit widths 2024-07-21 17:52:58 -06:00
Chris Thrasher
0831f055ce Require that sf::WindowBase::handleEvents receives at least one argument 2024-07-21 11:59:05 -06:00
Chris Thrasher
c8c8673259 Pass sf::Vector2<T>s by value
As a rule of thumb, if the type is less than or equal to the CPU
register width times two then you ought to pass it by value. This
will lead to more efficient code generation.
2024-07-19 10:33:00 -06:00
ZXShady
6c415471d2 Apply changes
Putting the `= default` in the header file like other files do and not in the `.inl` implementation files for consistency
2024-07-18 14:16:27 -06:00
Alexander Weinrauch
9d418b033f Fixed broken joystick axis mappings under Linux 2024-07-18 09:48:18 -06:00
Chris Thrasher
b4c7e4a890 Stop running tests that sometimes hang indefinitely 2024-07-17 17:12:58 -06:00
Chris Thrasher
7083b6562e Fix typos 2024-07-15 14:16:36 -06:00
Bambo-Borris
5eb57ae5f1 Fix white square problem in OpenGL example
Because the sf::Texture::m_texture value changes when the texture is
reloaded from disk, we need to rebind the texture since the previously
bound sf::Texture::m_texture value is no longer a valid identifier.
2024-07-15 12:32:08 -06:00
kimci86
72eb115551 Remove inheritance in sf::Event subtypes
This avoids confusing auto-completion hints when looking for an event
subtype to use as `sf::Event::is` or `sf::Event::getIf` type parameter.

This also avoids the inconsistency between what is possible with
`sf::Event::is` and `sf::Event::getIf` functions (they do not accept
event subtypes parents) and what would be possible with
`sf::Event::visit` (it could take a handler for a parent type).
2024-07-15 12:20:35 -06:00
Vittorio Romeo
01f26346cb Fix typo in WindowBase::setMaximumSize 2024-07-15 10:59:32 -06:00
vittorioromeo
7ba672139c Simplify sf::WindowBase::handleEvents and add basic tests 2024-07-09 17:51:41 +02:00
Lukas Dürrenberger
2a6e15f9cc
Merge branch '2.6.x' into master 2024-07-09 10:40:45 +02:00
binary1248
85e5ce5d65 Added event handling example. 2024-07-08 15:16:20 -06:00
binary1248
41c48a84bc Added visitation support to Event and WindowBase via handleEvents. 2024-07-08 15:16:20 -06:00
Chris Thrasher
5873a7a157 Fix null pointer dereference when creating fullscreen window
Regression introduced in 7556d1b
2024-07-08 13:12:17 -06:00
Chris Thrasher
dc8b6dbbfa Remove unnecessary namespace usage 2024-07-06 10:33:53 -06:00
Chris Thrasher
88646246fc
Consolidate getErrorString functions 2024-07-06 09:09:09 -06:00
Chris Thrasher
ee036b064c Modernize management of Udev pointers 2024-07-05 22:33:31 -06:00
Chris Thrasher
f911d01e01 Use lowercase literal suffixes 2024-07-04 16:28:57 -06:00
Lukas Dürrenberger
121fa9cf74 Revert "Simplify/optimize sf::AudioResource implementation"
This reverts commit cede2def8b as it's
still possible to force a wrong destruction order.
2024-07-04 22:05:28 +02:00
Chris Thrasher
fbd8407a5f Enable moving windows 2024-06-30 16:50:32 -06:00
Chris Thrasher
7556d1be78 Move fullscreen window bookkeeping to a lower level 2024-06-30 16:50:32 -06:00
Chris Thrasher
51b8b44e14 Use more [[nodiscard]] 2024-06-27 19:02:46 -06:00
binary1248
742beeabfe Added assert that a texture is valid when attempting to bind it. 2024-06-27 15:48:45 -06:00
Chris Thrasher
e1469aa8f2 Use [[nodiscard]] in more places 2024-06-27 15:12:15 -06:00
Chris Thrasher
d7eeaea240 Add clang-tidy readability-else-after-return check 2024-06-27 12:17:03 -06:00
binary1248
be63ffa8d4 Fixed SoundEffects example allocating effect processor resources based on source channel count instead of engine channel count. 2024-06-27 08:17:23 +02:00
Lukas Dürrenberger
1bf092fe6d Merge branch '2.6.x' into master 2024-06-26 08:56:03 +02:00
Zombieschannel
98493bdf51 ARM64 support for SFML
Added dlls, libs and changed CMake files.
2024-06-25 23:17:36 +02:00
vittorioromeo
6ab03cc3ee Improve sf::Event documentation and parameter naming 2024-06-25 14:54:41 -06:00
kimci86
fca4fa1aa2 Rename Font::loadFromFile into Font::openFromFile
Similar renaming for Font::loadFromMemory and Font::loadFromStream.
The goal is to better express the need to keep the source available,
similar to Music::openFromFile for example.
2024-06-25 22:53:28 +02:00
vittorioromeo
af4e2d6726 Add support for UCRT64 MinGW environment 2024-06-25 21:49:44 +02:00
Jonny Paton
c7f6ad6127 Fix SFML_USE_STATIC_STD_LIBS behaviour with newer cmake. As the flags aren't always included in the defaults instead of replacing we must strip existing (if present) then add the correct flag 2024-06-25 11:12:16 -06:00
Chris Thrasher
7034e40ccc Document missing parameter 2024-06-24 14:14:08 -06:00
Chris Thrasher
913021e294 Fix oversights from 2992 2024-06-24 12:51:44 -06:00
Vittorio Romeo
cede2def8b Simplify/optimize sf::AudioResource implementation 2024-06-24 15:27:34 +02:00
Chris Thrasher
14cff7406f Disallow construction from const T&& 2024-06-23 16:55:37 -06:00
vittorioromeo
86c1a71a93 Remove default empty state of sf::Event 2024-06-23 19:11:10 +02:00