Commit Graph

2483 Commits

Author SHA1 Message Date
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
zakinadhif
253a4abad4 Replace c-style casts & fix implicit conversion warnings. SFML/SFML#2297 2022-12-15 13:12:56 -07:00
Chris Thrasher
ed6d944810 Always trigger drmModeSetCrtc 2022-12-13 21:52:42 -07:00
Chris Thrasher
866dbee8cb Add DRM utilities to sfml-window 2022-12-13 21:52:42 -07:00
Chris Thrasher
07bf6f8c12 Add option for enabling DRM 2022-12-13 21:52:42 -07:00
Chris Thrasher
75b0c3a9a1 Disable warnings as errors for Clang on Windows 2022-12-12 12:09:51 -07:00
Chris Thrasher
fa2e61b9d5 Lock CI jobs to Ubuntu 20
Recently GitHub updated the ubuntu-latest images to point at Ubuntu
22 which broke CI for ths 2.6.x branch so let's stick to Ubuntu 20
until we can sort out what was failing.
2022-12-12 12:09:51 -07:00
Bruno Van de Velde
c744369552 Use Per Monitor Aware instead of System Aware for DPI scaling on Windows 2022-11-15 22:38:52 +01:00