Commit Graph

64 Commits

Author SHA1 Message Date
2d93e004b9 Cleanup and unify DisplayServer screen methods and documentation. 2025-06-02 08:03:48 +03:00
457299449d Introduce 'drivers/apple_embedded' abstract platform for code reuse 2025-05-19 15:37:13 -07:00
207a2b6472 Core: Integrate warning suppression macro helpers 2025-04-03 10:13:46 -05:00
4638ade13f Enable TTS on demand, instead of fully disabling it when project setting is not set. 2025-04-01 15:24:46 +03:00
512abc38b2 Remove implicit conversions from String, Char16String and CharString to data pointers. Make conversions to StrRange implicit to aid transition. 2025-01-17 17:31:58 +01:00
e1f129cb52 Support MIME types in file dialog filters on macOS and Linux. 2025-01-04 22:05:35 +02:00
9d2a4c03be Embedding game process in editor 2024-12-18 17:52:42 -05:00
0dfd18c84b [DisplayServer] Add feature flag for native file dialog access to user/res and options 2024-10-30 14:13:43 +05:30
6d14cd6ff9 Fix fallbacks to OpenGL 2024-10-28 22:57:19 +07:00
25f439c573 [DisplayServer] Implement has_hardware_keyboard method for Android and iOS. 2024-10-02 20:09:48 +03:00
3b839347df Added fallback_to_opengl3 2024-09-20 06:10:05 +08:00
2d0165574d Add Metal support for macOS (arm64) and iOS 2024-08-20 12:11:06 +02:00
32d9c93af3 Improve handling of rendering startup errors 2024-06-28 19:31:50 +02:00
714effdf07 [DisplayServer] Add error messages and descriptions to callbacks. 2024-05-28 17:36:54 +03:00
a3769c0edc Properly set window class in Wayland 2024-05-22 10:42:12 -03:00
31e7ee63f2 Fix unsafe uses of Callable.is_null()
`Callable.is_null()` is not equivalent to `!Callable.is_valid()` and
doesn't guarantee the call is valid.
2024-04-27 16:22:57 +02:00
7f52e5bd44 [iOS] Fix sensors orientation. 2024-04-23 12:59:24 +03:00
dc01658ee9 [DisplayServer] Add separate feature flags for different native dialog types. 2024-03-26 15:18:06 +02:00
c65a667924 Move global_menu_* methods to a separate NativeMenu class. 2024-03-04 23:41:41 +02:00
ee53ae28df Add method to get "base" system UI color (macOS/Windows) and system theme change callback. 2024-02-13 18:38:53 +02:00
f458943455 [macOS / iOS] Switch Vulkan init to VK_EXT_metal_surface extension. 2024-02-13 16:57:02 +02:00
73eff10c76 Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver. 2024-02-12 10:02:18 -03:00
74b03edf1e Merge pull request #82800 from Sauermann/fix-screen-mousemotion
Add screen-related attributes to mouse input events
2024-02-09 18:08:58 +01:00
4f478a55cc Merge pull request #86843 from RandomShaper/fix_null_ptr
Avoid several null-dereferences of ApiContextRD
2024-02-07 10:58:01 +01:00
d5a5dd52e8 Avoid several null-dereferences of ApiContextRD 2024-02-06 19:55:01 +01:00
2235a1cbd0 Add screen-related attributes to mouse input events 2024-02-05 23:30:15 +01:00
8406e60522 Add InputEventKey.location to tell left from right
This adds a new enum `KeyLocation` and associated property
`InputEventKey.location`, which indicates the left/right location of key
events which may come from one of two physical keys, eg. Shift, Ctrl.

It also adds simulation of missing Shift KEYUP events for Windows.
When multiple Shifts are held down at the same time, Windows natively
only sends a KEYUP for the last one to be released.
2024-01-26 14:42:28 +01:00
12a519bae2 Split RenderingDevice into API-agnostic and RenderingDeviceDriver parts
Credit and thanks to @bruzvg for multiple build fixes, update of 3rd-party items and MinGW support.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-12-20 19:18:08 +01:00
6a8f6bae4c Make screen_get_refresh_rate() respect iOS Low Power Mode 2023-11-17 08:36:52 -05:00
f18aa00e85 Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-10-08 17:23:33 +02:00
09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +02:00
e1c7104e46 [iOS] Fix build with Xcode 15. 2023-09-27 21:27:15 +03:00
Zae
428eb1309a Support dark mode on Android and iOS. 2023-09-26 11:00:04 +08:00
1887a9df19 [macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
2023-09-21 14:21:00 +03:00
28db3c7158 [DisplayServer] Add method to check if native window is focused. 2023-06-16 10:27:52 +03:00
974a7a89c6 [iOS] Fix orientation change in runtime. 2023-06-12 14:13:53 +03:00
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
5b9984b5a2 Add audio/general/text_to_speech project setting to enable/disable TTS. 2023-05-18 20:16:03 +03:00
daad4aed62 Cleanup and unify keyboard input.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
5b1df48c6c Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
1cc5524b81 [iOS] Restore OpenGLES3 renderer support. 2023-01-22 13:59:52 +02:00
68d71f88f5 Improve DisplayServer message for video card drivers failure
And remove leftover duplicated message on Android.
2023-01-17 15:41:54 +01:00
2718a7b7d3 Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
f0893890e1 Merge pull request #70482 from bruvzg/ios_pencil
[iOS] Add Apple Pencil pressure and tilt support.
2023-01-03 15:51:39 +01:00
223a612c0c [iOS] Add Apple Pencil pressure and tilt support. 2022-12-23 23:44:10 +02:00
90c34699d6 fix contentScaleFactor on iOS 2022-12-23 14:57:56 +01:00
70f6d42c92 Remove Disable Touch debug project setting
This project setting was only implemented and iOS and likely served
no purpose outside of debugging during development of engine features.

It was also located in a confusing location in the project settings
editor, as it was located below a root category (which appears in bold
and is normally not seen as clickable by users).
2022-12-17 18:47:29 +01:00
13eb0a6592 [iOS] Fix broken single line input and incorrect selection / caret position. 2022-12-12 18:16:10 +02:00
0a3f66471e Merge pull request #69712 from bruvzg/real_size
Rename `window_get_real_size`, add position counterpart.
2022-12-07 14:29:46 +01:00