Commit Graph

412 Commits

Author SHA1 Message Date
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
f973069afb [Linux] Load dbus libraries dynamically. 2022-07-29 11:19:19 +03:00
51c5ba9da7 [Linux] Replace fontconfig wrapper with a one generated from the older library version (2.12.6, Ubuntu 18.04 LTS). 2022-07-29 08:55:19 +03:00
9ced8bcca3 Load fontconfig libraries dynamically. 2022-07-27 21:07:21 +03:00
f86448520a Fix Linux build without fontconfig. 2022-07-27 17:21:04 +03:00
cc5135959b Merge pull request #62973 from bruvzg/sysfont_support 2022-07-27 13:38:30 +02:00
e53ae13178 Split up editor export code into multiple files 2022-07-26 08:28:19 -05:00
ba2cffc575 Merge pull request #63096 from aaronfranke/exp-template-names 2022-07-26 10:28:25 +02:00
36ef8f29dc Implement support for loading system fonts on Linux, macOS / iOS and Windows. 2022-07-26 08:38:05 +03:00
90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
8b5c744f95 Update export template names for Windows, Mac, and Linux 2022-07-22 18:40:59 -05:00
f37990ed77 Merge pull request #63278 from akien-mga/scons-linux-refactor-linker 2022-07-22 11:40:10 +02:00
ed926c4ec1 Merge pull request #63303 from hansemro/x11-eraser-case-insensitive
[X11] Do case-insensitive search for pen inversion detection
2022-07-22 09:17:04 +02:00
0f5436098b [X11] Do case-insensitive search for pen inversion detection 2022-07-21 19:25:22 -07:00
c8479c0d4d SCons: Refactor Linux linker options with linker=<bfd|gold|lld|mold>
The new option is `linker` and lets the user specify the argument to
the`-fuse_ld=` linker flag directly. The supported options are:

- `default`: No change, typically uses GNU ld (bfd) unless the user or
  distro picked a different default `/usr/bin/ld`.
- `bfd`: GNU ld from binutils
- `gold`: GNU gold from binutils
- `lld`: lld from LLVM
- `mold`: mold, an extremely fast modern linker, not (yet) intended for
  use in production but great for development speed. Provided by distro
  `mold` package or needs to be compiled from source and installed to
  `/usr` otherwise.

Removes the `use_lld=yes` option, and make lld actually usable with GCC
too.

Not all the above are compatible or recommend for LTO, we recommend
using GNU ld with GCC LTO, or lld with LLVM ThinLTO.
2022-07-22 01:00:35 +02:00
a21f8b7c13 Improve linuxbsd headless building, cleanup build scripts
Now the `linuxbsd` platform can be built headlessly (e.g. without X11
development libraries).

I also cleaned up some weird (old?) usages of the `env` variable which
seem to make no difference and are used nowhere else.
2022-07-20 19:48:35 +02:00
f035e7844f Remove -pipe from LINKFLAGS
For some reason this fixes the CI from going OOM.
2022-07-20 19:04:31 +02:00
7c005ba723 Improve DisplayServer.window_set_current_screen
Prevent unnecessary fullscreen toggle animation on macOS, when screen is not changed
Fix window position on Linux/X11
2022-07-19 12:26:11 +03:00
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
a194043ea8 Check if GL manager exist to prevent crash when using multithreaded renderer with Vulkan. 2022-07-06 09:56:47 +03:00
344b42703b Merge pull request #62212 from hansemro/eraser-detect-4
Add inversion/eraser-end property for tablet pens
2022-07-04 21:48:19 +02:00
6dcc9d1131 [macOS, Windows, X11] Add stylus inverted/eraser support to
InputEventMouseMotion event
2022-07-04 10:36:53 -07:00
b221eab426 Variant memory pools
Memory pools via PagedAllocator for Transform2D, Transform3D, Basis and AABB.
2022-07-04 12:01:46 +01:00
d38d76d039 Fix exit code of --help and --version, and test them in CI
Corrects prior regression which caused ERROR output and exit code of 1.
2022-07-02 01:17:35 +02:00
aadf831a67 Properly check for fullscreen toggle made through the Window Manager
Fixes #40007.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-06-30 12:14:46 +02:00
42e619c01e Adding function key support from F17 to F35
OSX supports everything by default,
Linux is also capable of supporting every function key,
Windows as I know support only up to F24
2022-06-16 19:38:21 +02:00
e00571b194 Add readable export errors. 2022-06-08 17:55:46 +03:00
40b3be7912 Remove mouse events that closed the popup from queue, to fix pop-up reopening. 2022-06-02 08:35:27 +03:00
9c2b5ae5ce [Editor] LinuxBSD export reports Linux as OS name.
This is in line with what's reported by the `OS` class on GNU/Linux, and
is required by the extension exporter to identify the correct library.

For BSD, we should either finish splitting the platform (into
platform/bsd) or register a separate exporter with OS name BSD and
proper templates detection.
2022-05-24 12:01:34 +02:00
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
652adcd5bf Basic 3D rendering 2022-05-12 10:37:27 -07:00
c366f8d2d4 Crash handler: Use print_error to include backtrace in logs 2022-05-05 12:22:56 +02:00
c893302ca1 Read and store joypad events in a separate thread on x11 platform 2022-05-05 07:51:54 +02:00
180e5d3028 Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
652f78785b [Linux] Disable speech-dispatcher, pulse audio and udev wrapper builds, when library is not found. 2022-04-28 18:13:34 +03:00
6ab672d1ef Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.
Implement TextServer word break method.
2022-04-28 14:35:41 +03:00
504708ae21 Merge pull request #56093 from bruvzg/pck_section_load
Improve embedded PCK loading and exporting.
2022-04-27 14:29:21 +02:00
8dfa12cae7 Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
a300fb6665 Merge pull request #60523 from akien-mga/linux-pkgconfig-nixos 2022-04-27 09:41:58 +02:00
e89fc52ec6 Merge pull request #58272 from bruvzg/x11_backup_screen_info 2022-04-27 09:34:25 +02:00
07ad066420 Linux: Use pkg-config for alsa, libudev and GL too
It's not needed on most distros as those are found in standard lib
and include paths, but on NixOS they're all in non-standard prefixes,
so we need to rely on information provided by pkg-config.

Fixes #59913.

Co-authored-by: David Lewis <davidalewis00@gmail.com>
2022-04-26 09:37:28 +02:00
c0cc41d6c1 Improve embedded PCK loading and exporting.
Windows export process:
  Limit size of executable with embedded PCK to 4 GB.
  Use "rcedit" before embedding PCK.
  Capture and process "rcedit" errors.

Windows, Linux:
  Add support for PCK loading from executable "pck" section.
2022-04-20 11:09:59 +03:00
de4c97758a Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
8b0761d1fd Fix sub-menu keyboard navigation. 2022-04-13 09:58:38 +03:00
4bf99f4af2 Narrow FileAccess scope to prevent deadlocks. 2022-04-12 10:54:39 +03:00
9381acb6a4 Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
f851c4aa33 Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
b79721fede Merge pull request #59908 from bruvzg/fix_popup_close_race
Fix a possible race condition on popup close, that might cause multiple deletions of the same list item.
2022-04-06 08:35:56 +02:00