Commit Graph

4089 Commits

Author SHA1 Message Date
Rémi Verschelde 2a39a1c221
Merge pull request #57612 from maiself/improve-gamepad-detection 2022-02-08 15:22:31 +01:00
bruvzg 720fbe3101
[macOS] Fix NO_FOCUS macOS flag. 2022-02-08 13:22:03 +02:00
Rémi Verschelde 6b13056409
Merge pull request #57794 from bruvzg/x11_fs_fix 2022-02-08 10:42:18 +01:00
bruvzg 4fcc35bdfa
[X11] Fix decoration reset when returning from fullscreen mode. 2022-02-08 11:01:24 +02:00
bruvzg 8bc837453b [Windows] Fix fullscreen mode detection on window move/resize. 2022-02-08 10:36:57 +02:00
Rémi Verschelde be1adf491a
Merge pull request #57736 from TechnicalSoup/Patch-3 2022-02-07 13:58:35 +01:00
Rémi Verschelde 1694626e03
Merge pull request #57305 from bruvzg/macos_cleanup 2022-02-07 13:36:09 +01:00
TechnicalSoup 20fb34927d Fix icons for sub windows
Modify the create_sub_window method to set an icon for all sub windows, setting the icon to the same icon as the main window.

Co-Authored-By: Rémi Verschelde <rverschelde@gmail.com>
2022-02-07 23:03:10 +11:00
Fabio Alessandrelli 948e66c3d6 [HTML5] Implement JavaScript PWA update callbacks.
Allows detecting when a new version of the progressive web app service
worker is waiting (i.e. an update is pending), along a function to force
the update and reload all clients.
2022-02-06 18:53:50 +01:00
Fabio Alessandrelli cc4612277b [HTML5] PWA service worker prefers cached version.
Use an offline first approach, where we prefer the cached version over
the network one.
This forces games using PWA to always re-export the project and not just
the PCK, so that the service worker version gets updated correctly, and
the end-user cache is correctly cleared on update.
2022-02-06 18:46:22 +01:00
Rémi Verschelde 79a4d782a5
Merge pull request #57709 from jmb462/missing-sname-optimization 2022-02-06 17:03:11 +01:00
jmb462 1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
jordi 635da44ef8 Snap refresh rate to hundreths place on X11 2022-02-06 13:24:57 +01:00
Rémi Verschelde 225a3b2545
Merge pull request #57341 from bruvzg/win_multiwin_fs 2022-02-04 13:28:56 +01:00
Rémi Verschelde 2e320dcf87
Merge pull request #57617 from bruvzg/char_cleanup 2022-02-04 13:06:38 +01:00
Rémi Verschelde d235c1bb19
Merge pull request #57335 from jordigcs/display-refresh-rate 2022-02-04 11:51:07 +01:00
Rémi Verschelde 85f6151e9d
Merge pull request #54645 from rxlecky/editor-window-offset-bug-45740 2022-02-04 11:48:57 +01:00
bruvzg f4ea9cd9f3
[Windows] Add WS_BORDER flag to windows in WINDOW_MODE_FULLSCREEN mode to allow multi-window interface in full-screen.
[Windows] Add WINDOW_MODE_EXCLUSIVE_FULLSCREEN without WS_BORDER flag enabled (no multi-window support).
2022-02-04 12:08:46 +02:00
bruvzg 244db37508
Cleanup and move char functions to the `char_utils.h` header. 2022-02-04 11:35:01 +02:00
Mai Lavelle b966ca6167 Improve detection of gamepads on Linux
Some devices (Nintendo Switch Right Joy-Con) report only a right stick.
2022-02-03 22:56:43 -05:00
jordi 54dec44dba Add screen_get_refresh_rate to DisplayServer 2022-02-03 21:50:32 -06:00
Sergey Minakov eb24c91040 [iOS] Fix touch handling for overlay views
Workaround for GodotView touches being called from UIWindow on different UIView input
2022-02-03 23:52:20 +03:00
Fabio Alessandrelli 6d3d17651a Revert "[HTML5] Better engine config parsing."
This reverts commit 2f509f1b12.

Breaks closure compiler builds.
And adds a warning for future readers.
2022-02-03 19:17:51 +01:00
Rémi Verschelde c4f38813b4
Merge pull request #57577 from bruvzg/mac_export_tr 2022-02-03 15:16:46 +01:00
Rémi Verschelde e165f18ae5
Merge pull request #57350 from NeilKleistGao/master 2022-02-03 12:36:23 +01:00
NeilKleistGao 1cf2b9a44b Add warning for Windows export when rcedit is not configured 2022-02-03 16:25:00 +08:00
bruvzg 2eeff4caec
[macOS] Add empty translation files to the exported app bundle, to allow translation detection by the OS. 2022-02-03 09:56:10 +02:00
Rémi Verschelde 969780cd2d
Merge pull request #57203 from bruvzg/ios_export_fix 2022-02-02 23:14:30 +01:00
Fabio Alessandrelli 6ff753675a
Merge pull request #56771 from mhilbrunner/unacceptable
Verify custom HTTP headers, fix off by one error
2022-02-02 18:28:30 +01:00
bruvzg b84ef16aa7
[macOS] Cleanup and split Objective-C objects to the separate files 2022-02-01 16:03:04 +02:00
bruvzg 33d6d4bdf7
[macOS] Enable Objective-C ARC 2022-02-01 15:58:30 +02:00
Rémi Verschelde ea12094f19
Merge pull request #57497 from Geometror/fix-mouse-mode 2022-02-01 14:46:30 +01:00
Rémi Verschelde 5a1f42b322
Windows: Fix GCC -fpermissive error with 'pck' section workaround
Follow-up to #57450.
2022-02-01 11:33:41 +01:00
Hendrik Brucker c058361a23 Fix captured mouse mode 2022-02-01 03:49:51 +01:00
SeleckyErik d14165dae9 Simplify DisplayServerWindows pos/size message handling
Replace WM_MOVE and WM_SIZE message handling with WM_POSCHANGED instead.
This is for multiple reasons:
1) Microsoft suggest using WM_POSCHANGED is more efficient
2) RectChanged callback is only called once for most window operations
3) Simplifies message handling code
2022-01-31 18:28:48 +01:00
Rémi Verschelde f14b1441e7
Merge pull request #56548 from madmiraal/fix-53894 2022-01-31 18:08:48 +01:00
Fabio Alessandrelli 93968e1451 [HTML5] Fix gamepad samples not being properly reset. 2022-01-31 14:56:48 +01:00
Fabio Alessandrelli 2f509f1b12 [HTML5] Better engine config parsing. 2022-01-31 14:56:40 +01:00
Bartłomiej T. Listwon e4bde938a1 Prevent LTCG (MSVC LTO) from removing "pck" section 2022-01-30 16:45:28 +01:00
Nathan Franke 8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
Rémi Verschelde 83c7bf6d94
Merge pull request #57336 from bruvzg/win_con_redir 2022-01-28 15:04:09 +01:00
bruvzg 2c8511579f Fix MOUSE_MODE_CONFINED not updating area when full-screen is toggled or current screen is changed. 2022-01-28 10:15:08 +02:00
bruvzg 99a1e552ac [Windows] Disable console I/O redirection, if it's already redirected to the pipe or file. 2022-01-28 08:30:01 +02:00
Rémi Verschelde 4b36b6e92a
Merge pull request #56785 from bruvzg/nat_handles_4 2022-01-27 12:12:34 +01:00
Rémi Verschelde 203e261526
Merge pull request #57293 from mhilbrunner/windows-console-fixups 2022-01-27 11:48:53 +01:00
Max Hilbrunner 3ef5a97505 Verify custom HTTP headers, fix off by one error 2022-01-27 03:22:37 +01:00
Max Hilbrunner 9590eeebb5 Minor typo fixups to Windows console changes 2022-01-27 03:11:00 +01:00
Fredia Huya-Kouadio 6a4614ef48 Include the `godot_plugin_jni.cpp` file into the `platform/android/SCsub` file
This should resolve https://github.com/godotengine/godot/issues/57209
2022-01-26 14:50:56 -08:00
Fredia Huya-Kouadio b284dd92d3 Fix XR Android manifest metadata
- Adds the parameters for supported Meta devices, which is required to access some device specific capabilities
- Remove the 'com.samsung.android.vr.application.mode' metadata
2022-01-26 09:05:47 -08:00
bruvzg 57db989a97
[iOS] Fix iOS export with manually specified signing/provisioning data. 2022-01-25 17:13:03 +02:00
Haoyu Qiu 8be49838b3 Fix memory leak when move to trash fails on Linux 2022-01-25 18:38:13 +08:00
Rémi Verschelde 57a057f7ff
Merge pull request #56754 from madmiraal/fix-45592 2022-01-24 10:05:42 +01:00
Fabio Alessandrelli 3f93528483
Merge pull request #57074 from Faless/net/4.x_http_client_64
[Net] Fix get_response_body_length for large files.
2022-01-23 04:42:20 +01:00
Fabio Alessandrelli 18c2e734ac
Merge pull request #56977 from Calinou/web-editor-add-local-web-server
Add local web server configuration designed for web editor development
2022-01-23 04:41:32 +01:00
Fabio Alessandrelli 01e5e98312 [Net] Fix get_response_body_length for large files.
Parsing was fixed, but not the return value for the exposed getter.
2022-01-23 01:30:35 +01:00
bruvzg 3bf05c9018
[Export] Instead of removing unsupported options, hide it. 2022-01-22 22:56:58 +02:00
Omar Polo bd448e5535 Rename or refactor macros to avoid leading underscores
These are not used consistently and some can conflict with
system-specific defines.  While here, also delete some unused macros.
2022-01-20 20:29:15 +01:00
Hugo Locurcio 9ef9bfb12c
Add local web server configuration designed for web editor development
Running `npm run serve` in `platform/javascript/` will start
a web server that uses `bin/` as its root folder. This means you
can extract a compiled web editor ZIP in this folder and immediately
be able to test the web editor.

Headers required for the use of SharedArrayBuffer are automatically
added to every response.
2022-01-20 16:42:00 +01:00
Rémi Verschelde 9e0973ca23
Merge pull request #56972 from lawnjelly/warn_unused 2022-01-20 15:34:41 +01:00
lawnjelly b411a731fe Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 13:07:49 +00:00
Rémi Verschelde b6cb366884
Merge pull request #56949 from timothyqiu/has-clipboard 2022-01-20 12:09:45 +01:00
Hugo Locurcio da19898c24
Force threads when compiling web editor instead of erroring out
This makes the build process more seamless. A similar option is
already forced for initial memorywhen needed.
2022-01-19 17:07:20 +01:00
Haoyu Qiu 314f309035 Add `DisplayServer.clipboard_has()` to check clipboard content 2022-01-19 23:44:20 +08:00
Rémi Verschelde 74b110a736
Merge pull request #56825 from bruvzg/macos_fix_fullscr_multiwindow 2022-01-19 10:03:17 +01:00
Rémi Verschelde 7c771ea310
Merge pull request #47522 from madmiraal/rename-test_width-test_height 2022-01-18 13:39:57 +01:00
bruvzg d62ca0c9c0 Window management improvements.
[macOS] Fix transient windows not working in the full-screen mode.
[macOS] Fix moving transient windows to the other screen than parent window.
[macOS] Fix popup menu switch on hover.
[macOS] Use content origin rect for windows position (to ensure `DS.mouse_get_position` is equal to `DS.window_get_position` + mouse position from the input events).
[macOS] Fix incorrect input coordinates, when external display with different scaling in connected/disconnected.
[macOS/Windows] Fix moving fullscreen windows between the screens.
Add auto refocusing of the parent window, when the focused transient window is closed.
Remove redundant `DS.mouse_get_absolute_position` function (returns mouse position in the screen coordinates, same as `DS.mouse_get_position`).
2022-01-18 11:47:03 +02:00
bruvzg 8bb00a2dfd [macOS export] Implements ad-hoc signing on Linux/Windows, adds extra privacy settings, entitlements warnings and error checking. 2022-01-18 11:11:02 +02:00
Rémi Verschelde 8bdef23f7f
Merge pull request #56012 from bruvzg/wt🤎4 2022-01-17 13:26:15 +01:00
Rémi Verschelde 7176a43260
Remove property hints referencing unsupported svgz extension
The wrongly claimed support for it was removed in #49645.
See also #56862.
2022-01-17 12:40:43 +01:00
bruvzg 962d2df042
[iOS] Improve iOS icon / loading screen export.
Merge "required" / "optional" icons into a single list.
Remove "generate_missing" and automatically rescale icons / loading screens that are missing or have incorrect size.
Print warning if icon or loading screen has incorrect size.
2022-01-17 11:45:31 +02:00
Hugo Locurcio 40be15920f
Remove support for PVRTC texture encoding and decoding
On the only platform where PVRTC is supported (iOS),
ETC2 generally supersedes PVRTC in every possible way. The increased
memory usage is not really a problem thanks to modern iOS' devices
processing power being higher than its Android counterparts.
2022-01-14 21:08:22 +01:00
Rémi Verschelde 5f4e90d602
Merge pull request #56238 from madmiraal/fix-44178
Fix Actions mapped to triggers not using the full range
2022-01-14 19:59:29 +01:00
Marcel Admiraal f41c72c538 Fix Actions mapped to triggers not using the full range 2022-01-14 15:36:20 +00:00
Yuri Roubinsky 9418a2a599 Flush input events before destroying the window 2022-01-14 17:43:31 +03:00
bruvzg 89f37d4105
Add support for getting native display, window, and view handles. 2022-01-14 13:36:32 +02:00
luz paz 858bcd5058 Fix various typos
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inh,inout,leapyear,lod,nd,numer,ois,ony,paket,ro,seeked,sinc,switchs,te,uint,varn,vew`
2022-01-13 23:20:01 -05:00
Marcel Admiraal 5250cdd150 Use mouse event relative motion to calculate mouse velocity 2022-01-13 15:23:21 +00:00
Rémi Verschelde cd93bb9130
Merge pull request #56673 from winterpixelgames/bugfix-android-keystore-paths 2022-01-12 16:45:44 +01:00
Rémi Verschelde 585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
Rémi Verschelde adf8af86f8
Merge pull request #56700 from bruvzg/macos_terminal_activation 2022-01-12 11:37:37 +01:00
Rémi Verschelde dc3b2e6ea2
Merge pull request #56717 from bruvzg/macos_opengl_hdr 2022-01-12 11:35:31 +01:00
bruvzg a38f56cfc3
[macOS] Fix OpenGL color space on HDR displays. 2022-01-12 10:50:17 +02:00
clayjohn 99064d57db New OpenGL batching canvas renderer 2022-01-11 22:26:18 -08:00
bruvzg 927105692f
[macOS] Improve window activation hack. 2022-01-11 23:25:12 +02:00
Rémi Verschelde 46624388d4
Merge pull request #56322 from madmiraal/fix-42450 2022-01-11 11:33:59 +01:00
Jason Knight 3e288f65bb Android export plugin passes absolute file paths to gradle for keystores. 2022-01-10 14:34:00 -06:00
bruvzg 4e2c6c1444
[macOS export] Improve code signing/notarization options validation. 2022-01-10 13:18:59 +02:00
Rémi Verschelde a489eb853d
Merge pull request #56618 from Pineapple/uwp-qpc-tweaks
UWP: Simplify QueryPerformanceCounter usage
2022-01-08 23:40:24 +01:00
Rémi Verschelde 277a159c48
Merge pull request #56497 from Pineapple/qpc-tweaks
Windows: Simplify QueryPerformanceCounter usage
2022-01-08 23:40:01 +01:00
Bartłomiej T. Listwon 24fe82da63 UWP: Simplify QueryPerformanceCounter usage 2022-01-08 13:10:27 +01:00
Rémi Verschelde 7cb0f9d079
Merge pull request #56514 from mhilbrunner/windows-missing-inputs 2022-01-07 10:29:55 +01:00
Aaron Franke 9a0e4ea550
Fix UTC typos in UWP platform 2022-01-06 10:49:48 -08:00
bruvzg c69e0d16bc
Fix multiple missing UTF-8 decoding. 2022-01-06 14:35:22 +02:00
Marcel Admiraal ac1e7e10eb Set window to focused when created 2022-01-06 08:04:59 +00:00
Rémi Verschelde 75c06289c4
Merge pull request #56517 from bruvzg/fix_export_utf8 2022-01-05 15:08:27 +01:00
Rémi Verschelde 63d9308b4b
Merge pull request #56047 from piiertho/feature/osx-sign-directory 2022-01-05 14:38:17 +01:00
bruvzg d2573c1636
Fix decoding UTF-8 filenames on unzipping. 2022-01-05 14:31:20 +02:00
Max Hilbrunner 6a6c4f2197 Windows input: Fix wrong OEM key, add missing keys 2022-01-05 12:20:47 +01:00
Bartłomiej T. Listwon 5ba38fb208 Windows: Simplify QueryPerformanceCounter usage 2022-01-05 07:40:46 +01:00
Rémi Verschelde ba2bdc478b
Style: Remove inconsistently used `@author` docstrings
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.

`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00
Marcel Admiraal f107139979 Rename Project Window width and height settings to match their function 2022-01-04 13:59:16 +00:00
Rémi Verschelde 1d6f8ad837
Merge pull request #56438 from madmiraal/fix-56428
Fix tablet tilt values returning bad values
2022-01-03 23:48:46 +01:00
Rémi Verschelde fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
Fredia Huya-Kouadio a8a20a0e02
Merge pull request #56132 from m4gr3d/fix_android_studio_builds
Fix Android Studio builds
2022-01-03 09:19:21 -08:00
Rémi Verschelde 5e4d1c26aa
Merge pull request #56297 from Chaosus/fix_win32_cursor_resize 2022-01-03 14:00:00 +01:00
Marcel Admiraal 75a58360fd Fix tablet tilt values returning bad values 2022-01-02 12:15:14 +00:00
luz paz a124f1effe Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 01:03:58 -05:00
Marcel Admiraal 3105d9b1f3 Rename speed to velocity when it's a directional Vector 2021-12-29 15:35:26 +00:00
Pierre-Thomas Meisels 5e0e4f209a OSX: Add signing of directory structure in Library when exporting for OSX.
OSX: Add exporting of folder structure in PlugIns when exporting for OSX.
2021-12-28 14:39:42 +01:00
Yuri Roubinsky 0f83d7272c Fix cursor stucking in resize shape 2021-12-28 13:35:07 +03:00
Aaron Franke cd6ac96bbb
Remove build system code for 32-bit iOS 2021-12-22 00:44:19 -08:00
ne0fhyk 1345e66935 Fix Android Studio builds. 2021-12-21 07:41:12 -08:00
Rémi Verschelde 51c5fa48ab
Merge pull request #56039 from Rubonnek/update-detect-prime-formatting-master 2021-12-20 10:28:16 +01:00
bruvzg ea5bb8b47d
[Windows] Improve console handling and execute/create_process.
Always build with the GUI subsystem.
Redirect stdout and stderr output to the parent process console.
Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with `create_process`).
Add `open_console` argument to the `execute` and `create_process` to open a new console window.
Remove `interface/editor/hide_console_window` editor setting.
Remove `Toggle System Console` menu option.
Remove `set_console_visible` and `is_console_visible` functions.
2021-12-18 10:14:07 +02:00
Bastiaan Olij d08b28aeb0 Fix initialising of gl_manager and checking gl_manager and context_vulkan preventing crash issues. 2021-12-18 12:21:16 +11:00
Wilson E. Alvarez 3c198aecaa
Sync detect_prime_x11.cpp formatting changes from 3.x branch 2021-12-17 16:08:13 -05:00
Rémi Verschelde 33e03386b3
Merge pull request #55966 from bruvzg/wt💩4 2021-12-16 23:05:24 +01:00
Sam Lantinga 8df0baf6f5 Fixed detecting the Valve Streaming Gamepad
Fixed the GUID, and compare the contents of the GUID, not just the pointers
2021-12-16 08:52:47 -08:00
Marcel Admiraal 6e38fc4b80 Only rotate Android sensor values for sensors that need them rotated 2021-12-15 18:15:08 +00:00
bruvzg 1fdb6a99c8
[Windows] Detect new Windows Terminal and disable unsupported set_console_visible code. 2021-12-15 20:00:57 +02:00
bruvzg 6ee48afb4e
[Windows] Open a new console window for the editor instances. 2021-12-14 14:49:58 +02:00
Aaron Franke 368c0bc0ac
Misc build system fixes 2021-12-10 12:14:27 -06:00
Rémi Verschelde bdf8340e59
Merge pull request #43181 from nathanfranke/string-empty
Replace String comparisons with "", String() to is_empty()
2021-12-10 08:56:31 +01:00
Rémi Verschelde 89b8de71c0
Merge pull request #55767 from m4gr3d/config_hand_tracking_frequency_master 2021-12-09 23:04:41 +01:00
Rémi Verschelde e3b0282080
Merge pull request #55759 from m4gr3d/enable_exclude_from_recents_master 2021-12-09 23:03:10 +01:00
Rémi Verschelde 1a2cdcbcc8
Merge pull request #55737 from m4gr3d/add_min_target_sdk_configs_master 2021-12-09 23:01:30 +01:00
ne0fhyk 862c0d06fb Add support for configuring the xr hand tracking frequency mode 2021-12-09 12:25:48 -08:00
Fredia Huya-Kouadio cfa81ff32a Enable configuration of the `android:excludeFromRecents` activity attribute. 2021-12-09 08:50:47 -08:00
Nathan Franke 49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Fredia Huya-Kouadio 2e7e6502dd Add configs to specify the min and target sdk versions. 2021-12-08 09:13:07 -08:00
Luis Sanchez 40f26cb260 Fix files_dropped in HTML5 export.
(Ignore trailing slash when creating the temporary directory)
2021-12-03 20:21:39 +01:00
Rémi Verschelde 7da392bcc5
Don't return reference on copy assignment operators
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.

According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.

This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
2021-11-30 16:26:29 +01:00
Fabio Alessandrelli 470496d8d4 [HTML5] Fix multi-touch input handling.
The code to populate the input data for WebAssembly was incorrectly
overriding values when multiple touches were present due to wrong
indexing.
2021-11-30 11:10:21 +01:00
Rémi Verschelde 8f0c6ce726
Merge pull request #55347 from Faless/js/4.x_scons_emcc_abspath 2021-11-26 13:41:16 +01:00
Fabio Alessandrelli eaedc92c61 [HTML5] Use absolute path for JS lib/pre/externs.
Ensure better compatibility when emcc which may run some tools from
different paths (e.g. closure compiler).

This fixes externs include issues with modern emcc using the closure
compiler.
2021-11-26 12:44:51 +01:00
Yuri Roubinsky ab6e370a9e
Merge pull request #55344 from Chaosus/repair_error_func 2021-11-26 14:06:00 +03:00
Yuri Roubinsky a4b7de6b23 Fix console colors on Windows 2021-11-26 13:10:55 +03:00
Fabio Alessandrelli 63e2db2499 [HTML5] Fix focus (again) in Firefox's iframes.
This actually makes sense(?), when running inside an iframe the active
element might be our canvas, while the iframe itself is not active in
the parent window. Since we consume the event, the iframe does not get
focused in Firefox (but does in Chromium-based browsers), so we must
always call focus to handle such occasions.
2021-11-26 09:44:00 +01:00
Yuri Roubinsky 675111e480 Restore console window output for editor app on Windows 2021-11-25 22:06:45 +03:00
Lightning_A e078f970db Rename `remove()` to `remove_at()` when removing by index 2021-11-23 18:58:57 -07:00
Rémi Verschelde c038768379
Merge pull request #55159 from m4gr3d/add_oculus_openxr_config_master 2021-11-22 10:28:06 +01:00
Marcel Admiraal 2fa4c6498a Fix Android `get_screen_orientation()` not returning valid values 2021-11-21 12:05:25 +00:00
Fredia Huya-Kouadio 882ec0d611 Add support for OpenXR export configurations. 2021-11-20 06:10:44 -08:00
Fabio Alessandrelli 46fdba5f8b [HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.
Note, the editor build requires the mbedtls module to be manually
enabled, as it is currently needed as a ResourceUID dependency.

This will need to be addressed in a separate PR.
2021-11-19 16:59:27 +01:00
Rémi Verschelde fc9de5ba7f
Merge pull request #54499 from Faless/threads/4.x_work_pool_default 2021-11-19 09:39:21 +01:00
Fabio Alessandrelli 91dbc288cc [HTML5] Add checks to Gamepad API events.
In some conditions the events might be generated even when the `gamepad`
object is not accessible due to Security Context requirements.
This commit adds a check to avoid firing the handler in those cases.
2021-11-19 04:07:01 +01:00
Fabio Alessandrelli f13c7fc83e [HTML5] Fix input not focusing canvas.
mousedown and touchstart should focus the canvas to ensure correct
application lifecycle.
2021-11-19 04:06:55 +01:00
Rémi Verschelde e7216d4085
Merge pull request #55072 from KoBeWi/untitled_goose_project 2021-11-18 13:47:32 +01:00
kobewi f6d16d55c6 Fix data directory of unnamed projects 2021-11-18 12:31:29 +01:00
Rémi Verschelde 64d7df1e5f
Windows: Use `/bigobj` only for debug builds, breaks GCC LTO
Building `target=release` and `target=release_debug` builds with MinGW-GCC
errors when linking with LTO.

Since it's only needed for `target=debug` builds anyway (bigger objects), which
we don't build with LTO, this works around the issue.
2021-11-18 10:38:35 +01:00
Will Jordan 283e31a3e2 Fix crash on macOS (AS) when dualshock4 is removed 2021-11-17 15:13:53 +01:00
bruvzg c8037ef2e5 [macOS] Fix crash handler not printing function names on M1 Macs. 2021-11-16 08:45:34 +02:00
Rémi Verschelde 6715bc7754
Merge pull request #54992 from RandomShaper/drop_android_db_setting 2021-11-15 17:54:23 +01:00
Pedro J. Estébanez cab870e9d3 Drop pointless Android depth buffer setting 2021-11-15 11:02:01 +01:00
Aaron Franke 35b9263e5b
Fix typo in architecture name for x86_64 macOS 2021-11-12 20:46:08 -06:00
Aaron Franke 3c0fdcc8ac
Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
Rémi Verschelde 88c4380737
Modules: Make sure to include modules_enabled.gen.h where needed 2021-11-12 13:42:58 +01:00
Rémi Verschelde 7d2900e1bd
Merge pull request #54876 from bruvzg/no_captured_move 2021-11-11 14:47:13 +01:00
bruvzg f6e449a194 Make window unmovable by dragging title bar, when mouse in captured or confined mode. 2021-11-11 14:02:08 +02:00
Rémi Verschelde 2beaae4b6f
String: Remove `erase` method, bindings can't mutate String 2021-11-11 11:23:32 +01:00
Rémi Verschelde 9b6897307c
Merge pull request #54837 from akien-mga/windows-bigobj 2021-11-10 17:48:35 +01:00
Rémi Verschelde 11d1319afd
Windows: Enable `/bigobj` to increase max size for obj files
Equivalent `-Wa,-mbig-obj` for GCC/Clang.

This started being needed to compile harfbuzz in `target=debug` with MinGW/GCC,
but there doesn't seem to be any drawback to enabling `/bigobj` (aside from
losing support for pre-VS 2005 linkers, which we don't support).
2021-11-10 16:06:39 +01:00
Rémi Verschelde b727061ce0
Windows: Fix compilation warnings with GCC 11.2.1 2021-11-10 15:13:05 +01:00
Rémi Verschelde 8a15e404b2
Merge pull request #54463 from RandomShaper/fix_gl3_32bits 2021-11-09 11:55:26 +01:00
Rémi Verschelde 43ff899fa7
Merge pull request #54315 from nekomatata/x11-key-events-log 2021-11-09 00:03:12 +01:00
bruvzg 73a774d8d1 [macOS] Use pre-wait observer to keep main run loop running and redraw window during the window resize and displaying modal popups. 2021-11-08 12:35:13 +02:00
bruvzg d0490d140b [iOS export] Capture and display xcodebuild output. 2021-11-07 11:05:05 +02:00
bruvzg c8f3dd776b [Export] Read and ZIP project files in 16K chunks instead of reading the whole file at once. 2021-11-06 18:58:03 +02:00
Rémi Verschelde bf10956b7f
Merge pull request #54601 from nekomatata/x11-struts-fix-bad-window-error 2021-11-05 10:20:09 +01:00
PouleyKetchoupp 4215d694f8 Fix BadWindow X11 errors when a window is closed while processing struts
A window can be closed on the server side while processing results from
_NET_CLIENT_LIST, which causes BadWindow fatal errors by default in
XGetWindowProperty.

The only way to safely catch this case is to set an error handler to
ignore BadWindow errors while these commands are processed.
2021-11-04 09:47:18 -07:00
Rémi Verschelde 197169b92a
Merge pull request #54591 from WoLfulus/master 2021-11-04 17:45:52 +01:00
WoLfulus 3c9d7203ea
Fix dwFlags on CreateProcessW calls 2021-11-04 09:50:45 -03:00
Fredia Huya-Kouadio bd3d99ca8a Add default `minSdkVersion` and `targetSdkVersion` in the AndroidManifest.xml file 2021-11-03 21:54:19 -07:00
bruvzg 1ad14eb14b [macOS] Add support for OpenGLES3 video driver. 2021-11-02 13:11:55 +02:00
Fabio Alessandrelli 4ed1d977fc [OS] Add ThreadWorkPool default size to OS.
Some platforms (*cough* web *cough*) have hard limits on the number of
threads that can be spawned.

Currently, ThreadPoolWork (mostly used in rendering/physics servers)
will spawn as many threads as CPUs available causing exception on
machines with high CPU count.

This commit adds a new overridable method to OS that returns the default
thread pool size (still the CPU count by default), and overrides it for
the JavaScript platform so it always allocate only one thread.

We can likely improve the whole ThreadPoolWork in the future to always
allocate X amount of threads, and assign jobs to them on the fly, but
that will require some more architectural changes.
2021-11-02 04:16:00 +01:00
Rémi Verschelde 7b83039885
Merge pull request #54490 from q66/ppc 2021-11-01 23:27:21 +01:00
Daniel Kolesa 3a84a64d2f Add support for PowerPC family 2021-11-01 22:25:53 +01:00
Hugo Locurcio 665d29c16d
Fix new projects always being created with OpenGL
Only Vulkan is fully implemented for now, so OpenGL isn't available
in the project manager yet.

This also makes the rendering driver checks use lowercase names
everywhere for consistency.
2021-11-01 22:04:36 +01:00
Rémi Verschelde a000186de4
Merge pull request #41565 from nekomatata/x11-usable-screen-size 2021-11-01 18:11:57 +01:00
Pedro J. Estébanez 07adf1193d Drop broken Android 32-bit framebuffer setting for a reliable one for depth buffer 2021-11-01 14:04:24 +01:00
bruvzg 0b6b8427c8 [macOS] Add `create_instance` function to spawn editor copies.
[macOS] Modify `create_project` function to detect and run app bundles using NSWorkspace to ensure app window is registered and activated correctly.
2021-11-01 11:48:23 +02:00
Clay John 8a10bb7d0d
Use OpenGL 3.3 core profile instead of compatibility profile
- Rename OpenGL to GLES3 in the source code per community feedback.
  - The renderer is still exposed as "OpenGL 3" to the user.
- Hide renderer selection dropdown until OpenGL support is more mature.
  - The renderer can still be changed in the Project Settings or using
    the `--rendering-driver opengl` command line argument.
- Remove commented out exporter code.
- Remove some OpenGL/DisplayServer-related debugging prints.
2021-10-31 15:56:45 +01:00
Hugo Locurcio ce97ddbcb1
Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3
- Use lowercase driver names for the `--rendering-driver`
  command line argument.
2021-10-30 02:05:49 +02:00
lawnjelly e3491a3744
Add GLES2 2D renderer + Linux display manager
First implementation with Linux display manager.

- Add single-threaded mode for EditorResourcePreview (needed for OpenGL).

Co-authored-by: clayjohn <claynjohn@gmail.com>
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2021-10-30 02:05:48 +02:00
PouleyKetchoupp 85a934954d Implemented screen_get_usable_rect for X11 Display Server
Helps with fixing issues with scrolling popups not respecting screen
decorations on the display server side.

Reproduction steps for a simple use case:
- Start the editor project list
- Open the language selection popup

Support for multi-screen:
Handling decorations is supported in different ways depending on the
information the window manager provides:
- _GTK_WORKAREAS is used when available from the WM to get accurate rect
for the different screens directly (available on Gnome).
- Alternatively, strut information is used to calculate available space
for a given desktop manually (XFCE, KDE).
- As last resort _NET_WORKAREA is used. It provides one full rect for all
screens, which doesn't handle decorations on the secondary screen in all
cases.
2021-10-29 11:56:08 -07:00
Max Hilbrunner 82f88f5d56
Merge pull request #54340 from aaronfranke/time-doc
Update and fix Time documentation
2021-10-29 15:49:22 +02:00
Sean Kim 753836c373 Adds support for 'use_coverage' flag in OSX.
Based on #36572 which added support for Linux
2021-10-28 15:23:23 -07:00
Rémi Verschelde 9fb9b99cab
Merge pull request #42117 from nekomatata/x11-get-window-screen
Fix window_get_current_screen for X11 display server
2021-10-28 20:57:24 +02:00
PouleyKetchoupp b34480b645 Fix window_get_current_screen for X11 display server
This method used to check which screen contains the top-left corner of
the window (and default to the first screen in case none is found),
which is not accurate in some cases.

Now the area of overlap with each screen is calculated, so we can get
the best candidate based on the window's position.

This makes window_get_current_screen consistent with Windows platform,
and fixes an issue where popups appear on the main screen when the main
window is slightly moved outside of the desktop on the top or left.
2021-10-28 10:26:05 -07:00
Aaron Franke 2dabdda36a
Update Time documentation 2021-10-28 10:16:56 -05:00
Rémi Verschelde 0ae65472e7
clang-format: Enable `BreakBeforeTernaryOperators`
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
2021-10-28 15:57:41 +02:00
Rémi Verschelde 3a6be64c12
clang-format: Various fixes to comments alignment from `clang-format` 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 15:43:36 +02:00
Rémi Verschelde 3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Rémi Verschelde d4067e661c
Merge pull request #54326 from nekomatata/x11-fix-input-delay 2021-10-28 08:57:37 +02:00
PouleyKetchoupp ba96fc6a4d Fix input events random delay on X11
The new system based on a thread gathering events from the X11 server
was causing delays in some scenarios where some events have just been
missed at the time of processing and we're waiting for a whole frame to
check them again.

Solved by flushing again and checking for pending events at the
beginning of the process loop, in addition to events already gathered
on the event thread.
2021-10-27 15:24:09 -07:00
PouleyKetchoupp 0b17d4e57d Add KeyPress & KeyRelease events to X11 debug events logging
Compiled out by default, just used for debugging local builds.
2021-10-27 10:08:09 -07:00
Rémi Verschelde 9204a3a50e
Android: Properly validate `godot_project_name_string` for Android special chars
Fixes #52659.
2021-10-26 10:01:09 +02:00
Rémi Verschelde b2ab5cb504
Merge pull request #54045 from ConteZero/primary_clipboard_linux_fix_warning 2021-10-23 19:13:34 +02:00
ConteZero 8c48b4a7e0 Fix primary clipboard warning 2021-10-23 15:50:01 +02:00
Marcel Admiraal f80cb4dffa Fix Gradle builds not excluding excluded tasks 2021-10-23 14:13:36 +01:00
Rémi Verschelde 5f7bbc2b57
JS: Bump ansi-regex version for linter
Silences warning about a moderate security vulnerability (which doesn't affect us).
2021-10-22 23:35:51 +02:00
Aaron Franke 474d0f58f5
Add support for the RISC-V architecture
Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions)
2021-10-22 12:51:10 -05:00
Marcel Admiraal 87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
Rémi Verschelde 8748247d6f
Merge pull request #53702 from ConteZero/primary_clipboard_linux 2021-10-20 16:35:04 +02:00
Rémi Verschelde 4387f9645b
Merge pull request #52940 from groud/toast_notification 2021-10-19 09:57:13 +02:00
ConteZero 838c9d37b4 Added primary clipboard for Linux 2021-10-18 14:01:06 +02:00
Ignacio Roldán Etcheverry 5b278ad7bc
iOS: Don't embed project static frameworks/libs
Previously, files added via `add_ios_project_static_libs` where
being added as embedded frameworks. This commit fixes that.
    
Static frameworks/libs should never be embedded into IPAs.
2021-10-17 22:38:03 +02:00
Rémi Verschelde 1efe7093be
Merge pull request #53833 from akien-mga/remove-webm-support 2021-10-15 17:33:06 +02:00
Rémi Verschelde ae74e78909
Remove WebM support (and deps libvpx and opus)
We've had many issues with WebM support and specifically the libvpx library
over the years, mostly due to its poor integration in Godot's buildsystem,
but without anyone really interested in improving this state.

With the new GDExtensions in Godot 4.0, we intend to move video decoding to
first-party extensions, and this would likely be done using something like
libvlc to expose more codecs.

Removing the `webm` module means we can remove libsimplewebm, libvpx and
opus, which we were only used for that purpose. Both libvpx and opus were
fairly complex pieces of the buildsystem, so this is a nice cleanup.

This also removes the compile-time dependency on `yasm`.

Fixes lots of compilation or non-working WebM issues which will be linked
in the PR.
2021-10-15 12:09:11 +02:00
Rémi Verschelde cd21cc683a
SCons: Set `DEBUG_ENABLED` and `DEV_ENABLED` in SConstruct
They're the same for all platforms so they don't need to be repeated in all
platform definitions.
2021-10-15 10:26:58 +02:00
K. S. Ernest (iFire) Lee 8f0c056431 Fix specific warnings issues by Clang
Found by `scons dev=yes` on llvm-mingw.
2021-10-14 14:14:26 -07:00
Marcel Admiraal 95b1275197 Upgrade Android Gradle to version 7.2 2021-10-14 16:19:00 +01:00
Gilles Roudière 0587e5e018 Implement toast notifications in the editor 2021-10-14 13:30:54 +02:00
Rémi Verschelde e2dfb656f4
SCons: Add `DEV_ENABLED` defines for `target=debug` builds
This will allow adding developer checks which will be fully compiled out in
user builds, unlike `DEBUG_ENABLED` which is included in debug tempates and
the editor builds.

This define is not used yet, but we'll soon add code that uses it, and change
some existing `DEBUG_ENABLED` checks to be performed only in dev builds.

Related to godotengine/godot-proposals#3371.
2021-10-14 12:01:28 +02:00
Mark Riedesel f0dd693a08 free dbus errors when inhibiting freedesktop screensaver (prevents small memory leak) 2021-10-12 21:11:56 -04:00
Rémi Verschelde 88463c3eee
Merge pull request #53712 from CakHuri/nullptr
Replace NULL with nullptr
2021-10-12 22:30:43 +02:00
Hugo Locurcio b1b14e5fd7
Build for 64-bit ARM by default when compiling or exporting for Android
All Android devices that support Vulkan support 64-bit ARM.

This also removes NEON opt-out code for ARMv7 as pretty much all
ARMv7 devices also support NEON.
2021-10-12 16:35:49 +02:00
M. Huri 033dc4dbef Replaced NULL with nullptr 2021-10-12 20:20:19 +07:00
Aaron Franke 7e51e4cb84
Fix some LGTM errors of "Multiplication result converted to larger type" 2021-10-12 00:17:27 -05:00
ne0fhyk 431ccdb057 Pass the correct `export_format` argument to locate the assets directory when exporting. 2021-10-11 08:24:21 -07:00
Rémi Verschelde ab9c1574d0
Merge pull request #53580 from RandomShaper/improve_cache_funcs 2021-10-09 13:40:53 +02:00
Pedro J. Estébanez 007cb5ccfb Implement get_cache_path() for iOS, and improve it for Android and Windows 2021-10-09 11:13:26 +02:00
Rémi Verschelde 1f192c43b0
Merge pull request #51429 from omar-polo/fix-basename 2021-10-09 10:34:21 +02:00
Omar Polo a3384b7461 use .get_file() instead of basename(3)
On OpenBSD the compiler complains that calling basename(3) would lose
const qualifier.  basename(3) is defined as

	char *basename(char *);

and can, accorgindly to the POSIX.1, modify the passed string.

This uses the .get_file() method.  The check is necessary because
file_name could be a directory, in which case .get_file() would return
an empty string.  The .get_base_dir().get_file() idiom is already used.

The usage of get_file() and the check were suggested by theraot, thanks!
2021-10-08 20:10:26 +02:00
kobewi 92a53f9bd6 Change dragging cursor on Windows 2021-10-06 13:13:42 +02:00
Rémi Verschelde a7ba227631
Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_master 2021-10-05 21:02:27 +02:00
Fabio Alessandrelli 68616edcbc [HTML5] Refactor JS library listeners to OS. 2021-10-05 14:15:07 +02:00
Fabio Alessandrelli c494e442bc [HTML5] Refactor display/input JS library code. 2021-10-05 14:15:07 +02:00
Fabio Alessandrelli 204822ed45 [HTML5] Implement Pointer Lock API in JS library.
Removes more emscripten HTML5 library dependencies.
2021-10-05 14:15:07 +02:00
Fabio Alessandrelli 7d6c1fdb32 [HTML5] Implement window blur in JS library.
Removes more emscripten HTML5 library dependencies.
2021-10-05 14:15:07 +02:00
Fabio Alessandrelli b6315afc9a [HTML5] Implement fullscreenchange in JS library.
Removes more emscripten HTML5 library dependencies.
2021-10-05 14:15:07 +02:00
Fabio Alessandrelli b2d30c725d [HTML5] Implement mouse/touch/key events in JS library.
This makes us more independent from emscripten libraries, giving us more
control on the application lifecycle.
2021-10-05 14:15:07 +02:00
Rémi Verschelde b1c6826b9f
Merge pull request #52963 from Pineapple/WIN32_LEAN_AND_MEAN_master 2021-10-05 12:03:05 +02:00
Rémi Verschelde 3479aaa369
Merge pull request #53405 from winterpixelgames/PR-more-error-logging-release 2021-10-05 08:43:07 +02:00
Jordan Schidlowsky b78d399f91 revert 0d7409a so additional error information prints in release builds 2021-10-04 16:55:01 -06:00
bruvzg 0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
Rémi Verschelde a7011fa294
Merge pull request #52684 from Frixuu/master 2021-10-01 11:53:01 +02:00
Lightning_A c63b18507d Use range iterators for `Map` 2021-09-30 15:09:12 -06:00
Rémi Verschelde 3a19400889
Merge pull request #48685 from bruvzg/bundle_icon_4 2021-09-30 14:55:04 +02:00
Fabio Alessandrelli e2e1a5099c
Merge pull request #52809 from selgesel/patch1
Release pressed events when the window is blurred on HTML5 platform
2021-09-29 13:09:59 +02:00
Rémi Verschelde 23b51a1708
HTML5: Fix minification error with Emscripten 1.39.9
It used an old vendored version of acorn.js which seems to choke on this
trailing comma. This is not a problem for more recent Emscripten versions.

We disable the `comma-dangle` check in ESLint to prevent this issue.
2021-09-29 09:11:11 +02:00
bruvzg 911c276a1a [macOS, sandbox] Add export option to embed and sign helper executables. 2021-09-27 11:02:56 +03:00
Hugo Locurcio 6def32d643
Replace `#pragma once` by traditional include guards for consistency
`#pragma once` was used in a few files, yet we settled on using
traditional include guards instead.

The PooledList template comment was also moved to allow editors
such as Visual Studio Code to display the comment when hovering
PooledList.

`app.h` was renamed to `app_uwp.h` to be less generic for the
include guard.
2021-09-24 02:33:15 +02:00
Selgesel 5d1d9f23de Release pressed events when the window is blurred on HTML5 platform 2021-09-23 16:44:31 +03:00
Bartłomiej T. Listwon 425ed0ffe0 Add missing WIN32_LEAN_AND_MEAN 2021-09-23 10:35:00 +02:00
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
Frixuu 650e63a7ca Allow for mapping keycodes to current layout 2021-09-21 00:03:02 +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
ne0fhyk 69f890ff11 Provide a getter for the project data directory. 2021-09-15 12:52:03 -07: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
Pedro J. Estébanez dc187324be Add input buffering framework
Input buffering is implicitly used by event accumulation, but this commit makes it more generic so it can be enabled for other uses.

For desktop OSs it's currently not feasible given main and UI threads are the same).
2021-08-13 11:19:19 +02:00
Pedro J. Estébanez 7c864d41c9 Improve input event accumulation
- API has been simplified: all events now go through `parse_input_event()`. Whether they are accumulated or not depends on the `use_accumulated_input` flag.
- Event accumulation is now thread-safe (it was not needed so far, but it prepares the ground for the following changes).
- Touch drag events now support accumulation.
2021-08-13 11:19:19 +02:00
Rémi Verschelde af70288ee0
Merge pull request #51586 from m4gr3d/investigate_godot_resume_stalls_master
Resolve issue where the Godot app remains stuck when resuming.
2021-08-13 08:43:59 +02:00