Commit graph

694 commits

Author SHA1 Message Date
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
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
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
Emmanuel Leblond
80f61352fb
Add GDNativeInterface::get_library_path to GDExtension 2022-04-29 00:51:04 +02: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
de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +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
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
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
Rémi Verschelde
f995f47965
Merge pull request #59062 from BastiaanOlij/storagerd_texture 2022-03-17 10:08:33 +01:00
bruvzg
98d0af7d5c
Implement GDExtension export plugin. 2022-03-16 11:16:19 +02:00
Bastiaan Olij
57e5a33623 Split dummy renderer classes into separate files
Split canvas_texture_storage and texture_storage from render_storage class
2022-03-16 17:43:10 +11:00
Rémi Verschelde
768f9422bc Convert uses of DirAccess * to DirAccessRef to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
reduz
6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
reduz
21637dfc25 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
Rémi Verschelde
63df46c238
Revert "[HTML5] Fetch API now passes credentials." 2022-03-07 12:52:26 +01:00
Rémi Verschelde
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Rémi Verschelde
f9629deade
HTML5: Fix build after #52742
Fixes #58172.
2022-02-16 08:37:58 +01:00
Rémi Verschelde
11572c6e30
Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
Rémi Verschelde
a6aba6919f
Merge pull request #58081 from tavurth/bugfix/high-macos-cpu-usage 2022-02-15 13:40:21 +01:00
Will Whitty
ab5eaf0ad9 Fix new performance regressions (short delay_usec)
My Mac was using 20% cpu again, which was related to the Javascript
Export plugin.

I had however no export templates setup in the project so this is more
of a stopgap fix.
2022-02-15 14:05:19 +03:00
trollodel
05b56f316d Remove most EditorNode constructor parameters and fields 2022-02-14 14:16:24 +01:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Fabio Alessandrelli
ffe248cbdf [HTML5] Fetch API now passes credentials.
Used default value before, i.e. "same-origin", now uses "include" (i.e.
include for cross-origin if cross-origin is allowed).
2022-02-10 22:22:03 +01: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
jmb462
1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +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
d235c1bb19
Merge pull request #57335 from jordigcs/display-refresh-rate 2022-02-04 11:51:07 +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
jordi
54dec44dba Add screen_get_refresh_rate to DisplayServer 2022-02-03 21:50:32 -06: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
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
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
Max Hilbrunner
3ef5a97505 Verify custom HTTP headers, fix off by one error 2022-01-27 03:22:37 +01: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
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
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
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
Rémi Verschelde
8bdef23f7f
Merge pull request #56012 from bruvzg/wt🤎4 2022-01-17 13:26:15 +01:00