Commit graph

4056 commits

Author SHA1 Message Date
Marcel Admiraal
cf0f967e6d Remove duplicate Android sensor listener registrations 2022-05-23 20:33:13 +02:00
reduz
45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
Rémi Verschelde
3aa83a0235
Merge pull request #61020 from timothyqiu/wait-busy 2022-05-19 15:41:41 +02:00
Aaron Record
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
Haoyu Qiu
fc3b845c07 Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NO_EDITOR
* Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
2022-05-19 14:08:47 +08:00
Rémi Verschelde
ccdd85d8e7
Merge pull request #61001 from derammo/derammo_popup_conditional_hide 2022-05-17 12:56:53 +02:00
Rémi Verschelde
d6e7dcbea9
Merge pull request #61074 from timoschwarzer/fix-ios-vibration-duration 2022-05-16 12:00:26 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Timo Schwarzer
05d524b624
Fix vibration duration on iOS
Fixes #61063
2022-05-16 10:34:49 +02:00
Haoyu Qiu
ffd5362187 Swap the meaning of CURSOR_WAIT and CURSOR_BUSY 2022-05-14 10:13:42 +08:00
derammo
47d0dc8a41 popup deferred hide suppressed if reopened
popup no longer tries to close itself a second time
popup no longer closes after having been reopened
fixed bug in RenameDialog not calling base (by inspection)
fixes #59181
fixes #60921
reverts #59287
2022-05-13 09:30:00 -04:00
Rémi Verschelde
349aa9c884
Merge pull request #60894 from derammo/derammo_opengl3_windows 2022-05-13 15:07:13 +02:00
Hugo Locurcio
78b4ec2d4d
Increase compiler optimization when using target=release on iOS/Android 2022-05-13 01:12:20 +02:00
Rémi Verschelde
ff30a09993
Merge pull request #60643 from clayjohn/GLES3-3D 2022-05-12 21:08:02 +02:00
clayjohn
652adcd5bf Basic 3D rendering 2022-05-12 10:37:27 -07:00
reduz
8b7c7f5a75 Add a new HashMap implementation
Adds a new, cleaned up, HashMap implementation.

* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
  for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).

This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
2022-05-12 11:21:29 +02:00
derammo
96c21bc749 opengl3 driver now works on windows including multi window
fixed and simplified gl_manager_windows
swap buffers now called for all windows
fixed missing pixel format setting in additional windows
    this makes them work in OpenGL contexts
changed verbose error printing to write once
    this error message happens very frequently while opengl3 is not finished
removed dead code no longer needed after changes
fixed comments that were misinformation
window messages during window creation now handled
    these were previously discarded
    messages now tunnel the required context
changed failure to create opengl3 window on windows to be more fatal
marked a problem with pen code
conditional compilation of vulkan and opengl3 on windows fixed
windows debug builds now show messages on debug console also
rendering driver selection box now shows only compiled drivers
marked some problematic code
thanks to akien-mga for patiently rewriting my style mistakes
2022-05-11 16:12:40 -04:00
bruvzg
d36c5514d3
Fix ZipIO crash when reused (and possible leaks). 2022-05-11 16:08:17 +03:00
Fabio Alessandrelli
9bdb853eec [HTML5] Limit the returned OS cpu count to 2.
Temporarily workaround issues due to godot spawning too many threads.
2022-05-11 00:26:02 +02:00
Fabio Alessandrelli
39d9a5540c [HTML5] Fix JS "tools" editor plugin.
Needed update after file/dir access refactoring.
2022-05-10 23:56:32 +02:00
Fabio Alessandrelli
e8110474b6 [HTML5] Add "webgl/webgl2.h" as OpenGL include.
Requires emscripten versions > 2.0.17 .
2022-05-10 23:56:21 +02:00
bruvzg
ffe61e0895
[macOS / iOS] Fix text-to-speech build with older macOS / iOS SDK.
Add __has_include check for AVFAudio include.
Add some explicit casts to avoid conflicts.
Change all `include`s to `import`s for consistency.
2022-05-10 21:11:34 +03:00
Haoyu Qiu
a71e808112 Try to convert OS::execute() output to Unicode on Windows 2022-05-10 20:54:48 +08:00
bruvzg
b268c4b4bc [Windows] Save and re-apply window icon when changing window style. 2022-05-10 11:12:04 +03:00
Rémi Verschelde
c366f8d2d4 Crash handler: Use print_error to include backtrace in logs 2022-05-05 12:22:56 +02:00
Marcel Admiraal
c893302ca1 Read and store joypad events in a separate thread on x11 platform 2022-05-05 07:51:54 +02:00
bruvzg
800a68837f Fix export plugins after embedded PCK loading changes. 2022-05-04 12:57:21 +03:00
Rémi Verschelde
5022efef02
Merge pull request #51682 from mdavisprog/os-is-process-running
OS::is_process_running function.
2022-05-04 09:02:33 +02:00
mdavisprog
f3c1232c59 Add OS::is_process_running function.
Adds the is_process_running function to the native OS class and exposes it to script.

This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function.

Documentation is updated to reflect new API function.
2022-05-03 17:27:17 -07:00
Fabio Alessandrelli
070bd87aaa [JS] Add flag to disable weak symbols in ZSTD.
Weak symbols are currently broken in upstream emscripten.
2022-05-03 21:52:55 +02:00
Fabio Alessandrelli
a4c3e915be Added missing signature. 2022-05-03 18:44:49 +02:00
Rémi Verschelde
297241f368
Merge pull request #60714 from Calinou/typedef-remove-ref
Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`
2022-05-03 14:28:18 +02:00
Rémi Verschelde
cb7a5a81ad
Merge pull request #60224 from pfeodrippe/fix-simultaneous-touches 2022-05-03 13:56:45 +02:00
Rémi Verschelde
3894b08d0d
Merge pull request #60553 from madmiraal/separate-display_safe_area 2022-05-03 11:20:46 +02:00
Rémi Verschelde
c9ce4069a3
Merge pull request #60601 from touilleMan/gdextension_get_library_path
Add GDNativeInterface::get_library_path to GDExtension
2022-05-03 08:13:34 +02:00
Hugo Locurcio
180e5d3028
Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Rémi Verschelde
c273ddc3ee Style: Partially apply clang-tidy's cppcoreguidelines-pro-type-member-init
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
Rémi Verschelde
d56462d82a
Merge pull request #60638 from m4gr3d/support_hand_tracking_v2_main 2022-05-02 09:51:21 +02:00
Marcel Admiraal
97e87a2daf Fix screen_get_usable_rect returning display safe area 2022-05-02 09:31:32 +02:00
Rémi Verschelde
bc7ccc909b
Merge pull request #60551 from madmiraal/implement-3466
Add a method for obtaining display cutouts on Android
2022-05-02 07:56:41 +02:00
Emmanuel Leblond
80f61352fb
Add GDNativeInterface::get_library_path to GDExtension 2022-04-29 00:51:04 +02:00
Rémi Verschelde
cbdc33bcf7
Merge pull request #60563 from madmiraal/fix-60562 2022-04-29 00:30:30 +02:00
bruvzg
652f78785b
[Linux] Disable speech-dispatcher, pulse audio and udev wrapper builds, when library is not found. 2022-04-28 18:13:34 +03:00
bruvzg
6ab672d1ef Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.
Implement TextServer word break method.
2022-04-28 14:35:41 +03:00
bruvzg
2ca91948de [Windows Export] Improve error messages for missing rcedit and signtool. 2022-04-28 10:48:30 +03:00
Fredy Huya-Kouadio
c63ca6c72b Update Meta hand tracking version
https://developer.oculus.com/blog/presence-platforms-hand-tracking-api-gets-an-upgrade/
2022-04-27 20:56:24 -07:00
Marcel Admiraal
5924e2b90e Check for null when retrieving clip data item text on Android 2022-04-27 16:12:33 +02:00
Rémi Verschelde
504708ae21
Merge pull request #56093 from bruvzg/pck_section_load
Improve embedded PCK loading and exporting.
2022-04-27 14:29:21 +02:00
Rémi Verschelde
8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
Rémi Verschelde
a300fb6665
Merge pull request #60523 from akien-mga/linux-pkgconfig-nixos 2022-04-27 09:41:58 +02:00
Rémi Verschelde
8a996d7b38
Merge pull request #60397 from timoschwarzer/ios-haptic-engine 2022-04-27 09:40:58 +02:00
Rémi Verschelde
e89fc52ec6
Merge pull request #58272 from bruvzg/x11_backup_screen_info 2022-04-27 09:34:25 +02:00
Marcel Admiraal
71ce5857ec Add a method for obtaining display cutouts on Android 2022-04-26 13:51:21 +02:00
Rémi Verschelde
07ad066420 Linux: Use pkg-config for alsa, libudev and GL too
It's not needed on most distros as those are found in standard lib
and include paths, but on NixOS they're all in non-standard prefixes,
so we need to rely on information provided by pkg-config.

Fixes #59913.

Co-authored-by: David Lewis <davidalewis00@gmail.com>
2022-04-26 09:37:28 +02:00
Rémi Verschelde
d9f7da2230
Merge pull request #60433 from madmiraal/remove-superfluous-null-check
Remove superfluous null check
2022-04-25 16:02:40 +02:00
Rémi Verschelde
b4a1a76bce
Merge pull request #60457 from madmiraal/replace-index-iterators
Replace index iterators with for each loops.
2022-04-25 16:02:28 +02:00
Rémi Verschelde
5e599d7c22
Merge pull request #60441 from madmiraal/remove-superfluous-inputmanager
Remove superfluous Android InputManager interface and implementation
2022-04-25 15:41:55 +02:00
Rémi Verschelde
d167583517
Merge pull request #60434 from madmiraal/remove-superfluous-version-check
Remove superfluous check for minimum Android SDK.
2022-04-25 15:40:33 +02:00
Fredy Huya-Kouadio
3b1e62bc7c Fix the issue causing the screen to be black after resuming when in low processor mode.
This is done by forcing a redraw and buffers swap when resuming the app.
2022-04-25 00:25:17 -07:00
Marcel Admiraal
334ebd7eb7 Replace index iterators with for each loops. 2022-04-23 09:45:44 +02:00
Marcel Admiraal
2f225bf2c5 Remove superfluous check for minimum Android SDK. 2022-04-22 18:55:45 +02:00
Marcel Admiraal
22ca5b2eba Remove superfluous Android InputManager interface and implementation 2022-04-22 18:52:06 +02:00
Marcel Admiraal
988432b8bb Remove superfluous null check 2022-04-22 17:33:27 +02:00
Timo Schwarzer
4d3a7ad6ca
Vibrate using iOS haptics engine on supported devices 2022-04-20 22:28:29 +02:00
bruvzg
c0cc41d6c1
Improve embedded PCK loading and exporting.
Windows export process:
  Limit size of executable with embedded PCK to 4 GB.
  Use "rcedit" before embedding PCK.
  Capture and process "rcedit" errors.

Windows, Linux:
  Add support for PCK loading from executable "pck" section.
2022-04-20 11:09:59 +03:00
bruvzg
de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
Paulo Feodrippe
a6f06d57dc Fix simulatenous touches for different touch types 2022-04-13 22:52:08 -03:00
bruvzg
8b0761d1fd
Fix sub-menu keyboard navigation. 2022-04-13 09:58:38 +03:00
bruvzg
d2ebac3a30
Remove or make private FileAccess close() methods. 2022-04-12 14:50:14 +03:00
bruvzg
4bf99f4af2 Narrow FileAccess scope to prevent deadlocks. 2022-04-12 10:54:39 +03:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
Rémi Verschelde
b79721fede
Merge pull request #59908 from bruvzg/fix_popup_close_race
Fix a possible race condition on popup close, that might cause multiple deletions of the same list item.
2022-04-06 08:35:56 +02:00
Rémi Verschelde
77843355a0 CI: Update black formatter and apply changes 2022-04-05 17:43:12 +02:00
bruvzg
daa42e0e50
Fix a possible race condition on popup close, that might cause multiple deletions of the same list item. 2022-04-05 12:44:29 +03:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Rémi Verschelde
53317bbe14
Merge pull request #59866 from m4gr3d/update_default_display_scale_main 2022-04-04 19:31:37 +02:00
Fredia Huya-Kouadio
8eabf77f54 Update the editor display scale based on the device's scaled density 2022-04-04 09:23:43 -07:00
Fredia Huya-Kouadio
f1a7caf9bb Remove duplicate resizable settings 2022-04-04 09:18:07 -07:00
Rémi Verschelde
10d9e47949
Merge pull request #59861 from m4gr3d/enable_resizable_main 2022-04-04 11:17:24 +02:00
Fredia Huya-Kouadio
3f299e9255 Update resize settings:
- Unlock resizing for the Godot Editor
- Add an option to specify whether a game is resizeable for the Godot template
2022-04-04 01:02:10 -07:00
bruvzg
50bd5e6fbe
[macOS] Add bundle launch code for older (pre 10.15) macOS versions. 2022-04-04 08:04:37 +03:00
bruvzg
ba0317be04
Add CI build with clang sanitizers, increase stack size to 30 MB for builds with sanitizers. 2022-04-01 13:15:35 +03:00
ConteZero
2eb36b8bdb Fix X11 is_window_maximized 2022-03-31 23:21:32 +02:00
Rémi Verschelde
a647fb3e62 Fix typos with codespell
Using codespell 2.2-dev from current git.

Fix a couple incorrect uses of gendered pronouns.
2022-03-31 14:07:29 +02:00
Rémi Verschelde
04c17eb003
Merge pull request #59607 from m4gr3d/fix_low_processor_mode_main
Fix flickering issues with low processor mode on Android
2022-03-29 21:52:08 +02:00
Fredia Huya-Kouadio
b176b31f5d Fix flickering issues with low processor mode on Android 2022-03-29 12:17:09 -07:00
Lyuma
ee02a7f785 Keep editor at normal priority on windows.
The multithreaded importer often causes system-wide hangs when importing more than 20 files at a time.
Running the editor at normal priority allows other applications on the system to be responsive during long imports.
2022-03-29 00:01:31 -07:00
Fredy Huya-Kouadio
5711037bf6 Android port of the Godot Editor
These set of changes focus primarily on getting the core logic and overall Godot Editor UI and functionality up and running natively on Android devices.
UI tweaks / cleanup / polish, as well configuration for Android specific functionality / restrictions will be addressed in follow-up PRs iteratively based on feedback.

Co-authored-by: thebestnom <shoval.arad@gmail.com>
2022-03-28 14:04:51 -07:00
Rémi Verschelde
00e9170812
Merge pull request #59574 from Sauermann/proposal-rename-warp-mouse
Rename warp mouse functions to warp_mouse
2022-03-28 08:52:02 +02:00
Markus Sauermann
0494e024d8 Rename warp mouse functions to warp_mouse 2022-03-27 14:12:01 +02:00
Rémi Verschelde
93b7a85c98 HTML5: Explain why export templates are missing
Same for UWP.

This is skipped in DEV_ENABLED builds so contributors can still test
the export pipeline (and CI still compiles it on debug builds).
2022-03-26 20:27:36 +01:00
Rémi Verschelde
391633760b
Merge pull request #59465 from fountainment/fix_popupmenu 2022-03-24 12:52:42 +01:00
C.Even
6866eee641 Fix PopupMenu behavior on MacOS when multiple monitors are used
* DisplayServerOSX::mouse_get_position returns wrong x axis data in
  multi-monitor case, which makes mouse_process_popups send
  WINDOW_EVENT_CLOSE_REQUEST, then eventually make PopupMenu close on
  mouse down without activating item.
2022-03-24 18:04:41 +08:00
Rémi Verschelde
476b8a2249
Merge pull request #59416 from aaronfranke/export-file 2022-03-24 09:55:24 +01:00
dependabot[bot]
505dce7528
Bump minimist from 1.2.5 to 1.2.6 in /platform/javascript
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-23 19:50:11 +00:00
Aaron Franke
13392a96e9
Generate export template file names instead of having a fixed set 2022-03-22 10:16:03 -05:00
Rémi Verschelde
9433c1d70c
Merge pull request #59394 from aaronfranke/linux-export-x86_32 2022-03-22 13:31:28 +01:00
bruvzg
595995a5a7
[macOS] Add missing global menu features. 2022-03-22 12:38:14 +02:00
Aaron Franke
ac3ecec58e
Change extension for Linux 32-bit x86 exports to x86_32 2022-03-21 14:56:27 -05:00