Commit graph

3609 commits

Author SHA1 Message Date
Fredia Huya-Kouadio
61e41facc7 Enable granular control of touchscreen related settings 2023-04-05 10:11:53 -07:00
Fredia Huya-Kouadio
2803c471e8 Bump the target SDK version to 33 (Android 13) 2023-03-21 19:24:39 -07:00
Fredia Huya-Kouadio
f3cdff46fc Add benchmark logic
Add benchmarking measuring methods to `OS` to allow for platform specific overrides (e.g: can be used to hook into platform specific benchmarking and tracing capabilities).
2023-03-20 23:29:36 -07:00
Fredia Huya-Kouadio
e2c7d3e6c0 Fix directory access when the running app has the All files access permission 2023-03-20 09:00:48 -07:00
Chris Weber
914182ffe3
increased max touches to 32 for ios
(cherry picked from commit 54bd204377)
2023-03-06 13:48:18 +01:00
PrecisionRender
07b37b6b6c
Fix Xbox Series controller duplicate input
(cherry picked from commit e9400867b3)
2023-03-06 13:02:51 +01:00
Juan Linietsky
16757a80a8
Fix AltGR getting stuck on Windows right alt-tab
Fixes #28511.

(cherry picked from commit e01452adb0)
2023-03-06 13:01:54 +01:00
Rémi Verschelde
8edd526c2c
Merge pull request #73781 from BZ1234567890/issue-73305-b3x
[3.x] iOS: Implement missing gamepad.buttonOptions, buttonMenu, and buttonHome joy buttons
2023-03-06 12:51:57 +01:00
Rémi Verschelde
d2ac29abe3
Merge pull request #74469 from m4gr3d/configure_snapshot_publish_version_3x
[3.x] Configure maven central snapshot versions for the Godot Android library
2023-03-06 12:38:49 +01:00
Fredia Huya-Kouadio
0e2292f341 Configure maven central snapshot versions for the Godot Android library
A snapshot version is a version that has not yet been released which allows us to deploy the same transient version incrementally, without requiring projects to upgrade the artifact version they're consuming. Those projects can use the same version to get an updated snapshot version.
2023-03-06 01:29:41 -08:00
necrashter
9bdb585318
Use the new API for virtual keyboard height detection on Android, bugfix 2023-03-06 00:24:09 +03:00
BZ1234567890
0a85e4db71 iOS: Implement missing gamepad.buttonOptions, buttonMenu, and buttonHome joy buttons 2023-02-22 21:14:54 +01:00
Travis Veralrud
28b11a0785 iOS: Fix memory leak on touch input
Replaces iOS gesture with touch implementation

Fixes #66422

Remove godot_view_gesture_recognizer

It's now unused.

Remove input_devices/pointing/ios/touch_delay

Unused with removal of gesture.

Remove unused methods from interface

Implementation made obsolete in prior commit

Style conformance
2023-02-15 21:38:55 -08:00
Rémi Verschelde
8104416337
Merge pull request #73127 from akien-mga/uwp-google-angle
UWP: Fix build with Google ANGLE not supporting EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER
2023-02-13 13:09:29 +01:00
Rémi Verschelde
bd177bb1cd
Merge pull request #73126 from akien-mga/uwp-clipboard-fix
UWP: Fix app crash when `managed_object->update_clipboard()` is called
2023-02-13 13:09:05 +01:00
Fredia Huya-Kouadio
6528f984fe Fix the issue causing long-press on a selected node on the scene tree to trigger both the context menu and the rename functionality 2023-02-12 21:20:51 -08:00
Antokolos
eebc983df8
UWP: Fix build with Google ANGLE not supporting EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER
EGL_ANGLE_DISPLAY_ALLOW_RENDER_TO_BACK_BUFFER is not present in Google ANGLE,
and Microsoft ANGLE is outdated and not supported anymore.
2023-02-11 22:52:37 +01:00
Antokolos
f5693969f0
UWP: Fix app crash when managed_object->update_clipboard() is called 2023-02-11 22:50:32 +01:00
Fredia Huya-Kouadio
b04c9a71f4 Implement file provider capabilities
The previously used file sharing api was restricted after Android N causing the engine to crash whenever used on devices running Android N or higher.
2023-02-01 01:01:20 -08:00
Fredia Huya-Kouadio
aed400cce2
Merge pull request #71654 from m4gr3d/increase_scroll_bar_size_for_touchscreen_3x
[3.x] Update the size of the scrollbar for the editor on touchscreen devices
2023-01-31 21:52:03 -08:00
Fredia Huya-Kouadio
48a55ffad3 Provide a delegate implementation for the killProcess logic on Android
The implementation forwards the kill request to the Godot host for handling. If the Godot host is unable to handle the request, it falls back to the `OS_Unix::kill(...)` implementation.
2023-01-26 03:33:22 -08:00
Fredia Huya-Kouadio
e59752bcb7 Update the Godot Android Editor name from Godot Editor to Godot Editor 3
Keep things consistent with the label used for `Godot Editor 4`, and avoid user confusion regarding the different versions of the engine.
2023-01-24 05:11:08 -08:00
Rémi Verschelde
5a7997c794
Merge pull request #71838 from m4gr3d/fix_godot_editor_cropping_3x
[3.x] Update the logic to calculate the screen scale on Android
2023-01-23 22:28:32 +01:00
Jordan Schidlowsky
86945ffc78 Windows: Fix heap overflow setting native icon
Fixes #71697.
2023-01-23 10:25:44 -06:00
Fredia Huya-Kouadio
8170b7ae1e Add a theme usability setting which updates the touch area of UI elements (e.g: scrollbar) for the editor on touchscreen devices 2023-01-22 07:09:48 -08:00
Fredia Huya-Kouadio
48aedb239e Update the logic to calculate the screen scale on Android
Takes into account the ratio between the screen size and the default window dimensions.
2023-01-21 22:47:02 -08:00
Tom Beckmann
52919ff352
Fix writing value for hand-tracking V2.0 to AndroidManifest.xml
(cherry picked from commit 0116d50fdd)
2023-01-20 12:16:31 +01:00
Rémi Verschelde
8b9b488a62
Merge pull request #71722 from akien-mga/3.x-macos-sprintf
macOS: Fix sprintf deprecation warning
2023-01-20 12:13:03 +01:00
Rémi Verschelde
a297a69ac8
macOS: Fix sprintf deprecation warning
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-01-20 11:18:40 +01:00
Hugo Locurcio
badcfa2523
Expose OS.read_string_from_stdin() to the scripting API
This can be used in scripts to read user input in a blocking manner.

This also removes the unused `block` argument, which is always `true`.
2023-01-16 11:39:53 +01:00
dependabot[bot]
90132061f5
Bump json5 from 1.0.1 to 1.0.2 in /platform/web
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit a20c8443af)
2023-01-11 14:24:29 +01:00
Marius Seufzer
bf577a6c2a
iOS: Add new model identifiers for DPI metrics
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
(cherry picked from commit ee5057a42e)
2023-01-11 14:24:08 +01:00
bruvzg
456cdf84c1
[macOS] Fix stylus tilt Y direction.
(cherry picked from commit 5478f9b842)
2023-01-11 14:23:11 +01:00
Rémi Verschelde
1426cd3b3a
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".

Backported from #70885.
2023-01-10 15:26:54 +01:00
Fabio Alessandrelli
d0ba1517a7 [Web] Expose API to force file system sync. 2023-01-09 21:30:42 +01:00
Fredia Huya-Kouadio
4110d48b63 Add boot splash for the Godot Editor 2022-12-16 09:54:50 -08:00
Rémi Verschelde
6963ba631e
Fix typos with codespell 2022-12-15 12:26:59 +01:00
Dennis Ranke
55441f2301
handle ambiguous input events as touch events
there can be events can have both SOURCE_TOUCHSCREEN and SOURCE_STYLUS. handle them as touch events rather than mouse events.

(cherry picked from commit 408000752c)
2022-12-15 12:18:41 +01:00
Fredia Huya-Kouadio
de45636fd3
Upgrade Android gradle plugin to version 7.2.1
(cherry picked from commit 151233b702)
2022-12-12 14:49:23 +01:00
Fabio Alessandrelli
eda014197f
[Web] Add the "serve" and "run" scons targets.
You can now run the test HTTP server by calling:

scons p=javascript serve

If you also wish to run the browser, call instead:

scons p=javascript run

The default listen port is 8060, but can be overriden via the env
variable GODOT_WEB_TEST_PORT which must be a valid integer.

(cherry picked from commit a06602363c)
2022-12-12 14:49:22 +01:00
Hugo Locurcio
816db5c215
Replace local web server setup for web editor with a Python-based solution
This makes it easier to set up, as you always have Python installed
when building Godot. On the other hand, you don't always have Node.js
+ npm installed (and you may not want to spend time running `npm install`).

Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
(cherry picked from commit 1be1b15a57)
2022-12-12 14:49:22 +01:00
Rémi Verschelde
b0b759e6da
SCons: Cleanup DEBUG, _DEBUG and NDEBUG defines
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
  Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
  outside thirdparty code, which we usually don't intend to debug, so it
  seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
  and `release_debug` targets. This used to be set for `release` for all
  platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
  code, which was only implemented for Unix anyway, should have been
  `DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
  target as we don't want OIDN and Embree asserting all over the place.

(cherry picked from commit 26e9145c26)
2022-12-12 14:49:21 +01:00
Hugo Locurcio
06c266f231
Only support XDG directory path configuration on Linux
This also harmonizes the server code to be consistent with Linux desktop
(with warnings printed for relative XDG paths).

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-12-12 11:13:19 +01:00
Pedro J. Estébanez
0873cf0656 Keep a single, portable implementation of OS::get_processor_count()
(cherry picked from commit 6bf02c0162)
2022-12-12 14:47:37 +08:00
nyanpasu64
8f5ccfa21f Fix burning CPU with udev disabled on Flatpak
Fixes #67355.

(cherry picked from commit 0cbd1c85a9)
2022-12-12 14:42:23 +08:00
bruvzg
5978268f79 [MSVC] Use symbols from .pdb only, to avoid incorrect names in the backtrace when symbols are missing.
(cherry picked from commit d99c32668a)
2022-12-12 13:54:32 +08:00
Rémi Verschelde
b18ef4dc83 SCons: Remove redundant -fomit-frame-pointer and -ftree-vectorize
- `-fomit-frame-pointer` is included automatically by both GCC and
  Clang in `-O1` and above.
- `-ftree-vectorize` is included automatically by GCC in `-O2` and
  beyond, and seems always enabled by Clang.

Closes #66296. See that issue for a detailed investigation.

(cherry picked from commit c5c3d13dc0)
2022-12-04 20:03:06 +08:00
bruvzg
42e01da3c4
[macOS] Fix export button incorrectly disabled when using login/app password for notarization.
(cherry picked from commit aa117a128e)
2022-11-30 15:59:17 +01:00
Markus Sauermann
ccb9ffb6a3
Fix unused exitcode in macos export plugin
Fix that the exitcode is never set.

(cherry picked from commit 567a591f87)
2022-11-30 15:58:29 +01:00
bruvzg
84904da07a
[Export] Use image loader directly to avoid "resource as image file" errors.
(cherry picked from commit 908bef8eee)
2022-11-30 15:56:06 +01:00
Fredia Huya-Kouadio
d08e057194
Fix parsing of the keep_screen_on display setting
(cherry picked from commit 3c75887d41)
2022-11-30 15:52:10 +01:00
HolonProduction
477d24b6d1
Fix wrong android key mapping.
Fixes the wrong mapping of `Key::HOME`. Androids `KEYCODE_HOME` is in fact the hardware home button the right mapping is `KEYCODE_MOVE_HOME`.

Also adds mappings to keys that were not present before.

(cherry picked from commit a3f0dc5a83)
2022-11-30 15:47:30 +01:00
Riteo
d69a9f43ea
Actually set the execinfo flag on non-glibc systems
(cherry picked from commit a3b5353892)
2022-11-30 15:43:02 +01:00
Hugo Locurcio
fc4d35432e
Automatically use execinfo for crash handler on *BSD and musl-based Linux
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit 8e04bffbcf)
2022-11-30 15:43:00 +01:00
bruvzg
10073768cf
[macOS] Fix ⌘ + . + other modifier triggering twice.
(cherry picked from commit bfbbe9c1d0)
2022-11-30 15:40:12 +01:00
bruvzg
ab7765997b
[macOS] Update activation hack to work on Ventura.
(cherry picked from commit 153d06d79b)
2022-11-30 15:34:27 +01:00
Abdulrahman Al Zeidi
5ada214c51
Fix static object destructors being called on gpu selection with X11
(cherry picked from commit 5860f81c18)
2022-11-30 15:34:27 +01:00
Pedro J. Estébanez
de6b5f992b
Fix newlines not honored in Windows console
This is relevant when building with `windows_subsystem=console`.

(cherry picked from commit e14c5186e2)
2022-11-30 15:34:26 +01:00
Rémi Verschelde
86d5bb7f20
Merge pull request #68858 from bruvzg/win_regen_icon3
[3.x] Windows icon export improvements.
2022-11-28 10:16:26 +01:00
Dan
d789ad4b20 fix exporting Android APPLICATION_ATTRIBS (3.X) 2022-11-22 12:24:17 -08:00
bruvzg
44739a121e
[3.x] Windows icon export improvements.
Regenerate Windows icon on export to ensure correct icon size order.
Add support for using PNG/WebP/SVG files as an icon for Windows exports.
Allow using WebP/SVG files as icon for macOS exports.
Add option to select generated icons interpolation, and set default interpolation to Lanczos.
2022-11-20 13:02:27 +02:00
Fredia Huya-Kouadio
5aab84befb Fix 'save & restart' logic for the Android Editor 2022-11-16 03:29:40 -08:00
bruvzg
dbb52395bc
[macOS] Disable Dock and Menu in fullscreen mode. 2022-11-14 07:59:29 +02:00
Fredia Huya-Kouadio
5149311316 Add support for pointer capture 2022-11-07 08:38:28 -08:00
Rémi Verschelde
92aedd5063
Merge pull request #68190 from ztc0611/3.x-ios-promotion
[3.x] Add ProMotion/High Refresh Rate Support to iOS Exports
2022-11-03 11:34:22 +01:00
Zach Coleman
e538771d4f [3.x] Add ProMotion Support to iOS Exports 2022-11-02 22:14:34 -04:00
Zach Coleman
5e7b0e3a61 [3.x] Add iOS UI Options 2022-11-02 22:13:18 -04:00
Fredia Huya-Kouadio
be4b07c3e4 Add double_tap attribute to InputEventScreenTouch
This provides parity with the `InputEventMouseButton` allowing for proper conversion between the two events.
2022-10-20 11:56:11 -07:00
Fredia Huya-Kouadio
71c76a4ff2 Update the clean task configuration
Running `gradlew clean` will now properly delete the generated build artifacts
2022-10-18 20:37:23 -07:00
Jason Knight
6812e66f33 Change auto to default in cursor css settings. 2022-10-07 12:17:15 -06:00
Fredia Huya-Kouadio
6f153593dc
Merge pull request #66945 from m4gr3d/add_mouse_cursor_shape_support_3x
Add cursor shape support for the Android platform
2022-10-05 13:06:58 -07:00
Fredia Huya-Kouadio
46f091a803 Add cursor shape support for the Android platform 2022-10-05 12:08:54 -07:00
Jason Knight
31fe6848e8 Fix null in android keyboard handling. 2022-10-05 11:18:39 -06:00
Rémi Verschelde
6f6c8b114b HTML5: Add missing OS::get_cursor_shape() implementation
Fixes #66835.
2022-10-04 12:49:16 +02:00
bruvzg
77fc88e9a6 [Windows, 3.x] Fix WM_CHAR processing code using Unicode char instead of Virtual key. 2022-09-23 20:22:05 +03:00
Rémi Verschelde
8a6763cf74
Merge pull request #66216 from Calinou/windows-enable-ansi-escape-codes-3.x 2022-09-22 09:33:40 +02:00
Hugo Locurcio
257305c58d
Enable ANSI escape code processing on Windows 10 and later
This lets the engine and projects use the same color codes
in the terminal on all platforms.
2022-09-21 17:22:12 +02:00
bruvzg
47d2b4e732
[macOS export, 3.x] Simplify code signing options, add support for rcodesign tool for signing and notarization. 2022-09-21 10:37:25 +03:00
Ted Spikes
4356077153 Check for ios_simulator when building for x86_64
(cherry picked from commit 21f7bd0723)
2022-09-20 10:26:17 +02:00
Rémi Verschelde
d5c1baa288 SCons: Refactor handling of production flag and per-platform LTO defaults
Fixup to #63288.
See #65583 for the bug report.

Co-authored-by: Cyberrebell <chainsaw75@web.de>
(cherry picked from commit 35a15e6191)
2022-09-20 10:26:17 +02:00
Fredia Huya-Kouadio
1f23bac645 Disable menus and functionality that are not relevant on the Android Editor port 2022-09-13 07:38:07 -07:00
Fredia Huya-Kouadio
da332d69c0 Exclude small screens from the set of supported devices. 2022-09-12 08:00:23 -07:00
Fredia Huya-Kouadio
f37390cbc5 Update the versioning logic for the Godot Android Editor
This is necessary to separate subsequent uploads to the Google Play store as each upload needs to increment the version code.
2022-09-12 07:59:45 -07:00
Rémi Verschelde
953dea1227
Merge pull request #63309 from akien-mga/3.x-scons-refactor-lto 2022-09-08 11:24:54 +02:00
Rémi Verschelde
05e7275fce
Merge pull request #65365 from akien-mga/3.x-html5-emsdk-3.1.20 2022-09-08 10:11:06 +02:00
Rémi Verschelde
bfe60393f5
Merge pull request #65503 from m4gr3d/fix_invalid_project_manager_path_3x 2022-09-08 09:48:43 +02:00
Fredia Huya-Kouadio
4be7c91cd9 Fix issue causing the project manager to crash because of missing path argument
In the process, the initialization logic is updated to show an error message and gracefully close the engine when setup errors occur.
2022-09-07 14:25:22 -07:00
Fredia Huya-Kouadio
63df48a59c Enable long press, pan and scale gestures for the Godot Android Editor
Fix the bug causing the editor to crash when running the project.
2022-09-07 13:29:31 -07:00
Fredia Huya-Kouadio
440fa10246 Cleanup the Android input logic implementation 2022-09-07 13:29:31 -07:00
Rémi Verschelde
5271d69909 HTML5: Fix warning with Emscripten 3.1.20
And use that version for CI.
2022-09-05 15:37:33 +02:00
Rémi Verschelde
570e6c1730 SCons: Refactor LTO options with lto=<none|thin|full>
Adds support for LTO on macOS and Android.
Disable LTO by default on iOS even if `production=yes` is set.

Also add `linker` option to `server` platform missed in #63283.

Refactor code handling old arguments to make it simpler (breaks compat,
but is explicit enough about it and scripts are easy to fix).
2022-09-05 14:45:12 +02:00
Rémi Verschelde
0881ca5cca
Merge pull request #64778 from akien-mga/3.x-mono-uwp-unsupported 2022-08-31 21:03:55 +02:00
Fredia Huya-Kouadio
9910d4681d Additional fixes to the Android get_current_dir() implementation. 2022-08-30 10:08:30 -07:00
Rémi Verschelde
aeb70fc0e2
Merge pull request #65043 from akien-mga/3.x-cherrypicks 2022-08-30 12:51:53 +02:00
bruvzg
3a24839cb2
[3.x, macOS / iOS Export] Fix generation of duplicate locale property list files. 2022-08-30 08:16:49 +03:00
Rémi Verschelde
44af879438 Linux: Fix GNU ld detection for pck_embed linker script
(cherry picked from commit fce3602a1e)
2022-08-29 15:55:45 +02:00
Rémi Verschelde
abaa76fcf9 CI: Sync configuration with master branch
Updates various actions to latest versions:

actions/cache@v3
actions/checkout@v3
actions/upload-artifact@v3
actions/setup-dotnet@v2
actions/setup-java@v3
actions/setup-python@v4
mymindstorm/setup-emsdk@v11
2022-08-25 14:11:54 +02:00
Rémi Verschelde
59402ff8ad
Merge pull request #64631 from nathanfranke/3-ios-opaque
(3.x) iOS: Force app store icon to be opaque, use proper errors, fix memory leak
2022-08-25 08:43:14 +02:00
Rémi Verschelde
8388ea1d6b
Merge pull request #64839 from akien-mga/3.x-zstd-1.5.2
zstd: Update to upstream version 1.5.2
2022-08-25 00:51:28 +02:00
bruvzg
c4885c8be8 Use clang as assembler to ensure preprocessing is done, and add assembler "target" flag.
(cherry picked from commit e873778561)
2022-08-24 18:26:29 +02:00