Commit graph

13611 commits

Author SHA1 Message Date
Leon Krause ad8f85f8b7 Fix WebM module for HTML5 platform
(cherry picked from commit 92b259ccf1)
2019-07-03 17:02:13 +02:00
Rémi Verschelde 6604638d82 Fix Theora/Webm loaders declaring binary extension
RES_BASE_EXTENSION is only to declare our proprietary binary formats
(e.g. "scn", "res", etc.).

Fixes #20395.

(cherry picked from commit 333999c24f)
2019-07-03 17:02:13 +02:00
Rémi Verschelde 816366ba05 Fix loading and exporting of Theora and WebM video streams
Theora and WebM video streams were mistakenly imported with a ResourceImporter,
but those imported ogvstr and webmstr were simply links to the local resource.
While that works fine in the editor, it no longer works when exporting a game
as the "source" ogv and webm files are ommitted and only the ogvstr and webmstr
references were exported.

As discussed with @reduz, it doesn't make sense to import videos, as we only
intend to play them back and not modify them/access their raw data. As such we
use a ResourceFormatLoader instead of an importer, to load the file on the fly.
ogv and webm files linked to this loader are now considered as resources, and
thus exported.

Note: The Theora and WebM loaders lack any kind of validity check beyond the
existence of the target file, but it was already the case with the importer.
Better checks and error reports could be added, but those loaders will eventually
be obsoleted by GDNative plugins anyway.

Fixes #14954.

(cherry picked from commit 6dc20adadd)
2019-07-03 17:02:13 +02:00
Fabio Alessandrelli d9992a2b78 Fix ENet incorrectly binding to wildcard.
Values were not properly initialized, and wildcard would evaluate to
true in most cases.

(cherry picked from commit abe2c22966)
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
Hein-Pieter van Braam-Stewart 95fe095a5a Don't try to statically allocate 2x 8193 pointers
Maximum stack size is only 8KiB, this will try to allocate 8193 *
sizeof(void*) * 2 = 131088 bytes on the stack. This causes a crash in
some cases.

(cherry picked from commit c52f890626)
2019-07-03 17:02:13 +02:00
Hein-Pieter van Braam-Stewart 0b4dec63a9 Object::script may not be a valid Ref<Script>
It appears that Object::script may be a valid ScriptInstance but not be
castable to Ref<Script>. There were only 5 places in the code that made
this assumption. This commit fixes that.

(cherry picked from commit 20b0046945)
2019-07-03 17:02:13 +02:00
Rémi Verschelde 733668074a Fix creating editor data, config and cache paths
We used to abort if the system-specific data folder (e.g. `~/.local`
or `%APPDATA%`) is missing, but the next code chunk actually creates
it with `make_dir_recursive` if missing.

Fixes #26598.

(cherry picked from commit c0050d9295)
2019-07-03 16:18:34 +02:00
Hugo Locurcio 41cda84b11 Add a setting hint for the Output panel font size
This closes #21237.

(cherry picked from commit 07e87f6ec0)
2019-07-03 16:13:07 +02:00
Rémi Verschelde d127f92bd5 Image: Fix decompressing ETC2
Thanks to @Rriik for finding the bug and its cause.

Fixes #25595.

(cherry picked from commit 1772d6fa23)
2019-07-03 16:11:46 +02:00
Marc Gilleron 0f2e3976d0 Fixed uninitialized log member due to THEME_CHANGED notification
(cherry picked from commit fb2eb66e40)
2019-07-03 16:11:03 +02:00
Bojidar Marinov aca8176341 Fix crashes when calling update_bitmask_area
Fixes #25504

(cherry picked from commit abfeba8d12)
2019-07-03 16:10:42 +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
Rémi Verschelde 2ff2b727b6 Prevent upscaled SVG from exceeding Image bounds
Also expose Image MAX_WIDTH and MAX_HEIGHT.

Fixes #24455.

(cherry picked from commit cc0842f9a6)
2019-07-03 16:05:39 +02:00
Rémi Verschelde c2541188f2 Fix recursive assignment of Textures and BitMapFont
Fixes #24213.

(cherry picked from commit 402cfa983d)
2019-07-03 16:05:10 +02:00
Konrad Nowakowski 8718f898c1 Fix polygon drawing on WebGL1
(cherry picked from commit a0bdd9605a)
2019-07-03 16:03:06 +02:00
marxin 194ed96e89 Fix #19633 by proper store to &ubo_data.shadow_matrix[1234].
It is not valid in C++ to store into shadow_matrix1[16] with shadow_matrix1[16 * j]
(for j > 0). Even though there's a valid space in a struct after shadow_matrix1.
Knowing that GCC performs aggressive optimizations that eventually lead
to a wrong code. Code has been changed into union where one can either
use shadow_matrix[4 * 16], or individual shadow_matrix1, shadow_matrix2, etc. GCC pragma
is not needed any longer.

(cherry picked from commit d9eb6a5b20)
2019-07-03 15:59:16 +02:00
RedMser 740e77f47f Fix shader compile error line numbers starting at 0.
(cherry picked from commit a285a1cfdf)
2019-07-03 15:55:18 +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
Rémi Verschelde c6cc6c86e5 Fix loading EXR with alpha channel
Fixes #24659.

(cherry picked from commit 08f71baca5)
2019-07-03 15:50:46 +02:00
Daniel Abbott cf2ebf5d47 GodotRestInfoContactResultCallback::addSingleResult now returns normal
`PhysicsDirectSpaceState.get_rest_info()` now provides normals in result
Addresses issue 24558

(cherry picked from commit 572367552c)
2019-07-03 15:50:10 +02:00
Rémi Verschelde 49d724ac52 Label: Fix kerning when using Uppercase mode
Seemingly a typo, I did not check what exact impact it had, but
the x_ofs would likely have accumulated errors when using fonts
with varying char widths.

(cherry picked from commit 7cb5e005ee)
2019-07-03 15:44:00 +02:00
João Álvaro Ferreira 69673367a1 Enabled rst files to escape for parentheses after brackets
(cherry picked from commit a720993cc8)
2019-07-03 15:43:31 +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
Pedro J. Estébanez fc38c87030 Fix blitting from negative position
(cherry picked from commit 6dc9a1b475)
2019-07-03 15:40:42 +02:00
Aaron Franke 58c87e5d26 Fix many errors found by PVS-Studio
Fix errors 2, 3, 4, 6, 8, 9, 11, 12, 13, 14, and 15.

(cherry picked from commit cb01268562)
2019-07-03 15:39:12 +02:00
Leon Krause dafdd9a08e Check for WebGL RGTC extension
(cherry picked from commit 93bed8cf57)
2019-07-03 15:34:25 +02:00
Leon Krause a2381b9049 Build squish decompression in runtime
(cherry picked from commit 32751e09ac)
2019-07-03 15:34:08 +02:00
allkhor b680939036 TextEdit: remove selection when clear happens.
(cherry picked from commit 594e0261f3)
2019-07-03 15:17:13 +02:00
Pedro J. Estébanez 94476aba94 Fix crash on signal/resume to dangling target
(cherry picked from commit 06b6cea62e)
2019-07-03 15:16:33 +02:00
allkhor a1b0e7b12c RichTextLabel: clear the scroll offset.
(cherry picked from commit 970dc91cb7)
2019-07-03 15:15:38 +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
pshe94 4d610757af Use VScrollBar when calculating horiz. offset in ScrollContainer
Someone forgot to change `h_scroll` to `v_scroll` when copy-pasting the code ;)

(cherry picked from commit 554b3f77c7)
2019-07-03 15:02:26 +02:00
Ibrahn Sahir 0b2a884fe2 Assign pointer null in RegEx::clear to avoid double free on destruction.
(cherry picked from commit f8a1c77fcf)
2019-07-03 15:01:37 +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
Poommetee Ketson 0f5538e44d Fix formatting -0.0 by %+f displays +-0.0
(cherry picked from commit aa311320d9)
2019-07-03 14:53:16 +02:00
Ruslan Mustakov e689fe0451 Notify node's moved children after sibling removed
Fixes #16213.

(cherry picked from commit 3b02cd3e71)
2019-07-03 14:52:49 +02:00
Marcelo Fernandez c658929cf3 Fix possible crash with VideoPlayer _mix_audio function
(cherry picked from commit ea43218bca)
2019-07-03 14:51:46 +02:00
Leon Krause 53f484fbba Use BufferSubData instead of MapBufferRange in HTML5 platform
WebGL does not support MapBufferRange or UnmapBuffer.
Also used in non-ES platforms where an extra-copy is avoided.

(cherry picked from commit 92e7c8daf0)
2019-07-03 14:46:06 +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
Sean McCarthy 6dcb5f5ed9 Fix "fill" justification in RichTextLabel to only affect lines that have automatically wrapped.
(cherry picked from commit 0ce185629d)
2019-07-03 14:40:35 +02:00
DualMatrix 1a703c3254 Fixed error when duplicating a scene which has connection
Fixed error when duplicating a scene which has connection

(cherry picked from commit 6afedaa498)
2019-07-03 14:39:52 +02:00
exts a7d070d2d5 fixes #22828 - res://user had incorrect substr value
(cherry picked from commit 18b6f5a6c9)
2019-07-03 14:39:25 +02:00
Gleb Mineev 8ce8a45219 #21661: fixed GraphNode title offset
(cherry picked from commit 746ad820cf)
2019-07-03 14:27:49 +02:00