Commit Graph

2440 Commits

Author SHA1 Message Date
Shane Whitmire
86285c5378 Fix macOS resize bug
There is a commit up for the macOS resize bug where we get rid of a
previous fix entiry and just resize, but kimci86 stated that he found
better behavior with this solution. I'm going to put up this for code
review and we can compare it to https://github.com/SFML/SFML/pull/2538
and see which we like best
2023-07-30 14:56:03 -06:00
Chris Thrasher
429bde6648 Don't specify standard library on macOS
libc++ is already the default and GCC can't even be used so there's
no circumstance where we'd need to explicitly tell Clang to use
libc++. I confirmed that even with this removed, libc++ headers are
still being used and found.
2023-07-22 20:57:55 -06:00
Chris Thrasher
932309f238 Upgrade Checkout action
Fixes some deprecation warnings
2023-07-22 11:28:29 -06:00
Lukas Dürrenberger
25920bb6d7 Ensure that the OpenGL extensions have been loaded 2023-07-04 23:53:26 +02:00
Chris Thrasher
a19f996a11 Remove C++11 header 2023-06-27 09:54:43 -06:00
Chris Thrasher
1f23f7818e Don't override CMAKE_MODULE_PATH
The Conan package for SFML has to fix this so apparently it's a
real world problem.
2023-06-23 10:14:21 -06:00
Chris Thrasher
e9e25d52bc Loosen restrictions on unrecognized compilers
A core tenet of CMake is the idea that you can use any valid C++
compiler. By enumerating all supported compilers and emitting and
hard error when an unrecognized compiler is detected, we are violating
that tenet.

Relaxing this message from a fatal error to merely a warning continues
to communicate to users that their build may not succeed but it leaves
the door open for the build to potential succeed if the compiler meets
all of our requirements.
2023-06-22 16:26:26 -06:00
Lukas Dürrenberger
11b73743c4 Update changelog with all changes for 2.6.0
Highlights:
- Support for Scancode
- Create windows without OpenGL context
- Create windows with a Vulkan context
- SFML supports macOS arm64 also known as M1 chipset
- Unit testing foundation
2023-06-20 23:44:57 +02:00
Lukas Dürrenberger
f47403ab4d Update version number to 2.6.0 2023-06-20 23:44:57 +02:00
Lukas Dürrenberger
8a8348ebeb Replace C++11 with SFML int types 2023-06-20 07:38:54 +02:00
Shane Whitmire
a08cdadcb1 Fix 2.6.x failing to compile on gcc 13.1.1 because of missing headers
I was getting this error until I added this header:
/home/dogunbound/SFML/SFML/src/SFML/Audio/SoundFileReaderMp3.cpp:68:23:
error: ‘uint64_t’ is not a member of ‘std’;

This is a fix
2023-05-15 20:41:01 -06:00
kimci86
a21c3c101c Configure doxygen STRIP_FROM_INC_PATH option
so that include directives are correct in the generated documentation.
2023-04-11 22:33:57 +02:00
binary1248
541e83ed12 Disable stringop-overflow warning when including minimp3 since it produces false positives. 2023-04-01 23:21:38 +02:00
Lukas Dürrenberger
2151ea5c1d Align search box styling with the doc style
- Update doxyfile.in file to v1.9.6
- Add additional search box CSS overrides
2023-03-28 22:46:04 +02:00
Chris Thrasher
1bb494f4c0 Upgrade to stb_image 2.28 2023-03-23 19:11:24 -06:00
Chris Thrasher
6aaf132d41 Add support for installing with static libs when using DRM 2023-02-09 20:12:43 -07:00
Chris Thrasher
04483c58d9 Build sfml-main with position-independent code 2023-02-08 14:37:17 -07:00
Chris Thrasher
8a307df494 Update copyright year 2023-01-24 08:46:30 +01:00
Lukas Dürrenberger
e82d20c291 Change formatting and implement suggestions 2023-01-20 16:32:59 +01:00
kimci86
59a93ff737 Fix virtual code translation to text for dead keys on macOS 2023-01-20 16:32:59 +01:00
kimci86
752955c6f8 Rename Key::Tilde to Key::Grave 2023-01-20 16:32:59 +01:00
kimci86
722838d590 Generate key events for caps lock when the modifier state changes
This is not accurate because modifier state and key state are not the
same thing for caps lock, but at least some events are generated
instead of nothing.
2023-01-20 16:32:59 +01:00
kimci86
1cbd6e9d12 Revamp the macOS implementation of scancodes
- Describe keys in separate words when applicable on macOS
- Use "Option" instead of "Alt" to describe keys on macOS
- Filter key up events like key down events
- Use localize to generate keyboard events
  That is better than translating to text because several keys can
  generate the same text.
- Add fallback mapping for NumpadEnter
- Handle swapped virtual key codes with ISO keyboard
2023-01-20 16:32:59 +01:00
Lukas Dürrenberger
89ea3af65e Add mapping notification support for X11 2023-01-20 16:32:59 +01:00
kimci86
aba54925d8 Add initial dummy scancode implementation on Linux (DRM) 2023-01-20 16:32:59 +01:00
kimci86
a717ce66e1 Improve description for NumpadDivide 2023-01-20 16:32:59 +01:00
kimci86
b6606ad60a Fix missing description for NumpadMinus 2023-01-20 16:32:59 +01:00
kimci86
7cf6d72633 Avoid overwriting key to scancode mapping 2023-01-20 16:32:59 +01:00
kimci86
914ae374ff Silence clang warnings about Scancode enumeration 2023-01-20 16:32:59 +01:00
kimci86
b354f7f7ee Scancode renaming leftover 2023-01-20 16:32:59 +01:00
Lukas Dürrenberger
5dbe85bfec Use a nested struct instead of a prefix 2023-01-20 16:32:59 +01:00
kimci86
08d1095314 Make getKeyFromEvent more robust for Decimal (Numpad) 2023-01-20 16:32:59 +01:00
kimci86
1754f24609 Fix description for dead keys 2023-01-20 16:32:59 +01:00
kimci86
7f5e7205c4 Improve scancodeToKeycode mapping 2023-01-20 16:32:59 +01:00
kimci86
3d62999485 Make right Alt key work on X11 2023-01-20 16:32:59 +01:00
Lukas Dürrenberger
39b8d67262 Align and fix mappings and general logic
- Aligned mappings
  - ScanDash -> ScanHyphen
  - Numpad keys include Numpad
  - *Equals -> *Equal
  - Key 29/42 are Backslash
  - Key 45 is Non-US Backslash
  - Add additional media & more scancodes
  - Rename ScanAgain to ScanRedo
  - Rename ScanMute to ScanVolumeMute
  - Add the missing F-key mappings for macOS
  - Fix mapping in Windows code
  - Correctly handle numpad keys on Windows for isKeyPressed
- Refactorings
  - Use mapping for Linux from different key config
  - Refactor some mapping code
  - Fix map initialization
  - Layout independent keys also don't have unicode characters, so it
    makes more sense to translate them first and use unicode as fallback
  - Fix iteration limits on Windows
  - Consistently use 'Scancode' instead of 'ScanCode' everywhere
  - Use 'delocalize' instead of 'unlocalize'
  - Fix conversion warnings
  - Remove unused mapping function
  - Hide parameters for non-applicable iOS functions
- Update documentation
- Add Android InputImpl scancode function stubs
2023-01-20 16:32:59 +01:00
Elias Daler
5bf4982239 Align key mappings & refactorings
- Changed getDescription output: Alt -> Meta, System -> Super
- Correct initialization of mapping arrays
- Added "ReverseSolidus" support
- Swap ScanEnter and ScanReturn
  (ScanEnter = Numpad Enter, ScanReturn = Keyboard Enter)
- Better descriptions for some keys
  (e.g. "Shift (Left)" -> "Left Shift")
2023-01-20 16:32:59 +01:00
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
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
dan
3ae6848727 Update x11 sf::Cursor::Hand to use xc_hand2 instead of xc_hand1, in order to be consistent with windows and macos 2022-12-27 11:32:23 +01:00
kimci86
37db7a83f3 Update Catch to v1.12.2 with latest bugfixes
It solves compilation errors with GCC 11.3 on Ubuntu 22.04
2022-12-22 08:37:50 -07:00