Commit Graph

3930 Commits

Author SHA1 Message Date
Rémi Verschelde 63df46c238
Revert "[HTML5] Fetch API now passes credentials." 2022-03-07 12:52:26 +01:00
reduz ccd4cdfd8b Rename StreamTexture* to CompressedTexture*
* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
2022-03-05 16:43:38 +01:00
bruvzg 12cb6386f6
Improve app name and system permission message localization.
Add localizable string (Dictionary<Lang Code, String>) property editor and property hint.
Add localized "app name" property to the project settings.
Add localized permission and copyright properties to the macOS and iOS export settings.
Remove some duplicated ("app name") and deprecated ("info") macOS and iOS export properties.
2022-03-04 18:11:31 +02:00
Rémi Verschelde 5845b1d3fd
Merge pull request #58742 from timothyqiu/x11-leak
Fix X11 memory leak after drag & drop file into the editor
2022-03-04 11:53:16 +01:00
Rémi Verschelde b21e2ec746
Merge pull request #58738 from bruvzg/mac_resize_crash
[macOS] Disable window redraw during resize, when rendering in the separate thread.
2022-03-04 11:33:53 +01:00
Haoyu Qiu 29e45d4fa0 Fix X11 memory leak after drag & drop file into the editor 2022-03-04 17:50:24 +08:00
bruvzg a9808d9d7a
[macOS] Disable window redraw during resize, when rendering in the separate thread. 2022-03-04 10:25:39 +02:00
bruvzg 5fdea69276
[macOS and iOS export] Add localized application name to the translation .plist files. 2022-03-04 09:27:44 +02:00
Sergey Minakov 15ef056997 [iOS] Fix multitouch not working correctly 2022-02-26 23:18:28 +03:00
bruvzg 74ff5921d6 Improve popup window handling.
Add window FLAG_POPUP and a platform specific routines to control popup auto-hiding and event forwarding.
2022-02-25 09:33:27 +02:00
bruvzg d39ec5b9ed [Windows] Fix borderless window flag toggle and restoring minimized borderless window. 2022-02-22 10:56:58 +02:00
Mai Lavelle dfdc1c1642 Fix deleting of directories on Linux
Trailing slash of directories was mishandled, and incorrect derived paths
were formed. Stripping the slash fixes this.
2022-02-20 08:38:59 -05:00
Sergey Minakov 8b3ac9479e [iOS] Fix incorrect method name for input dragging event 2022-02-19 16:40:49 +03:00
bruvzg 0c27667124 [Windows] Fix Vulkan driver crash on sub-window minimization. 2022-02-17 13:34:08 +02: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 c4c29728a3
i18n: Sync editor translations with Weblate
Minor proofreading of new OSX export strings.

(cherry picked from commit 9f09251027)
2022-02-16 10:08:40 +01:00
Rémi Verschelde a2e540f617
Merge pull request #58173 from akien-mga/js-build-fix-is_project_manager 2022-02-16 09:43:03 +01:00
Rémi Verschelde f9629deade
HTML5: Fix build after #52742
Fixes #58172.
2022-02-16 08:37:58 +01:00
Hugo Locurcio ee7cd9a3a1
Add an `OS.get_processor_name()` method
This method can be used to get the CPU model name.
It can be used in conjunction with
`RenderingServer.get_video_adapter_name()` and
`RenderingServer.get_video_adapter_vendor()` for annotating benchmarks
and automatic graphics quality configuration.
2022-02-15 20:55:53 +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
Rémi Verschelde f810f76890
Merge pull request #57306 from trollodel/remove_editornode_param 2022-02-14 16:40:40 +01:00
trollodel 05b56f316d Remove most EditorNode constructor parameters and fields 2022-02-14 14:16:24 +01:00
Fabio Alessandrelli f4a80f9ca7 [OSX] Codesign exporter now uses CryptoCore RNG. 2022-02-14 10:45:50 +01:00
Fabio Alessandrelli 6b5634b96a [OS/Crypto] Add get_entropy to OS.
Implemented via `BCryptGenRandom` on Windows.
Implemented via `getentropy` syscall when available.
Implemented via `/dev/urandom` device as a fallback.

The `/dev/urandom` fallback can be disabled via the `NO_URANDOM` build
flag.

Note: The HTML5 version relies on emscripten file system urandom
device which itself uses the Crypto API when available or the plain
old not crypto-safe `Math.random()` otherwise.

Restore get_entropy.
2022-02-14 10:45:50 +01:00
bruvzg 5c641372fc
[macOS] Fix macOS producing alert sound on some input actions. 2022-02-12 19:58:39 +02:00
Rémi Verschelde d3a6b6daaa
Merge pull request #56953 from bruvzg/ex_wnd 2022-02-12 16:46:55 +01:00
Hendrik Brucker b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
bruvzg 7d59b81d79
Add exclusive window handling to DisplayServer (on macOS and Windows). 2022-02-12 00:14:09 +02:00
bruvzg 65426f831f [Windows] Fix drag-and-drop. 2022-02-11 09:34:55 +02: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
Rémi Verschelde 1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
pkowal d469cfb2ab Change godot.ico to uncompressed/fixed size 2022-02-09 11:20:49 +01:00
Rémi Verschelde 5b866426fd
Merge pull request #57605 from naithar/fix/godot-view-touch-4.0 2022-02-09 11:05:26 +01:00
Rémi Verschelde 90162851a7
Core: Move generated `VERSION_HASH` to a `.cpp` file
This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.
2022-02-09 09:20:17 +01:00
Rémi Verschelde b480140ce1
Merge pull request #57825 from Calinou/ios-remove-obsolete-define 2022-02-09 00:27:08 +01:00
Hugo Locurcio f7529d417d
Remove obsolete define in the iOS buildsystem code
This define was used by the WebM/libvpx code, but it's now removed
in `master`.
2022-02-08 22:45:36 +01:00
Hugo Locurcio 74fc4410f4
Remove support for ARMv7 (32-bit) on iOS
All iOS devices since the iPhone 5S support ARMv8 (64-bit).

The last iOS version supported on ARMv7 devices is 10.x, which is
too old to run Godot 4.0 projects since the minimum supported
iOS version is 11.0.
2022-02-08 22:11:29 +01:00
Rémi Verschelde 592e92d938
Merge pull request #57809 from akien-mga/osx-11.00-warning 2022-02-08 17:32:49 +01:00
Rémi Verschelde d3345ef1f8
OSX: Pass `-mmacosx-version-min=11.0` instead of `11.00`
Both are recognized by Xcode and equivalent, but osxcross issues a
warning for the latter:
```
osxcross: warning: '-mmacosx-version-min=' (11.0.0 != 11.00)
```
2022-02-08 16:20:13 +01:00
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