Commit Graph

546 Commits

Author SHA1 Message Date
thfrwn 204f3bd58d TTS_Linux: Fix size_t template issue on OpenBSD by using int consistently
(cherry picked from commit a0253e593c)
2024-01-23 16:54:02 +01:00
Mario Liebisch 5bb54d3184 Updated compiler version detection
This fixes multiple issues/inconsistencies around  `get_compiler_version()`:
* With no shell allocated, launching the compiler could fail even
  with proper paths being set.
* The return value was described as "an array of version numbers as ints",
  but the function actually returned a `Dictionary` (or `None`).
* Not all calls were properly handling a `None` return value in case of errors.
  On Windows this broke compiling for me since #81869 with default settings.
* Some calls defined inconsistent defaults/fallbacks (`0` or `-1`).

(cherry picked from commit 426e18fd37)
2023-10-24 17:08:57 +02:00
PorkrollPosadist f5130502be Use EWMH for DisplayServerX11::_window_minimize_check() implementation
(cherry picked from commit 5666656d42)
2023-10-19 21:49:00 +02:00
bruvzg 02c6d985b8 Fix native popups auto-closing when interacting with non-client area.
(cherry picked from commit e26a6c36c8)
2023-10-19 21:45:11 +02:00
Rémi Verschelde df0ebc6dfc
SCons: Fix Python 3.12 SyntaxError with regex escape sequences
(cherry picked from commit b362976504)
2023-10-03 20:45:35 +02:00
bruvzg 21da3f3847 [X11] Do not fail DisplayServer init if non-essential extensions are missing.
(cherry picked from commit acff87ffda)
2023-09-21 15:28:23 +02:00
Eoin O'Neill 58ff96b8b7 Prevent double input events on gamepad when running through steam input
During GDC and general testing on Steam Deck units, we found that single
gamepads would often register inputs twice under certain circumstances.
This was caused by SteamInput creating a new virtual device, which Godot
registers as a second gamepad. This resulted in two gamepad devices
reporting the same button presses, often leading to buggy input response
on games with no multi-device logic and other-wise could cause intended
Steam rebindings to not work as intended (for example, swapping o and x
on a playstation pad if that feature isn't supported by the game.)

SDL gets around this by taking in a list of devices that are to be
ignored. When valve sees a controller that wants to be rebound via
SteamInput, they push a new VID/PID entry onto the environment
variable `SDL_GAMECONTROLLER_IGNORE_DEVICES` for the original gamepad
so that all game inputs can be read from the virtual gamepad instead.

This leverages the same logic as we are already using SDL gamepad
related HID mappings.

(cherry picked from commit 8de98dbf21)
2023-09-21 14:57:13 +02:00
Rémi Verschelde 8be838481d Allow unbundling OpenXR (for Linux distros)
Copy XrMatrix4x4f_CreateProjectionFov to our OpenXRUtil, instead of relying
on a private header.

(cherry picked from commit 34a07b81ae)
2023-09-20 22:44:05 +02:00
Rémi Verschelde cdce948473 Fix GCC -Wmaybe-uninitialized warnings
(cherry picked from commit efdff9cbc2)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 30ab0e2cf4 Fix Linux `move_to_trash` wrongly reporting files as not found
We can't rely on the error code from `gio` or `kioclient5`, in my
rudimentary testing they return `1` for both missing files and other
situations like not having a Trash can on the mounted volume.

Fixes #79108.

(cherry picked from commit a6e75f3971)
2023-07-11 12:21:28 +02:00
Rémi Verschelde 6ec2d6d7d0 Linux: Fix build with `use_sowrap=no` and various warnings/errors
(cherry picked from commit dcd16a5750)
2023-07-11 12:21:28 +02:00
Rémi Verschelde 4c1c26979b Linux: Link libsquish directly when unbundling, .pc file unreliable
(cherry picked from commit b3b4f4c1c9)
2023-07-10 17:46:08 +02:00
Rémi Verschelde da1e511f11 Linux: Allow unbundling brotli to use system library
(cherry picked from commit 153c4a4c4f)
2023-07-10 17:11:22 +02:00
Rémi Verschelde 90446fe9f3
SCons: Move platform logo/run icon to `export` folder
Follow-up to #75932.
Since these icons are only used by the export plugin, it makes sense to
move them and generate the headers there.

The whole `detect.is_active()` logic seems to be a leftover from before
times, as far back as 1.0-stable it already wasn't used for anything.

So I'm removing it and moving the export icon generation to
`platform_methods`, where it makes more sense.
2023-06-20 13:16:37 +02:00
Rémi Verschelde 356a602186
Merge pull request #74511 from AThousandShips/win_cursor_fix
Fix clearing custom cursor
2023-06-20 00:00:57 +02:00
Rémi Verschelde 01e84b1da1
Merge pull request #67158 from amoriqbal/fix_error_message
Fix the conditions for firing 'No such file or directory' error on Linux `move_to_trash`
2023-06-19 10:26:50 +02:00
bruvzg 28db3c7158 [DisplayServer] Add method to check if native window is focused. 2023-06-16 10:27:52 +03:00
Danil Alexeev 2d2b2cadfa
Fix `bsd` feature tag includes only "other BSDs" 2023-06-15 16:25:18 +03:00
RedworkDE 5c57b3aba4 Fix docs after renaming export option 2023-06-12 23:59:55 +02:00
Rémi Verschelde 54a8adfd50
Merge pull request #75984 from KoBeWi/ConsoleMcWrap
Rename console script to wrapper
2023-06-12 22:54:24 +02:00
Rémi Verschelde 9e4315bb50
Style: Harmonize header includes in platform ports
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module should be included with relative
paths (relative to the root folder of the modular component, e.g.
`platform/linuxbsd/`), in their own section before Godot's "core" includes.

The `api` and `export` subfolders also need to be handled as self-contained
(and thus use relative paths for their "local" includes) as they are all
compiled for each editor platform, without necessarily having the api/export
matching platform folder in the include path.
E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp`
and those need to use relative includes for it to work.
2023-06-08 15:19:19 +02:00
Rémi Verschelde 2ae5a0704a
X11: Fix vformat ambiguous int types for GCC 10 (again) 2023-06-07 14:57:51 +02:00
MJacred 2c5e2196bd Replace get_rendering_device() call to prevent crashes on OpenGL.
And make OpenGL video adapter info align with Vulkan.
2023-06-06 23:29:36 +02:00
Rémi Verschelde 0010b34a37
Merge pull request #75099 from mxnemu/add-default-x11-error-handler
[Linux/X11] Add a default error handler for X11 to avoid crashes.
2023-06-05 18:04:49 +02:00
nee b13c82e964 [Linux/X11] Add a default error handler for X11 to avoid crashes.
The default behaviour for X11 is to crash even on non-fatal errors
when there is no error handler set. This change allows the window to
stay open and may enable users to save their work when things go
wrong.

This acts as a workaround for #65425 and #68471
2023-06-05 17:28:21 +02:00
bruvzg e15f37945b
[Linux/TTS] Cache TTS voice list. 2023-06-02 14:00:52 +03:00
Yuri Sizov c670c4334a
Merge pull request #65902 from MJacred/editor/copysysteminfo
Add an editor option to copy system info to clipboard
2023-05-27 20:11:54 +02:00
MJacred 9e5bf3d589 Copy system info to clipboard + Update bug_report.yml
plus minor static-related fixes
* linuxbsd: get_systemd_os_release_info_value() -> static breaks usage if used multiple times
* windows/linuxbsd: get_video_adapter_driver_info() writes info into static
* linuxbsd: get_distribution_name() + get_version() -> write bsd fallback into static variable
* windows/uwp/android: remove unnecessary use of static
2023-05-27 18:21:23 +02:00
Riteo 51dfdfab96 Build `JoypadLinux` sandbox detection method only with udev
Fixes an `unused-function` warning when building with `udev=no`.
2023-05-25 04:47:43 +02:00
Rémi Verschelde 9dc286967f
X11: Fix vformat ambiguous int types for GCC 10
The build would fail with GCC 10 from our Linux SDK used for official builds.
2023-05-23 11:27:28 +02:00
bruvzg 5b9984b5a2
Add `audio/general/text_to_speech` project setting to enable/disable TTS. 2023-05-18 20:16:03 +03:00
Rémi Verschelde 265c70a369
Merge pull request #75142 from bruvzg/scr
[DisplayServer] Implement screen_get_image method for LinuxBSD/X11, macOS and Windows.
2023-05-16 10:48:16 +02:00
Rémi Verschelde 788cb74cc6
Linux: Don't use udev for joypad hotloading when running in a sandbox
udev doesn't work in sandboxes, notably the new Steam container runtime
as found notably on the Steam Deck, and in Flatpak/Snap packages.

Like SDL does, when we detect such a containerized environment, we fall
back to parsing `/dev/input` directly.
See smcv's comments in #76879 for details.

Fixes #76879.
2023-05-12 11:30:16 +02:00
Rémi Verschelde 258fabdbb3
Merge pull request #76836 from Faless/tls/system_certs
[TLS] Add support for platform-specific CA bundles.
2023-05-12 11:17:31 +02:00
Rémi Verschelde 1c07717d3e
Merge pull request #76974 from dsnopek/linuxbsd-feature-tags
Fix 'linux' and specific BSD feature tags
2023-05-12 10:06:08 +02:00
Rémi Verschelde 03053eaf19
Merge pull request #76957 from Riteo/dbus-check
Check DBus loading status before attempting to detect its version
2023-05-12 10:04:33 +02:00
Fabio Alessandrelli 6fd9982358 [TLS] Add support for platform-specific CA bundles.
Adds a new OS::get_system_ca_certs method which can be implemented by
platforms to retrieve the list of trusted CA certificates using OS
specific APIs.

The function should return the certificates in PEM format, and is
currently implemented for Windows/macOS/LinuxBSD(*)/Android.

mbedTLS will fall back to bundled certificates when the OS returns no
certificates.

(*) LinuxBSD does not have a standardized certificates store location.
    The current implementation will test for common locations and may
    return an empty string on some distributions (falling back to the
    bundled certificates).
2023-05-12 09:58:23 +02:00
David Snopek 87fcee2d7f Fix 'linux' and specific BSD feature tags 2023-05-11 16:58:52 -05:00
Riteo a7542070ae Check DBus loading status before attempting to detect its version
Fixes two related segfaults caused by running the DBus version check
unconditionally and potentially calling null function pointers.

This was clearly an oversight as all the other wrappers have proper
loading status checks.
2023-05-11 19:29:10 +02:00
Ninni Pipping 71ee65dc57 Enable shadow warnings and fix raised errors 2023-05-11 16:00:59 +02:00
Rémi Verschelde 0c7c35bdc6
Merge pull request #76924 from stolk/fixuninit
x11: Do not use uninitialized timestamps.
2023-05-11 11:48:23 +02:00
Rémi Verschelde a1db628eb3
Merge pull request #76856 from HolonProduction/macos-specific
Don't expose macOS and iOS specific display servers.
2023-05-11 11:47:58 +02:00
HolonProduction ddcb2d157d Don't expose mac specific display server. 2023-05-11 11:02:08 +02:00
Bram Stolk 7a2e350d2b x11: Do not use uninitialized timestamps.
Fixes #76922
2023-05-10 11:27:14 -07:00
Christopher Foo e4d052e284
Ensure WindowData minimized/maximized are mutually exclusive
The window manager can break the assumption that
fullscreen/maximized/minimized values are mutually exclusive.
2023-05-08 20:23:45 -04:00
Juan Linietsky 273a6eeb66 Redo how the remote filesystem works
Instead of reading files over the network, the new version uses a local file cache and only updates files when it changes.

The original remote filesystem was created 14 years ago, when ethernet was faster than hard drives or even flash. Also, mobile devices have a very small amount of storage.
Nowadays, this is no longer the case so the approach is changed to using a persistent cache in the target device.

Co-authored-by: m4gr3d
2023-05-08 11:57:54 +02:00
Rémi Verschelde 8f7b09916d
Merge pull request #76026 from YuriSizov/editor-running-up-that-gui
Extract editor run toolbar into its own component
2023-04-26 12:15:29 +02:00
bruvzg 628f3b2f79
[OS] Implement and expose to scripting APIs `get_memory_info` method instead of old `get_free_static_memory`. 2023-04-24 14:08:55 +03:00
Hugo Locurcio 303bf247de
Add support for VRAM-compressed custom mouse cursor images
No memory is actually saved when using this, so lossless modes are
still recommended as they look better and load faster.
2023-04-21 18:01:47 +02:00
bruvzg a5128e71bb
[Export docs] Move docs to platform folders. 2023-04-20 11:02:12 +03:00