Commit Graph

3517 Commits

Author SHA1 Message Date
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
vittorioromeo
db245a440f Enable standard library assertions in CI 2024-06-23 08:37:06 +02:00
Lukas Dürrenberger
0a6d44fff1 Use built-in CMake support for iOS
* Use built-in iOS support for cmake and expand tests to cover more configurations
* Adjust CI builds
2024-06-22 21:51:37 +02:00
Lukas Dürrenberger
59c4eba0e5 Update checkout action to the latest version 2024-06-22 21:51:37 +02:00
Lukas Dürrenberger
32bfb30293 Update macOS GitHub Actions images 2024-06-22 21:51:37 +02:00
binary1248
dfd14dbc1b Fixed cache state not correctly being ignored when switching between RenderTargets within a single context. 2024-06-21 21:39:55 +02:00
Chris Thrasher
f05baef521 Fix oversights from 735f2d9 2024-06-19 17:07:58 -06:00
Chris Thrasher
447e7b3844 Replace static_casts with vector operations 2024-06-19 06:24:40 -06:00
Chris Thrasher
6f5711e799 Decrease test precision to reduce flakey failures
Sometimes this job fails. Perhaps it needs to be resructured or
removed if we can't figure out how to make it more reliable.

https://github.com/SFML/SFML/actions/runs/9569223439/job/26381302304?pr=3106#step:21:137
2024-06-18 14:02:57 -06:00
Chris Thrasher
735f2d972d Replace sentinel values with std::optional 2024-06-18 12:35:29 -06:00
Chris Thrasher
8805b93c57 Work around errors with code coverage upload job 2024-06-18 11:04:39 -06:00
kimci86
eb762db342 Fix sf::VideoMode usage example 2024-06-18 06:13:15 -06:00
Chris Thrasher
d99d673330 Use std:: namespace 2024-06-17 16:10:04 -06:00
Chris Thrasher
5580720ae0 Fix inconsistent factory function name 2024-06-17 10:10:00 -06:00