Commit graph

2562 commits

Author SHA1 Message Date
bruvzg 2ef8c5fac5
iOS modular build and export implementation. 2019-12-01 21:57:18 +02:00
Hugo Locurcio 21a3923410
Add an OS.is_window_focused() getter
This makes it possible to know whether the window is focused
at a given time, without having to track the focus state manually
using `NOTIFICATION_WM_FOCUS_IN` and `NOTIFICATION_WM_FOCUS_OUT`.

This partially addresses #33928.
2019-11-28 16:42:51 +01:00
Rémi Verschelde 0e6e64c9e9
Merge pull request #32854 from cooperra/fix-wireless-adb-debugging
Fix Android deploy with Remote Debug or Network FS over Wi-Fi
2019-11-28 10:02:55 +01:00
Rémi Verschelde e297b83b8e
Merge pull request #33883 from bruvzg/mac_locale
[macOS] Fix locale detection.
2019-11-25 16:09:12 +01:00
George Marques 5d7c13dcbb
Fix inverted value check in UWP export packager 2019-11-25 11:22:52 -03:00
bruvzg c8bf0ee062
[macOS] Fix locale detection. 2019-11-25 15:55:17 +02:00
Rémi Verschelde 967cc2c014
Merge pull request #33862 from Faless/net/http_request_chunk_size
Add download_chunk_size property to HTTPRequest.
2019-11-25 14:29:59 +01:00
Fabio Alessandrelli ed19b4076e Add download_chunk_size property to HTTPRequest.
This allows setting the `read_chunk_size` of the internal HTTPClient.
This is important to reduce the allocation overhead and number of file
writes when downloading large files, allowing for better download speed.
2019-11-24 19:32:20 +01:00
Rémi Verschelde c41c24562d Style: Add missing copyright headers 2019-11-22 08:37:09 +01:00
Rémi Verschelde ab3bccdb78 Fix typos with codespell
Using codespell 1.16.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-11-22 08:35:03 +01:00
bruvzg e423e1c663
[macOS] Remove CVDisplayLink v-sync hack. 2019-11-21 11:01:47 +02:00
Rémi Verschelde 02913f53d3 pcre2: Use scons option to disable JIT on some platforms
Third-party platforms (e.g. console ports) need to be able to
disable JIT support in the regex module too, so it can't be
hardcoded in the module SCsub. This is cleaner this way anyway.

Fixes #19316.
2019-11-20 08:54:52 +01:00
Rémi Verschelde e5dfcb5edd HTML5: Explicitly link idbfs.js for IDBFS support
Upstream Emscripten changed this in 1.39.1+, so IDBFS is no longer
included by default and has to be linked manually.

The explicit linking doesn't seem to be problematic on earlier
versions (tested `1.38.47-upstream`).

Fixes #33724.
2019-11-19 09:45:43 +01:00
Rémi Verschelde e9e2a4b044 HTML5: Fix support for Emscripten 1.39.1+
A change in upstream Emscripten 1.39.1+ made our buildsystem error
out where it was previously only issuing a warning:
```
[  5%] Linking Static Library ==> main/libmain.javascript.opt.bc
shared:WARNING: Assuming object file output in the absence of `-c`, based on output filename. Please add with `-c` or `-r` to avoid this warning
Ranlib Library         ==> main/libmain.javascript.opt.bc
/opt/emsdk/upstream/bin/llvm-ranlib: error: unable to load 'main/libmain.javascript.opt.bc': file too small to be an archive
```

As advised on emscripten-core/emscripten#9806, we should be using
`emar` here to create the static library and not `emcc`.
This was apparently done to workaround Emscripten issues in the past,
but evidently this is no longer necessary.

The rest of the `env` redefinitions should probably be re-assessed
against the current state of Emscripten.

Fixes #33374.
2019-11-15 09:39:19 +01:00
Rémi Verschelde 8d7de9a9e9
Merge pull request #33536 from akien-mga/revert-25474-android-gestures
Revert "Android : implement InputEventMagnifyGesture and InputEventPanGesture"
2019-11-13 11:14:09 +01:00
Rémi Verschelde d191ffb47d X11: Fix memory leak in handle_key_event
Extracted from #27189.
2019-11-12 07:51:51 +01:00
Rémi Verschelde 5c038acdc1
Merge pull request #33482 from piratesephiroth/master
Set ShellExecuteW's verb to NULL - fixes #33388
2019-11-11 13:27:09 +01:00
Rémi Verschelde 6cd3c921f1 Revert "Android : implement InputEventMagnifyGesture and InputEventPanGesture"
This reverts commit 9cc66495cf.

This caused regressions with the handling of screen drag events.

Fixes #33428.
Fixes #33459.
Fixes #33470.
2019-11-11 08:29:58 +01:00
piratesephiroth a0fd450415 [UWP] [Export] added additional checks for blank values
`Short Name` and `Publisher Display Name` are mandatory.
You can't even sign the app package without them in the manifest.
2019-11-09 10:37:10 -03:00
piratesephiroth 778b421973
Set ShellExecuteW's verb to NULL - fixes #33388
from https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shellexecutew

>the default verb is used, if available. If not, the "open" verb is used. If neither verb is available, the system uses the first verb listed in the registry.

so "open" is redundant at best
2019-11-09 07:59:15 -03:00
bruvzg 1c8d3ab94f
Fix graphic tablet input coordinates on Windows. 2019-11-07 14:12:15 +02:00
Max 29bde8cd74 Fix crash on exit or resume on iOS 13
Fixes #7966.
2019-11-05 10:28:42 +01:00
Jérémy Zurcher 9cc66495cf Android : implement InputEventMagnifyGesture and InputEventPanGesture
sets threshold constants PAN_GESTURE_MIN_DELTA and MAGNIFY_GESTURE_MIN_FACTOR
2019-11-02 11:17:22 +01:00
bruvzg f675621725
[macOS, Windows, X11] Add graphic tablet pen pressure and tilt support to InputEventMouseMotion event. 2019-10-30 14:42:21 +02:00
PouleyKetchoupp 2f511ff758 Update natvis file to display Node class correctly in Visual Studio debugger 2019-10-29 10:24:29 +01:00
Yuri Roubinsky 034625ed93 Fix invalid window border when toggled from fullscreen to windowed mode 2019-10-27 18:44:47 +03:00
Joe Sweeney d66dcc86f9 Allow use of relative and speed properties for InputEventScreenDrag on WIndows 2019-10-26 15:55:46 -06:00
Yeongho Kim c8c8f1b8a4 Specify MINGW_HAS_SECURE_API=1 2019-10-25 20:03:53 +09:00
Rémi Verschelde 86abf62e48
Merge pull request #32326 from starryalley/ios_get_model_name
ios: support get_model_name
2019-10-25 07:41:28 +02:00
Rémi Verschelde 68a54803c2
Merge pull request #33035 from bruvzg/macos_fix_warnings
Fix compilation warnings in macOS build, enable `warnings=extra werror=yes`
2019-10-24 20:57:38 +02:00
bruvzg 7b64340eb0
Fix compilation warnings in macOS build, enable warnings=extra werror=yes for macOS CI. 2019-10-24 20:37:56 +03:00
Fabio Alessandrelli 9d13a37b81 Remove ECMAScript 6 "arrow operator".
We don't need it, it's not well supported by compilers, and it was a
mistake in the first place.
2019-10-24 16:46:31 +02:00
Fabio Alessandrelli ab1e809426 Implement HTTP server for HTML5 export
Since most browsers no longer allow making async requests from a page
loaded from `file://`, we now need a proper HTTP server to load the
exported HTML5 game.
This should also allow us to get the debugger to work over a WebSocket
connection.
2019-10-23 10:59:03 +02:00
Fabio Alessandrelli 53637e4b1c Improve EditorExportPlatform interface.
Convert all get_device* methods to get_option* and normalize their usage
as icon, label, tooltip.
2019-10-23 10:59:03 +02:00
Cagdas 0088385556 Add request permission automatically at android 2019-10-22 22:52:13 +03:00
Rémi Verschelde a1c890a9e5
Merge pull request #32977 from bruvzg/mingw_clang
Add "llvm/thinlto" options to the MinGW build.
2019-10-22 19:45:41 +02:00
Rémi Verschelde acd5c7e767
Merge pull request #32858 from m4gr3d/expand_singleton_base_api
Add `View SingletonBase#onMainCreateView(Activity activity)` api
2019-10-22 13:52:39 +02:00
bruvzg ec30cf0d20
Add "llvm/thinlto" options to MinGW build. 2019-10-22 12:53:41 +03:00
Fredia Huya-Kouadio 4407350608 Add View onMainCreateView(Activity activity) api to the Godot.SingletonBase class.
The new api allows plugins to define and provide their views for inclusion in the Godot Android view hierarchy.
2019-10-18 10:05:53 -07:00
bruvzg d8c2e6a31a
[macOS] Fix non-ASCII volume name listing, replace deprecated volume listing API. Remove hidden mount points from the volume list. 2019-10-18 15:36:29 +03:00
Robbie Cooper 37e6a8f901 Add connection information and serial number to device description
The description appears when hovering over the one-click-deploy button (top-right). This information helps the user distinguish between their devices if multiple are connected or if the same device is connected by both usb and tcpip (two entries in the list for the same device).
2019-10-15 16:58:26 -04:00
Robbie Cooper f3fdfefa09 Detect adb connection type and debug over Wi-Fi if needed
Avoid using adb reverse if deploying with adb tcpip.

This still can fail if the user is attempting to debug over usb and has connected their device over BOTH usb and tcpip. I'm not sure how we would detect that problem in advance though.
2019-10-15 16:47:14 -04:00
Rémi Verschelde 1fed266bf5
Merge pull request #32809 from bruvzg/macos_1015_non_hidpi_fix
Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
2019-10-13 22:48:05 +02:00
bruvzg 509afcea92
Fix non-HiDPI mode on HiDPI displays on macOS Catalina. 2019-10-13 23:15:20 +03:00
Hugo Locurcio c8a8be6dd1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2019-10-12 23:23:33 +02:00
bruvzg 2a76fba1f6
Fix X11 modifier keys. 2019-10-12 00:09:14 +03:00
fhuya d0f8ef7646 Cleanup fix for the meta-data parsing crashing bug. 2019-10-11 11:12:53 -07:00
Rémi Verschelde 82141729d2 Android: Work around crash in _fix_manifest
Works around #32553, not fixing the underlying cause but
preventing the crash.
2019-10-11 09:03:21 +02:00
Marcel Admiraal a8836ba28d Remove dependency on the editor directory being in the build's include path.
- Add or remove the necessary subdirectorires to the includes to remove
dependency on the editor directory being in the build's include path.
- Ensure includes in modified files conform to style guideline.
- Remove editor from the build include path.
2019-10-10 08:57:00 +02:00
Rémi Verschelde abd81dcb73
Merge pull request #32556 from bruvzg/win_codesign
Code signing support for Windows exports
2019-10-08 16:17:24 +02:00
Alexander Holland db582a2c8c Adds Pen support for Android 2019-10-04 23:57:01 +02:00
bruvzg 1c592e5f1f
Add code signing support for Windows exports (using "signtool" on Windows and "osslsigncode" on the other platforms) 2019-10-04 22:33:03 +03:00
Rémi Verschelde 9a115ccaf3
Merge pull request #32518 from nekomatata/fix-revert-cursor
Properly revert cursor when using set_custom_mouse_cursor with null
2019-10-03 13:39:25 +02:00
PouleyKetchoupp 5bfe32eaa4 Properly revert cursor when using set_custom_mouse_cursor with null
Fixes #32486
2019-10-03 13:02:11 +02:00
Rémi Verschelde 77b1214a9a
Merge pull request #32514 from akien-mga/android-one-click-dont-uninstall
Android one-click deploy: Don't clear by default
2019-10-03 12:33:51 +02:00
Rémi Verschelde 0c7b3fff44 Android: Fix manifest parsing and APK names in export code
A better fix would be to make Godot's export code properly parse the
tag over multiple lines (and maybe even use XMLParser instead of doing
it ad-hoc?).

As for the APK names, we could alternatively pick the first .apk found
in the `debug` and `release` folders without expecting a specific name.

Fixes #32414.
2019-10-03 12:13:45 +02:00
Rémi Verschelde 9d96f04138 Android one-click deploy: Don't clear by default
This makes iteration faster as you don't need to monitor your phone
to allow the installation each time.

Fixes #32183.
2019-10-03 10:43:59 +02:00
bruvzg 5dca2e4f38
macOS code signing improvements (timestamp and hardened runtime options, entitlements property hint, remove excessive codesign calls, suppress "file not found" error on first export) 2019-10-02 21:00:16 +03:00
Relintai 6f1d6cfc78 Fixed running the export templates with newer emscripten versions. 2019-10-01 15:41:19 +02:00
Rémi Verschelde dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin 17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Mark Kuo bba9d9123c ios: support get_model_name 2019-09-25 12:35:45 +10:00
Rémi Verschelde 2b628e5d5b
Merge pull request #32269 from m4gr3d/improve_build_time
Update the Godot gradle build tasks to provide additional flexibility
2019-09-24 16:29:34 +02:00
fhuya ef143447ad Updates the Godot gradle tasks to enable manual runs of the scons command.
Example: To generate for the `release` build target and for the `armv7`, `arm64v8` and `x86` architectures, run the commands:
```
cd godot
scons -j4 platform=android target=release android_arch=armv7
scons -j4 platform=android target=release android_arch=arm64v8
scons -j4 platform=android target=release android_arch=x86
cd platform/android/java
./gradlew generateGodotTemplates
```

Notes:
- The generated build templates will be located in the `godot/bin` directory (i.e: `android_debug.apk`, `android_release.apk`, `android_source.zip`).
- The gradle command will only generate templates for the target(s) with available native shared libraries. For example, running the commands above will only generate the `android_release.apk` and `android_source.zip` files.

To delete the generated artifacts, the following commands can be used:
```
cd platform/android/java
./gradlew cleanGodotTemplates
```
2019-09-24 06:18:21 -07:00
Rémi Verschelde 823c3def72 Fix copyright headers and style issues 2019-09-24 11:52:06 +02:00
Rémi Verschelde 1ecdd5b5cc
Merge pull request #32194 from AlexRixhardson/fix-7945
Fixes crash described in issue 7945 (Duplicated [self drawView] in iphone gl_view)
2019-09-24 09:17:54 +02:00
Rémi Verschelde ce384f885c
Merge pull request #32250 from lawnjelly/android-keyboard2
Fix Android keyboard crash with left cursor
2019-09-23 22:09:09 +02:00
lawnjelly ad5d0cca4d Fix Android keyboard crash with left cursor
Fixes #32168.
Previously we were returning all key up and key down messages as unhandled to the OS. This was resulting in crashes on certain keypresses (left cursor), for undetermined reason.

This PR defaults all key up and keydown messages to be returned as handled by Godot, except those explicitly coded as exceptions (currently volume keys only).
2019-09-23 18:08:41 +01:00
Rémi Verschelde 393a0152ea
Merge pull request #32055 from qarmin/some_code_fixes
Changed some code found by Clang Tidy and Coverity
2019-09-23 10:00:31 +02:00
qarmin 50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
Cagdas ef5d1ebc95 Fix starting intent problem 2019-09-22 15:02:10 +03:00
Rémi Verschelde 2e065d8ad0
Merge pull request #32064 from m4gr3d/propagate_gl_surface_events
Notify for app pause and resume events on Android
2019-09-20 23:18:40 +02:00
Rémi Verschelde 42af54ff75
Merge pull request #32087 from karroffel/x11-pid
[X11] set PID as window attribute
2019-09-20 23:18:17 +02:00
Rémi Verschelde 25a1bfed5c
Merge pull request #32210 from Calinou/editor-log-distinguish-messages
Distinguish editor-originating messages in the editor log
2019-09-20 20:22:43 +02:00
Rémi Verschelde fdc2463a1b
Merge pull request #32150 from luzpaz/typos
Fix misc. source comment typos
2019-09-20 17:09:05 +02:00
Hugo Locurcio ba566dff2e
Distinguish editor-originating messages in the editor log
This fades out messages originating from the editor to make messages
printed by the project stand out more.

This also tweaks wording in some editor messages for consistency.
2019-09-20 01:59:02 +02:00
fhuya a7712cc9e4 Add new events and accompanying logic to notify when the app is paused and resumed on Android devices. 2019-09-19 13:29:49 -07:00
luz.paz 91ecd7b6a6 Fix misc. source comment typos
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-19 14:36:52 -04:00
AlexRixhardson 973a4fe50f Fix crash on iOS devices during rotate 2019-09-18 22:50:16 +02:00
thomas.herzog 4553935f27 [X11] set PID as window attribute
This allows other programs to find out the PID of a Godot instance just
by the X11 window ID.
2019-09-11 10:13:48 +02:00
fhuya 7fabfd402f Split the Android platform java logic into an Android library module (lib) and an application module (app).
The application module `app` serves double duties of providing the prebuilt Godot binaries ('android_debug.apk', 'android_release.apk') and the Godot custom build template ('android_source.zip').
2019-09-04 16:20:22 -07:00
Rémi Verschelde b1f294b3ac Android: Improve dialogs about custom build template
The language didn't make it clear that it's installing a *source* template
to the project folder, for later use when compiling custom APKs.

Fixes #28736.
2019-08-29 13:22:20 +02:00
Rémi Verschelde b948b38840 SCons: Generate android_source.zip during build
This is now needed after #27781, as this android_source.zip template
is used for custom Android builds from the editor.
2019-08-29 13:22:17 +02:00
bruvzg bd63d3e1ec
Fix modifier keys causing key-code mismatch on Linux/X11. 2019-08-28 13:27:13 +03:00
Rémi Verschelde f38c64e8b1
Merge pull request #31709 from akien-mga/android-fix-thirdparty
Android: Fix another regression with Secure.ANDROID_ID, and fix formatting and documentation of thirdparty code
2019-08-27 20:16:08 +02:00
Rémi Verschelde b7c46ed929
Merge pull request #31713 from volzhs/fix-vibrate
Suppress MissingPermission warning for Android vibration
2019-08-27 17:42:32 +02:00
Rémi Verschelde eb8d181cb2 Android: Sync Google billing library with upstream, unmodified
Synced with 7a94c6905a.
2019-08-27 15:15:37 +02:00
volzhs 8cda898fbb Suppress MissingPermission warning for Android vibration
It does check its permission every `vibrate_handheld()` calls.
Vibrate permission is added by checking it on export settings.

And there are some changes for deprecated method.
2019-08-27 22:01:45 +09:00
Rémi Verschelde 472d10a0ad Android: Reapply custom changes to Google expansion.downloader lib
I don't know why they're needed, but readding for now to keep things
working as they were.
2019-08-27 14:30:14 +02:00
Rémi Verschelde ee5898f58a Android: Resync Google expansion.downloader library with upstream, unmodified
Synced with 9ecf54e5ce.
2019-08-27 14:10:31 +02:00
Rémi Verschelde ce60217894 Android: Reapply changes to Google licensing lib from #24145
But document them better this time.
2019-08-27 14:10:30 +02:00
Rémi Verschelde 6f0367052a Android: Resync Google licensing lib with upstream, unmodified
It had been synced with style changes (spaces -> tabs), not sure why
I accepted to merge it this way back then...

Synced with eb57657f66,
same as before.

Custom-changes will be reapplied in the next commit, if relevant.
2019-08-27 13:44:16 +02:00
Rémi Verschelde 071ebb1e48 Android: Fix another regression with Secure.ANDROID_ID
Regression from #24145, which was missed in #28146.
2019-08-27 13:44:07 +02:00
Rémi Verschelde 04ac6a43a4 Android: Style fixes to manifest and build.gradle 2019-08-27 11:16:55 +02:00
Rémi Verschelde 1afd77e375 Android: Bump gradle version to 5.1.1
Matching changes made in #31521 and #31547 but only in the Jetbrains
IDE config.
2019-08-27 10:22:05 +02:00
Rémi Verschelde 91cfe7a227
Merge pull request #31691 from m4gr3d/fix_oculus_mobile_input_mapping
Update the fallback input mapping for the Oculus mobile devices.
2019-08-27 08:16:19 +02:00
fhuya 5eaaabceaf Update the fallback input mapping for the Oculus mobile devices. 2019-08-26 18:48:54 -07:00
bruvzg db6d4352ea
[macOS] Add methods to modify global and dock menus. Add ability to open multiple editor/project manager instances, recent/favourite project list to project manager dock menu and opened scene list to editor dock menu. 2019-08-26 16:45:49 +03:00
fogine e0df9de0cb iOS>=11 platform - when handling gestures on screen edges, godot apps should have priority over OS
Solves an issue where iOS would steal InputEventTouch events when near
screen edges in order to handle system wide gestures.
Fixes #31503
2019-08-21 22:22:18 +02:00
Rémi Verschelde 1a4dbd9ee2
Merge pull request #31437 from volzhs/vibrate-mobile
Support vibration for Android and iOS
2019-08-21 21:10:22 +02:00
Rémi Verschelde 99980d856b
Merge pull request #29871 from Faless/crypto/initial_pr
More Crypto, SSL server, crt/key as Resource, HashingContext
2019-08-21 18:03:03 +02:00
volzhs 4061e5bb75 Support vibration for Android and iOS 2019-08-21 23:38:53 +09:00
fhuya f35b1f3b91 Shut down Godot processes on app exit. 2019-08-20 22:35:46 -07:00
Fabio Alessandrelli c19871af6d Move CryptoCore to it's own folder.
Crypto classes will be placed in core/crypto.
2019-08-19 16:31:05 +02:00
Rémi Verschelde 6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Rémi Verschelde 5f1dce4354
Merge pull request #31336 from Calinou/scons-libs-use-lists
Always use lists for `LIBS` in SCons
2019-08-13 12:32:57 +02:00
Hugo Locurcio 05daf5c78b
Always use lists for LIBS in SCons
This closes #31288.
2019-08-12 22:31:55 +02:00
mellondill 3c176827d6 https://github.com/godotengine/godot/issues/31297 - HTML5: this.rtenv.callMain is not a function when using latest-upstream backend
Added needed changed for normal compiling with emscripten 1.38.41 and later
2019-08-12 21:59:27 +03:00
Rémi Verschelde 37a16fee05 Export: Remove temp files from cache after export
So far we left most temporary files lying around, so this attempts to
fix that.

I added a helper method to DirAccess to factor out the boilerplate of
creating a DirAccess, checking if the file exists, remove it or print
an error on failure.
2019-08-12 13:31:59 +02:00
IAmActuallyCthulhu 82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Carl Drougge deb73001ab OS_X11::set_window_maximized gives up after 0.5s
Spinning forever is clearly worse, especially since this happens on at
least FVWM even though the window actually is maximized.
2019-08-10 21:29:45 +02:00
Saracen 69f7263cd8 Fix audio capture naming in Javascript 2019-08-09 23:22:30 +01:00
Robin Hübner 7d0c8a9041 fix usage of old macro when new variant intended 2019-08-09 13:10:06 +02:00
Robin Hübner 6ab118c464 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
Cameron Reikes 62ed44d75f Add feature tag for hmd devices based on DOF
- Necessary according to https://developers.google.com/vr/develop/android/3dof-to-6dof
2019-08-07 16:41:49 -07:00
Rémi Verschelde af935af38d
Merge pull request #30468 from SaracenOne/expose_audio_capture
Exposes capture methods to AudioServer + documentation
2019-08-07 13:27:25 +02:00
Rémi Verschelde 1f2bcb8f02
Merge pull request #31174 from qarmin/thread_sanitizer
Added Thread Sanitizer
2019-08-07 13:21:33 +02:00
qarmin 14c16d6851 Added Thread Sanitizer 2019-08-07 12:01:14 +02:00
Tan Wang Leng b12240a199 Fix wrong mouse wheel position for MOUSE_MODE_CAPTURED on Windows
WM_MOUSEWHEEL and WM_MOUSEHWHEEL report mouse coordinates relative to
the screen (see lParam in [1]), rather than to the window like the rest
of the mouse events.

The current code already makes adjustments to take that into account.

However, it only makes the adjustments if the mouse is not captured, and
the coordinates are always relative to the screen regardless of whether
the mouse is captured or not, so let's fix the code to always
consistently apply the adjustments.

This fixes #29559.

[1] - https://docs.microsoft.com/en-us/windows/win32/inputdev/wm-mousewheel
2019-08-05 22:10:30 +08:00
Rémi Verschelde 875075cd65
Merge pull request #30961 from Calinou/window-size-error
Turn `OS.set_min/max_window_size()` warnings into errors
2019-07-30 20:03:49 +02:00
Rémi Verschelde 2da1614beb Android: Remove unusable android_stl=no option
As of 3.1 and later, we have too many thirdparty C++ dependencies
and some internal uses of `new` and `delete` too for it to make
sense to build without the STL on Android.

The option has been broken since 3.0, and the "System STL" that we
relied on for basic support of `new` and `delete` is likely to be
dropped from the NDK:
https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md#System-STL
2019-07-30 18:53:38 +02:00
Rémi Verschelde d6ef5daf48 Android: Drop support for NDK < r15
NDK r15c was released over two years ago (July 2017), and we
cannot build against r14b anyway as it seems to fail with our
setup to link the STL.
2019-07-30 15:49:31 +02:00
Hugo Locurcio 7de2c70e11
Turn OS.set_min/max_window_size() warnings into errors
Since invalid values will cause the setting to be discarded,
it makes more sense to display an error message instead of a
warning message.
2019-07-30 14:50:52 +02:00
Ibrahn Sahir 3502a85ba8 Fix strict-aliasing warning in OS_Windows::get_unix_time. 2019-07-29 23:52:59 +01:00
Guilherme Felipe c3f69c6c76 Fix crash caused by a9a0d0fb15 2019-07-24 15:01:28 -03:00
Rémi Verschelde 4c943cca2c
Merge pull request #30716 from qarmin/fixed_static_analiser_code
Fix some code found by Coverity Scan and PVS Studio
2019-07-23 15:08:44 +02:00
qarmin aab8da25ad Fix some code found by Coverity Scan and PVS Studio 2019-07-23 09:14:31 +02:00
Rémi Verschelde 77724fde60 Fix type mismatch in iOS interface orientation checks
Not sure why this error popped up when I enabled C++11 on the codebase,
but I guess this should fix it.
2019-07-22 20:31:15 +02:00
Rémi Verschelde 66d09a6b4c SCons: Fix uses of [].append instead of env.add_source_files()
Also added support for SCons project-absolute paths (starting with #) and
warning about duplicates in add_source_files(), and fixed
default_controller_mappings.gen.cpp being included twice after first build
due to *.cpp globbing.

Part of #30270.
2019-07-22 15:08:32 +02:00
Rémi Verschelde 63544e6b02 Emscripten: Do not define BINARYEN_TRAP_MODE='clamp'
It is not supported in Emscripten's `latest-upstream` LLVM backend,
and doesn't seem necessary in the `latest` backend either.
It was initially added in #22857 to solve a compilation error with the latter.

Part of #30270.
2019-07-22 13:21:56 +02:00
Rémi Verschelde d15cf7b672
Merge pull request #30576 from qarmin/lgtm_coverage
Changed some code reported by LGTM and Coverity
2019-07-20 12:00:13 +02:00
unknown b0e44c9e5d Removed an unused commit 2019-07-20 14:40:09 +05:30
qarmin 6cbaf7662f Changed some code showed in LGTM and Coverage 2019-07-20 08:09:57 +02:00
Cameron Reikes 0584911f9f CameraServer is needed for editor node
- Editor asks ClassDB for docs
 - ClassDB asks CameraFeed for default parameters
 - In CameraFeed's constructor, polls CameraServer
2019-07-16 15:45:40 -07:00
Saracen c81ec6f26d Exposes capture methods to AudioServer, variable renames for consistency,
added documentation.
2019-07-15 15:12:29 +01:00
Rémi Verschelde 3e40827050
Merge pull request #30465 from guilhermefelipecgs/cursor_blinking
Fix cursor blinking in integrated GPUs
2019-07-10 13:33:11 +02:00
Guilherme Felipe a9a0d0fb15 Fix cursor blinking in integrated GPUs
Optimization for Input::set_custom_mouse_cursor when used inside
_process function. (Avoids cursor blinking in low end devices)
2019-07-09 19:38:25 -03:00
Fabio Alessandrelli 0c19674621 Better detect Emscripten toolchain.
Emscripten is apparently changing the variables in its config file,
causing potential breakage of our build system.

Binaries of the latest/latest-upstream releases are located in a
subfolder of BINARYEN_ROOT called emscripten.
Binaries of the other releases (e.g. sdk-1.38.31-64bit) are instead
placed under the EMSCRIPTEN_ROOT folder.

This PR checks if BINARYEN_ROOT has a subfolder called emscripten, if
that does not exists, it falls back to checking the EMSCRIPTEN_ROOT.

This way we give precedence to the new releases, given that activating
multiple releases sequentially might result in having mismatching
BINARYEN_ROOT and EMSCRIPTEN_ROOT.
2019-07-09 19:17:27 +02:00
Rémi Verschelde dcc1ba3523
Merge pull request #30374 from BastiaanOlij/fix_ios_privileges
iOS Microphone and Camera privileges improvements
2019-07-08 08:28:31 +02:00
Rémi Verschelde af80182016
Merge pull request #30407 from qarmin/small_fixess
Fixes minor issues found by static analyzer
2019-07-08 08:16:50 +02:00
qarmin 9a77d748c0 Fixes minor issues found by static analyzer 2019-07-07 23:08:51 +02:00
Ibrahn Sahir 4e4697b1c4 Added release function to PoolVector::Access.
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
2019-07-06 12:04:27 +01:00
Bastiaan Olij 776dc93571 Add microphone privilege settings support back into export and add privilege exist check to camera server for iOS 2019-07-06 15:48:51 +10:00
Rémi Verschelde a149e412f7
Merge pull request #24086 from RandomShaper/bundle-pck-to-executable
Enhance game export
2019-07-05 10:28:29 +02:00
Rémi Verschelde 44ea7ed583
Merge pull request #26674 from hunte922/master
Hide command prompt launched by OS.execute
2019-07-05 09:38:13 +02:00
hoontee 4a58c0487a Hide command prompt launched by OS.execute
Currently, the console appears when running OS.execute in an exported project,
but not in the editor. This change prevents it from appearing in either.

Only affects console applications.
2019-07-04 15:39:57 +02:00
Fabio Alessandrelli aae6c075aa Remove libwebsocket. No longer used, yay! 2019-07-04 15:03:04 +02:00
Pedro J. Estébanez 40f4d3cf0f Add embedded PCK option to PC platforms
The basic point is as in 2.1 (appending the PCK into the executable), but this implementation also patches a dedicated section in the ELF/PE executable so that it matches the appended data perfectly.

The usage of integer types is simplified in existing code; namely, using plain `int` for small quantities.
2019-07-03 21:58:12 +02:00
Rémi Verschelde b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).

We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00
Rémi Verschelde da622682f7
Merge pull request #30258 from m4gr3d/make_metadata_settable
Make the AndroidManifest meta-data name attribute settable.
2019-07-03 06:51:32 +02:00