Elias Daler
95f19ff478
Refactor X11InputManager and align mappings
...
- getDescription implementation for X11
- Generate KeySym -> Unicode mapping, so we don't need
to make fake events in getDescription now
- KeySym to sf::Keyboard::Key mapping
- Better names for keycode, sf::Scancode and sf::Key conversion functions
- X11InputManager doesn't need m_display now
- Move a lot of stuff into free functions
- X11InputManager now only has static members
- X11InputManager -> KeyboardImpl
- Removed redundant "sf::" where possible
- Moved some functions from sf::priv::anonymous to anonymous namespace.
- Added NullKeyCode constant for readability
2023-01-20 16:32:59 +01:00
Elias Daler
b62c0ed13f
Store pointer to Display in X11InputManager
2023-01-20 16:32:59 +01:00
jonathan.r.paton@googlemail.com
a34d48c42d
Initial Windows implementation
2023-01-20 16:32:59 +01:00
Marco Antognini
34197ba5b5
Add new API for scancodes
2023-01-20 16:32:59 +01:00
Lukas Dürrenberger
b191a0dc58
Use Scan prefix instead of 's'
...
Also use getDescription instead of localizedRepresentation
2023-01-20 16:32:59 +01:00
Marco Antognini
cabf1a3c34
Handle layout changes on macOS
2023-01-20 16:32:59 +01:00
Marco Antognini
e806048904
Add support of scancodes for macOS
2023-01-20 16:32:59 +01:00
Marco Antognini
75ef99e2ca
Add new API for scancodes
2023-01-20 16:32:59 +01:00
Norm Evangelista
144b336c17
Added readability-redundant-*, readability-simplify-* checks
...
Fixed CI complaints
Restored comment for clarity
2023-01-20 08:31:25 -07:00
Norm Evangelista
6ef8e487cc
Added readability-qualified-auto, -redundant-access-specifiers
...
Fixed clang-format escapes
Fixed OSX clang-tidy issues
Collapsed extraneous lines
Fixed clang-format escape
2023-01-19 15:53:40 -07:00
Chris Thrasher
84f56d0936
Add option for skipping tests that require an attached display
2023-01-18 16:06:00 -07:00
Chris Thrasher
b128fcd3df
Add tests for sf::Texture
2023-01-18 16:06:00 -07:00
Chris Thrasher
9265607d79
Run Linux tests with dummy display
...
This lets us test certain classes like sf::Texture which will otherwise
fail if a display is not detected.
2023-01-18 16:06:00 -07:00
Chris Thrasher
b2e918bafc
Simplify how test runner command is created
2023-01-18 16:06:00 -07:00
Chris Thrasher
88d40412d7
Enable all modernize- checks by default
2023-01-18 08:03:10 -07:00
Chris Thrasher
18e8d339e2
Add clang-tidy modernize-use-transparent-functors check
2023-01-18 08:03:10 -07:00
Chris Thrasher
a9bc4aa576
Add clang-tidy modernize-use-override check
2023-01-18 08:03:10 -07:00
Chris Thrasher
8a5b206bb8
Add clang-tidy modernize-use-default-member-init check
2023-01-18 08:03:10 -07:00
Chris Thrasher
d202f753ed
Add clang-tidy modernize-deprecated-headers check
2023-01-18 08:03:10 -07:00
Chris Thrasher
8c3f07de80
Add clang-tidy modernize-loop-convert check
2023-01-18 08:03:10 -07:00
Chris Thrasher
8dc28909d3
Add clang-tidy portability checks
2023-01-16 15:16:46 -07:00
Norm Evangelista
3745ea2336
Added readability-container-size-empty, readability-isolate-declaration
...
FIxed Windows escapes for readability-* checks
Fixed Linux DRM readability-isolate-declaration escape
Fixed typo in fix :-|
Fixed clang-format issue
2023-01-16 21:45:33 +01:00
Norm Evangelista
a4bca20567
Added modernize-use-equals-default, modernize-use-equals-delete
...
Fixed formatting issues per review
Implemented copy constructor since operator= is implemented
Reverted operator=, add NOLINT for copy constructor per review
Fixed clang-tidy escape in examples
Fixed OSX clang-tidy escapes
2023-01-14 18:12:18 -07:00
Chris Thrasher
f0119145c2
Fix Windows clang-tidy errors
2023-01-14 15:13:02 -07:00
Chris Thrasher
cab0e75503
Run clang-tidy on Windows in CI
...
Co-authored-by: Bambo-Borris <canyoufeelit4@gmail.com>
2023-01-14 15:13:02 -07:00
Chris Thrasher
ab34b9f9bf
Invoke run-clang-tidy with Python executable
...
This is required since Windows can't support she-bang scripts like
macOS and Linux were taking advantange of. This is more verbose but
ultimately the same as before.
2023-01-14 15:13:02 -07:00
Chris Thrasher
c5c6276291
Ensure clang-tidy uses color output
2023-01-14 15:13:02 -07:00
Chris Thrasher
0e8072e6cd
Hide examples, tests, and documentation from projects consuming SFML via add_subdirectory
2023-01-13 14:28:09 -07:00
Chris Thrasher
8b7429b9c0
Analyze DRM backend
2023-01-13 14:16:25 -07:00
Nikita
1f0167192b
Update to year 2023
2023-01-12 11:38:41 +01:00
Norm Evangelista
39dd630f07
Added modernize-use-nullptr check
...
Addressed review comments
Fixed Vulkan.cpp clang-tidy issues
Used default-constructed objects instead of 0
More fun with OSX clang-tidy
Try casting a nullptr to see if clang-tidy can live with it
Revert "Try casting a nullptr to see if clang-tidy can live with it"
This reverts commit e217a1d8be45e3fd27dc73e1c7043be921d3830b.
Restored deleted line
2023-01-11 17:36:16 -07:00
Chris Thrasher
badb388507
Remove unnecessary casts
2023-01-11 15:30:22 -07:00
Jim-Marsden
b2009e2fca
Changed from std::scoped_lock to std::lock_guard
2023-01-11 15:07:29 -07:00
Chris Thrasher
cdce9f7147
Use nested namespaces
2023-01-07 11:28:36 -07:00
Chris Thrasher
8a5e0f6933
Fix bug where clang-tidy CI job always passes
2023-01-06 17:17:57 -07:00
Chris Thrasher
098f6927d2
Prevent using a temporary sf::SoundBuffer
with sf::Sound
2023-01-06 15:46:22 -07:00
Chris Thrasher
2d0c923a53
Prevent using a temporary sf::Texture
with sf::Shader
2023-01-06 15:46:22 -07:00
Chris Thrasher
0c2f7da9f9
Prevent using a temporary sf::Texture
with sf::Sprite
2023-01-06 15:46:22 -07:00
Noé Lopez
0bb6303cf8
Fix typo in error message
2023-01-06 18:46:34 +01:00
Chris Thrasher
3f4bb1ae12
Prevent constructing sf::Text
with a temporary sf::Font
...
By deleting this constructor overload, it fails to compile if
you pass a temporary font to this parameter slot. That includes
code like
sf::Text text("", sf::Font());
but more importantly it prohibits code like this
sf::Font getFont()
{
sf::Font font;
// load a font...
return font;
}
sf::Text text("", getFont());
The same idea can be applied to setFont() to prevent setting fonts
from a temporary.
Credit to Jonny for the idea
Co-authored-by: JonnyPtn <jonathan.r.paton@googlemail.com>
2023-01-06 10:21:00 -07:00
Chris Thrasher
718195bf25
Mark move operators as noexcept
2023-01-04 09:49:20 -07:00
Chris Thrasher
9a4426fb35
Simplify in-class initializer expressions
2023-01-03 14:51:44 -07:00
Chris Thrasher
259b57d9b9
Use in-class member initializers
2023-01-02 16:26:51 -07:00
Jim-Marsden
34b6323929
Changed to namespace
2023-01-01 14:31:26 -07:00
Lukas Dürrenberger
bf9f59d3e3
Merge pull request #2324 from 2.6.x
...
Backmerge
2022-12-30 17:50:45 +01:00
Chris Thrasher
15cdb40fc2
Merge branch '2.6.x' into feature/backmerge
2022-12-29 22:48:49 -07:00
marwen.azouzi
5e9bb60d68
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-12-29 14:56:52 +01:00
kimci86
f0b44937ce
Update Image documentation regarding supported input formats
2022-12-29 00:08:52 +01:00
kimci86
3649fceb8b
Update stb_image to v2.27 and stb_image_write to v1.16
2022-12-29 00:08:52 +01:00
Shiv
9bdf207818
Use std::clamp
2022-12-27 17:58:49 -06:00