Commit graph

1740 commits

Author SHA1 Message Date
Rémi Verschelde 362774c617 Windows: Appease capricious MSVC versions with moody headers
Fixes #37799.
Fixes #37986.

(cherry picked from commit 4d3a18d9ff)
2020-05-25 17:59:20 +02:00
bruvzg fe3d7ba5b0 Replace IOHIDDeviceRegisterRemovalCallback with IOHIDManagerRegisterDeviceRemovalCallback to fix gamepad disconnection callback on macOS Catalina.
(cherry picked from commit 6b23e36dbc)
2020-03-06 11:42:36 +01:00
Rémi Verschelde 5bfb10f585 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.

(cherry picked from commit e5dfcb5edd)
2019-11-29 16:02:44 +01:00
Rémi Verschelde e647b5b73c 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.

(cherry picked from commit e9e2a4b044)
2019-11-29 15:59:52 +01:00
Max 82e52c32a6 Fix crash on exit or resume on iOS 13
Fixes #7966.

(cherry picked from commit 29bde8cd74)
2019-11-08 14:09:25 +01:00
bruvzg 68ce59a12d Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
(cherry picked from commit 509afcea92)
2019-10-25 16:32:38 +02:00
bruvzg 84a227b663 [macOS] Fix rendering on retina displays with HiDPI support disabled.
(cherry picked from commit 50e2c1e184)
2019-10-25 16:32:31 +02:00
mellondill 38f1a2c5dd 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

(cherry picked from commit 3c176827d6)
2019-08-21 11:08:18 +02:00
Rémi Verschelde b87d819aad Android: Restore support for android_stl=no builds
Two modules fail building with this option, so we force users to disable them.
Small cleanup based on 2.1 branch and cherry-pick 01e65c4555
to fix support for NDK r20 (fixes #30688).
2019-07-30 15:21:12 +02:00
Rémi Verschelde b896eb5fd4
Merge pull request #30291 from akien-mga/3.0
Assorted cherry-picks from the master branch for Godot 3.0.7
2019-07-09 08:46:19 +02:00
Rémi Verschelde 3600735b24 Android: Target SDK 28, required by Google from Aug 2019
(cherry picked from commit 7249992b62)
2019-07-08 14:08:23 +02:00
Leon Krause bcbc198992 Enable Theora module for HTML5 platform
(cherry picked from commit b4b816c122)
2019-07-03 17:02:13 +02:00
Ibrahn Sahir c27f44f525 Check project settings live before lookup in crash handler
In x11, windows and osx crash handlers, check project settings exists
before looking up the crash handler message setting.
Avoids crashing the crash handler when handling a crash outside project
settings lifetime. Instead omitting the configurable message and
continuing with trace dump.

(cherry picked from commit 63068e2ccd)
2019-07-03 17:02:13 +02:00
Bastiaan Olij 633ac4f753 Using DisplayLink to emulate vsync on OSX
(cherry picked from commit b53f2d1d59)
2019-07-03 16:10:10 +02:00
bruvzg 0195619925 [macOS] Fix missing mouse move event speed.
(cherry picked from commit b7e9e184aa)
2019-07-03 15:54:38 +02:00
Hein-Pieter van Braam cada03eedb Don't use -ffast-math or other unsafe math optimizations
Godot supports many different compilers and for production releases we
have to support 3 currently: GCC8, Clang6, and MSVC2017. These compilers
all do slightly different things with -ffast-math and it is causing
issues now. See #24841, #24540, #10758, #10070. And probably other
complaints about physics differences between release and release_debug
builds.

I've done some performance comparisons on Linux x86_64. All tests are
ran 20 times.

Bunnymark: (higher is better)
(bunnies)    min    max  stdev average
fast-math   7332   7597    71     7432
this pr     7379   7779   108     7621 (102%)

FPBench (gdscript port http://fpbench.org/) (lower is better)
(ms)
fast-math  15441  16127   192    15764
this pr    15671  16855   326    16001  (99%)

Float_add (adding floats in a tight loop) (lower is better)
(sec)
fast-math   5.49   5.78  0.07     5.65
this pr     5.65   5.90  0.06     5.76  (98%)

Float_div (dividing floats in a tight loop) (lower is better)
(sec)
fast-math  11.70  12.36  0.18    11.99
this pr    11.92  12.32  0.12    12.12  (99%)

Float_mul (multiplying floats in a tight loop) (lower is better)
(sec)
fast-math  11.72  12.17  0.12    11.93
this pr    12.01  12.62  0.17    12.26  (97%)

I have also looked at FPS numbers for tps-demo, 3d platformer, 2d
platformer, and sponza and could not find any measurable difference.

I believe that given the issues and oft-reported (physics) glitches on
release builds I believe that the couple of percent of tight-loop
floating point performance regression is well worth it.

This fixes #24540 and fixes #24841

(cherry picked from commit e5b335d367)
2019-07-03 15:53:22 +02:00
Ruslan Mustakov c42cacfc3d Fix iOS safe area insets to use pixels and not points
(cherry picked from commit 230510d628)
2019-07-03 15:41:00 +02:00
Marcelo Fernandez 08fd792c45 Fix X11 running a project with fullscreen setting on and resizable off with multiple screens
(cherry picked from commit 385832ed30)
2019-07-03 15:07:21 +02:00
bruvzg 02585688cd [macOS] Disable setWantsLayer on macOS < 10.14
(cherry picked from commit 4aa441591c)
2019-07-03 15:05:47 +02:00
bruvzg f666a5f34a [macOS] Fix blank splash screen
(cherry picked from commit 30852d0237)
2019-07-03 14:59:46 +02:00
bruvzg a110937a16 Fix initial blank screen on macOS Mojave (except splash).
(cherry picked from commit 07aee14dd7)
2019-07-03 14:59:22 +02:00
bruvzg 811b11c452 Fix .app bundle crash on macOS
(cherry picked from commit cfce8de0b5)
2019-07-03 14:58:46 +02:00
Colin Kinloch 9e91d4e5cb Update mouse location on background scroll and window focus in macOS
(cherry picked from commit 464842c62c)
2019-07-03 14:57:53 +02:00
Xavier Sellier 9776f0da4d Prevent a device to be added/deleted more than once on Android
cherry-picked from fb5a601217

(cherry picked from commit 7dcf779a8b)
2019-07-03 14:41:29 +02:00
Karen Schwane 6392a7d7f1 Move jcenter behind mavenCentral and google gradle repos to fix build problems
(cherry picked from commit a01ce6299c)
2019-07-03 14:41:03 +02:00
Ibrahn Sahir 2e86a5f929 Fixed hang when segfaulting after OS object destroyed (OSX and X11)
The two POSIX style crash handlers (OSX and X11) now remove their signal
handlers when they are destroyed.
Additonally if they are called while no OS singleton is set, they will
simply abort(). This should not happen now that they remove themselves,
but if a future change seperates OS object and crash handler lifetimes,
this may be easier to report/debug than hanging on SIGSEGV.

(cherry picked from commit 653b832422)
2019-07-03 14:25:56 +02:00
volzhs a3753eda62 Ignore invalid device for Android
(cherry picked from commit 3a2d707697)
2019-07-03 14:25:22 +02:00
Hein-Pieter van Braam c3ac242181 When resizing an X11 window wait for the WM to process our request
On X11 when we send an XResizeWindow request to the X server it is happy
to say it is done when the request has been handed over to the window
manager. The window manager itself may however take some time to
actually do the resize. Godot expects that a resize request is
immediate. To work around this issue we could implement the whole
_NET_WM_SYNC_REQUEST protocol. However this protocol does not fit very
well with the way we currently process X events and would when
implemented in the current framework still cause a 1 frame delay between
a resize request and the actual resize happening.

This fixes #21720

(cherry picked from commit 9a1deedb84)
2019-07-03 14:18:17 +02:00
Pedro J. Estébanez 61b6c9c348 Fix multitouch input not working on certain devices on Windows
Fixes #20474.

(cherry picked from commit 28019c71a6)
2019-07-03 14:07:11 +02:00
Hein-Pieter van Braam 5e25f40d83 Replace XRaiseWindow with a _NET_ACTIVE_WINDOW ClientRequest
This fixes the editor on X11 not getting put on the foreground when a
debugged project hits an error or breakpoint.

(cherry picked from commit 827cadafc8)
2019-07-03 13:53:55 +02:00
Marcin Zawiejski 771f1fe5c1 Fix Windows handles leak
Fixes thread and process handles leak when running and killing project
from editor (caused by a missing CloseHandle call) plus a potential leak
when calling OS_Windows::execute with p_blocking and !r_pipe.

The leak could be easily observed with a Handles counter in Task Manager
(or Performance Monitor) for the Godot editor process.

(cherry picked from commit b1e0da455b)
2019-07-03 13:35:41 +02:00
Ibrahn Sahir b890ed527b fixed branch on uninit and data race in editor android device polling
Initialised relevant variables before stating thread,
to prevent a branch on uninitialised data.
Fixed race condition in polling that could miss a device change.

(cherry picked from commit fe4265ad46)
2019-07-03 13:06:46 +02:00
Duy-Nguyen Ta f27c989829 bugfix: correct #ifdef for TOUCH_ENABLED and OPENGL_ENABLED
(cherry picked from commit 25ad5f8a35)
2019-07-03 12:40:34 +02:00
bruvzg 042a74a696 [macOS] Allow using user provided .icns files for exported app icons.
(cherry picked from commit 22ee26849e)
2019-07-03 12:33:25 +02:00
bruvzg 56a82b473e Fix macOS icon export (add 1024px PNG icon and 32px/16px RLE icons).
(cherry picked from commit 56b26c4369)
2019-07-03 12:33:25 +02:00
Bernhard Liebl ac1520325c Catch NSException in macOS run loop to prevent crashs
(cherry picked from commit 3ff18ee61e)
2019-07-03 12:27:23 +02:00
Rémi Verschelde e284ea344d SCons: Default to builtin libpng/freetype on Linux (+ openssl)
The rationale for keeping those shared by default is that they're typical
dependencies found on any Linux system, and it saves compilation time and
binary size to link their dynamically.

But since official builds default to all-builtin, and Debian/Ubuntu still
don't have libpng16 (which we now require) readily available on all their
supported releases, it's simpler to bundle all the things.

This does not change the fact that those dependencies *can* be unbundled
on Linux, it's only the default option changing.

(cherry picked from commit 1769cbc0e2)

For 3.0, also building by default against bundled openssl.
2019-07-02 15:00:59 +02:00
Rémi Verschelde a68965f64a SCons: Fix python3 compat for builtin_bullet=no
(cherry picked from commit 44f1b390a3)
2019-04-03 17:01:46 +02:00
Rémi Verschelde 917d027941 Android: Enable arm64-v8a export by default
From August 1, 2019, Google Play requires that all new apps and app updates
include 64-bit versions, so we enable ARM64 by default.

IINM support for x86 and x86_64 is still be optional, so not enabling them
out of the box.

Part of #25030.

(cherry picked from commit 9e820cdf20)
2019-01-16 13:59:41 +01:00
Rémi Verschelde 0aa350306b SCons: Drop unused MPC_FIXED_POINT define
(cherry picked from commit eebca76be5)
2019-01-16 13:02:53 +01:00
Rémi Verschelde 392e5cfa1e Android: Add support for x86_64 architecture
Like arm64v8, this is only supported by API 21 and later,
so we enforce 21 as min API for x86_64.

Part of #25030.

(cherry picked from commit 7f4ee36469)
2019-01-16 12:51:56 +01:00
Rémi Verschelde 9b226e60e3 SCons: Deprecate ios_sim option forcing x86, simulator needs x86_64
(cherry picked from commit 95e96947f6)
2019-01-16 12:35:29 +01:00
Hein-Pieter van Braam 49929c1e57 Fix OSXCROSS build with clang-6.0
Backport from Fabio Alessandrelli's commit at
875d822d77
2019-01-08 00:55:46 +01:00
Rémi Verschelde 0eab0d9343 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-03 11:41:35 +01:00
Rémi Verschelde 468b3dccab Fix missing/malformed license headers 2019-01-03 11:18:27 +01:00
Andrea Beconcini 134428aefd uwp export: fix existing template check
(cherry picked from commit 11a1624202)
2018-11-28 10:28:28 +01:00
Leon Krause 701683e557 Fix HTML5 gamepad input
(cherry picked from commit cd7c0f67b9)
2018-11-28 10:27:42 +01:00
Hein-Pieter van Braam 3f5d9074e4 Properly export the various 'use dGPU' symbols when building with MingW
This fixes exporting the NvOptimusEnablement export when building with
MingW. This also adds the equivalent for AMD.

This fixes #23400

(cherry picked from commit 19d91f788d)
2018-11-28 10:27:42 +01:00
volzhs 5dd8f775f9 Fix keep screen on property path for Android/iOS/UWP
(cherry picked from commit d18235bc38)
2018-11-28 10:27:41 +01:00
Juan Linietsky 10a71ab4d6 Added missing support for traditional chinese on Windows, fixes #7674
(cherry picked from commit e896261b87)
2018-11-28 10:27:41 +01:00