Commit Graph

3591 Commits

Author SHA1 Message Date
Rémi Verschelde a412011be7
Merge pull request #52842 from Ev1lbl0w/fix_win_open_errcode
Fix shell_open not returning errors on Windows
2021-09-21 11:26:58 +02:00
Rémi Verschelde bd75235b8a
Merge pull request #52649 from Faless/js/4.x_audioworklet_nothreads_pr
[HTML5] Refactor audio drivers. Implement AudioWorklet w/o threads.
2021-09-21 10:44:08 +02:00
Dan 131f5dbb54 Fix Windows cursor with trails disappearing in fullscreen
Fixed by turning off mouse trails when going into fullscreen, then restoring trails when exiting fullscreen or game
2021-09-19 21:42:56 -07:00
Ricardo Subtil c4787a8e6d Fix shell_open not returning errors on Windows 2021-09-19 11:29:56 +01:00
Rémi Verschelde ce0feeaf69
Merge pull request #52715 from Calinou/linuxbsd-vulkan-driver-reboot
Mention that rebooting is required after updating graphics driver on Linux
2021-09-16 10:26:39 +02:00
Rémi Verschelde a507a50d16
Merge pull request #52720 from Faless/js/4.x_fix_wheel
[HTML5] Fix wheel/touch callback modifying event after parse.
2021-09-16 09:42:04 +02:00
Fabio Alessandrelli 246334b836 [HTML5] Refactor audio drivers. Implement AudioWorklet w/o threads.
Performances are not great in general, bad on Firefox, on Chrome, well,
it could be an improvement. Leave it as a fallback for now, but can be
forced via project settings if desired (or custom JavaScript logic via
the "args" option).

I'm actually surprised this works, it involves so many allocations, but
there's no way around it when SharedArrayBuffer is not available :(.
2021-09-15 20:48:49 +02:00
Fabio Alessandrelli e902347a8c
Merge pull request #52695 from Faless/js/4.x_audio_mix_rate
[HTML5] Use browser mix rate by default on the Web.
2021-09-15 20:33:42 +02:00
Fabio Alessandrelli c3f5194861 [HTML5] Fix wheel/touch callback modifying event after parse.
The events should be duplicated or reinstantiated without
assuming that parse_input will consume them immediately.
2021-09-15 20:07:28 +02:00
Hugo Locurcio 7486fa9b16
Mention that rebooting is required after updating graphics driver on Linux 2021-09-15 18:34:10 +02:00
ne0fhyk 5bbfe0b5a8 Add support for Play Asset Delivery.
This only adds support for a subset of Play Asset Delivery: this causes a single install-time asset pack to always be present, but doesn't add support for dynamically downloaded asset packs.
2021-09-15 06:06:11 -07:00
Rémi Verschelde f18a6f2fd0
Merge pull request #52696 from Faless/js/4.x_worklet_rb_bug 2021-09-15 12:54:51 +02:00
Rémi Verschelde 13d2928490
Merge pull request #52282 from Calinou/scons-improve-linuxbsd-build-messages
Improve messages when compiling for Linux/*BSD
2021-09-15 12:50:39 +02:00
Fabio Alessandrelli ba08f39e47 [HTML5] Fix bug in AudioWorklet when reading output buffer.
Would attempt an out of bounds read, causing an exception.
2021-09-15 11:58:52 +02:00
Fabio Alessandrelli d187bb4e11 [HTML5] Use browser mix rate by default on the Web.
Browsers doesn't really like forcing the mix rate, e.g. Firefox does not
allow input (microphone) if the mix rate is not the default one, Chrom*
will exhibit worse performances, etc.
2021-09-15 11:56:21 +02:00
Hugo Locurcio 065c79f0df
Re-enable building position-independent executables on Linux/*BSD
This provides better security at the cost of having misleading
binary icons on some file managers.

Now that recent Linux distributions no longer allow executing
binaries by double-clicking them in a file manager (even if the
binary is set to be executable), the usability cost of PIE is lowered.
You have to use a terminal or install a `.desktop` file nowadays.
2021-09-15 01:05:27 +02:00
Fabio Alessandrelli 76a7ee88d2
Merge pull request #52604 from Faless/js/4.x_input_fix
[HTML5] Fix input not working when buffered.
2021-09-14 11:47:40 +02:00
Fabio Alessandrelli 4c6845c095 [HTML5] Fix input not working when buffered.
After input buffering was reworked, input accumulation is now handled
outside of OS, and the JavaScript plaform never implemented that.
Additionally, the JavaScript platform is quite obnoxious about calling
specific APIs outside specific user triggered events.

This commit adds event flushing during the main iteration, and forces it
during keydown/keyup/mousedown/mouseup/touchstart/touchend/touchcanel
events (effectively only accumulating only "move" events).
2021-09-12 19:07:44 +02:00
Fabio Alessandrelli 490511fcfe [HTML5] Fix build error due to missing string cast. 2021-09-12 19:07:18 +02:00
Hugo Locurcio 1513aa9b26
Add logo attribution for Android, HTML5 and Linux platform icons
- Tweak the Android platform logo to remove the Android wordmark,
  as it can't be used without explicit permission.
2021-09-11 19:34:10 +02:00
Max Hilbrunner 7ca6a0e849 Clean DisplayServerWindows and add missing guards 2021-09-10 15:56:46 +02:00
Marcel Admiraal 23311a6ed3 Use current androidx Fragment library instead of legacy libraries 2021-09-08 10:17:26 +01:00
Juan Linietsky 58388f8cec
Merge pull request #47391 from Calinou/platform-feature-tags-lowercase
Make platform feature tag names lowercase
2021-09-07 16:30:50 -03:00
Daniel Kariv 52b114bc78 fix fullscreen issue on macOS
adds a call for resize event.
2021-09-03 14:35:28 +03:00
Fredia Huya-Kouadio ebac430445
Merge pull request #52159 from m4gr3d/addoculus_openxr_
Update the AndroidManifest to enable access to Oculus OpenXR runtime
2021-09-01 21:09:28 -07:00
PouleyKetchoupp 0b681d5834 Add support for adding plugin views behind the main view on Android
Doesn't change the default behavior, but allows plugins to add their
view behind the main view, which gives more control over what happens
with inputs and can be useful along with transparent rendering.
2021-09-01 10:01:55 -07:00
Hugo Locurcio 2daaf0fdc3
Make platform feature tag names lowercase
Feature tag names are still case-sensitive, but this makes built-in
feature tags more consistent.

- `Windows` -> `windows`
- `OSX` -> `osx`
- `LinuxBSD` -> `linuxbsd`
- `Android` -> `android`
- `iOS` -> `ios`
- `HTML5` -> `html5`
- `JavaScript` -> `javascript`
- `UWP` -> `uwp`
2021-08-31 20:34:44 +02:00
Hugo Locurcio 4c5deea83e
Improve messages when compiling for Linux/*BSD
- Don't display messages when enabling PulseAudio/ALSA/D-Bus/udev
  as these become noisy in incremental builds.
- Improve warning and error messages to be more descriptive
  and consistent.
2021-08-31 16:21:42 +02:00
Fabio Alessandrelli 7ab78c4cad
Merge pull request #49598 from Calinou/web-editor-improve-download-project-source-zip-name
Improve the generated ZIP archive name when using Download Project Source
2021-08-31 02:36:02 +02:00
Wilson E. Alvarez d11c1afc04
Rename String::is_rel_path to String::is_relative_path 2021-08-29 20:41:29 -04:00
ne0fhyk 9f4aa1f5ad Update the AndroidManifest to enable access to Oculus OpenXR runtime. 2021-08-27 11:12:25 -07:00
jmb462 59116e1995 Fix bad size after restoring a minimized window under Windows 2021-08-27 14:32:52 +02:00
Hugo Locurcio 3db8359324
Merge pull request #47829 from Calinou/improve-crash-handler-display
Improve crash handler message display
2021-08-25 08:03:10 +02:00
Max Hilbrunner ca7f53dd25
Merge pull request #52001 from floppyhammer/fix-window-decor-size-on-windows
Fix window decoration size on Windows
2021-08-24 17:28:47 +02:00
floppyhammer 1a5d72bf16 Fix window decoration size on Windows 2021-08-23 10:43:34 +08:00
Aaron Franke ae1702bee5
Replace HTTP links with HTTPS for sites with HTTPS versions 2021-08-22 20:13:11 -05:00
Michael Alexsander b4cea10771
Merge pull request #49756 from Calinou/android-export-move-clear-previous-install-setting
Move the Android "clear previous install" setting to Editor Settings
2021-08-22 23:30:13 +00:00
Marcus Brummer 47f338fc12 Check if vibration duration is > 0 on Android 2021-08-21 17:33:25 +02:00
Rémi Verschelde 16f49d4b29
HTML5: Handle GODOT_VERSION_STATUS env var in @GODOT_VERSION@
Follow-up to #51002.
2021-08-19 15:01:30 +02:00
Fredia Huya-Kouadio f4222733ca Delegate handling and implementation of the restart functionality to the Godot host. 2021-08-18 10:24:42 -07:00
Fabio Alessandrelli 71fb2429a0 [CI] Upgrade Emscripten to 2.0.27.
Update Godot Javascript FS library to manually depend on ERRNO_CODES.
2021-08-18 10:30:50 +01:00
Rémi Verschelde be80d381d2
Merge pull request #50360 from m4gr3d/address_external_dir_access_master
Add support for Android scoped storage
2021-08-17 13:33:28 +02:00
ne0fhyk 3a00ff1cce Add partial support for Android scoped storage.
This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30.
In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.
2021-08-16 23:11:56 -07:00
ModProg d9e24b72f7 [android] Fixed wrong button mask for right click 2021-08-16 18:49:12 +02:00
Hugo Locurcio 719ff68fdd
Improve the generated ZIP archive name when using Download Project Source
This makes for easier organization since downloading a project
several times (or several different projects) will result in more
meaningful file names.
2021-08-16 18:33:03 +02:00
Rémi Verschelde 1057a107e0
Merge pull request #51116 from Calinou/macos-fix-xbox-bluetooth-controllers
Fix Xbox controllers in Bluetooth mode on macOS
2021-08-16 17:50:10 +02:00
Hugo Locurcio 91a5ff9dc3
Fix Xbox controllers in Bluetooth mode on macOS
This prevents the D-pad up arrow from being registered as pressed
when it isn't, and pressing any direction from activating the next
arrow clockwise of it.

Co-authored-by: Scott Wadden <scott.wadden@gmail.com>
2021-08-16 17:06:05 +02:00
Hugo Locurcio 2cdace1749
Move the Android "clear previous install" setting to Editor Settings
This means the setting now applies to every project deployed from
the editor, rather than being per-export preset.
2021-08-16 05:59:48 +02:00
Rémi Verschelde 1833c8b233
Merge pull request #51587 from Calinou/use-unicode-multiplication-symbol
Use the Unicode multiplication symbol where relevant
2021-08-13 14:27:48 +02:00
Pedro J. Estébanez e745088f1f Switch to input buffering on Android
Key, touch and joystick events will be passed directly from the UI thread to Godot, so they can benefit from agile input flushing.

As another consequence of this new way of passing events, less Java object are created at runtime (`Runnable`), which is good since the garbage collector needs to run less.

`AndroidInputHandler` is introduced to have a smaller cross-thread surface. `main_loop_request_go_back()` is removed in favor just inline calling `send_window_event()` at the most caller's convenience (i.e., leveraging the new `p_deferred`` parameter as appropriate).

Lastly, `get_mouse_position()` and `get_mouse_button_state()` now just call through `Input` to avoid the need of sync of mouse data tracked on the UI thread.
2021-08-13 11:45:50 +02:00