Commit Graph

1715 Commits

Author SHA1 Message Date
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
Zaven Muradyan
27f606db1b Add comments to javascript wrapper parts.
The code in pre.js and engine.js is a bit confusing to see in isolation,
since the files aren't valid JS files by themselves. This just adds some
explanatory text to both files.

Fixes #22937.

(cherry picked from commit 61d5513525)
2018-11-01 11:39:27 +01:00
M. Huri
e6ae704f32 Repaired mistyped of 'its' on several files.
(cherry picked from commit b46ba24e3b)
2018-11-01 11:39:26 +01:00
Rémi Verschelde
80e66a6214 Improve return value of OS.execute in blocking/non-blocking variants
Initialized the PID to -2, which will be the value returns in blocking-
mode where the PID is not available. (-1 was already taken to signify an
execution failure).

OS::execute will now properly return a non-OK error code when it fails
to execute the target file.

The documentation was rewritten to be very clear about the differences
between blocking and non-blocking mode.

Fixes #19056.

(cherry picked from commit f392650be2)
2018-11-01 11:39:20 +01:00
Wojciech Milkowski
74fe5968c1 Fix build with Android NDK r18
As a bonus there is no need to use undocumented Gradle API any more.

(cherry picked from commit 3598165c4d)
2018-10-15 16:27:40 +02:00
Wojciech Milkowski
8c714bf8cd No need to link with libandroid_support in NDK 17
According to https://github.com/bytedeco/javacpp/pull/244 in NDK 17
libandroid_support library is not needed any more, and on armv8 is
already gone which breaks compilation.

(cherry picked from commit 3a3ea6d514)
2018-10-09 09:23:19 +02:00
Ridwan Abdul Hafidh
d3ca68aee4 add support libc++_shared stl on android
(cherry picked from commit b0419db46f)
2018-10-09 09:23:03 +02:00
Tiago Quendera
a063074346 Update detect.py
Fixed a typo in detect.py

(cherry picked from commit aa594614db)
2018-10-09 09:20:31 +02:00
Konstantin Zaitsev
c00c3f10a4 Fix possible NullPointerException crash on cancel payment
(cherry picked from commit d05db4de8e)
2018-07-28 16:06:30 +02:00
Pedro J. Estébanez
bc2ee93758 Fix touch issues on Windows
(cherry picked from commit 2f161ffd4f)
2018-07-27 17:14:22 +02:00
Rémi Verschelde
c709dff1a2 Style: Format code with clang-format 6.0.1
(cherry picked from commit 7c9f7452f4)

Travis: Update style checks to clang-format 6.0.1

(cherry picked from commit 003ac67df1)
2018-07-18 16:37:23 +02:00
Hein-Pieter van Braam
861d341dff Write new permissions to the AndroidManifest.xml
Instead of editing the placeholder permissions actually write new ones.
This should solve the privacy statement problems for the Play store.
This means we also no longer need to placeholder permissions in the
template.

(cherry picked from commit 2a126242dd)
2018-07-08 15:48:08 +02:00
Patrick Kaster
9190ae2be7 added 'android_add_asset_dir('...') method to Android module gradle build config 2018-07-04 23:04:14 +02:00
Hugo Locurcio
403f7dc35f Change ".." punctuation for "..." in editor strings (#16507)
(cherry picked from commit 1c419531a0)
2018-06-05 21:42:33 +02:00
Max Hilbrunner
e29800ea7b Javascript: Remove weird log
(cherry picked from commit 0c56e011ad)
2018-06-01 18:00:51 +02:00
Dmitry Pupinin
188bfd2ac9 Increase versionCode range 3.0
(cherry picked from commit d71d968987)
2018-06-01 17:33:27 +02:00
Hein-Pieter van Braam
6635f2a108 Add back missing method from e10a2e5999 2018-05-14 00:25:34 +02:00
Hein-Pieter van Braam
faceb5b75d Implement pull/18665 for 3.0
Windows detect.py: Detect missing WindowsSdkDir
2018-05-13 22:32:01 +02:00
Leon Krause
868c44b239 Fix keyboard focus lock-out with HTML5 canvas in iframe
(cherry picked from commit 9080e96bc8)
2018-05-13 22:17:53 +02:00
Hein-Pieter van Braam
41bb321962 For uwp the ARM architecture needs to be in lower case
(cherry picked from commit 07f590046a)
2018-05-13 21:58:37 +02:00
Leon Krause
66c0be642f Fix relative mouse motion when captured in HTML5 platform
(cherry picked from commit d78b10313b)
2018-05-13 21:52:14 +02:00
Guilherme Felipe
2fa54c1df6 Fix custom cursor disappearing on osx
(cherry picked from commit 48f9e6a05b)
2018-05-13 21:51:25 +02:00
Ruslan Mustakov
7e09206e5c Proper focus in/out handling on iOS
PR #18675 (commit 96301e9) revealed a problem with how iOS lifecycle
callbacks were handled by Godot. Before that PR it was possible to get
NOTIFICATION_WM_FOCUS_IN callback without getting the corresponding
NOTIFICATION_WM_FOCUS_OUT. That commit added a flag to ensure they are
always coupled, but now there is an issue when, for example, you open a
notification panel on iOS without moving the app to background.
It resulted in view.stopAnimation being called without the
corresponding startAnimation when the app moves to foreground again, so
it looked like the game hanged.

I changed focus out notification to be sent in applicationWillResignActive,
because it makes more sense than to do it in applicationDidEnterBackground,
because it is always called in pair with applicationDidBecomeActive, where
focus in is sent. applicationDidEnterBackground may not come under
circumstances that are now described as a comment in code.

(cherry picked from commit 08a924bcee)
2018-05-13 21:46:57 +02:00
Ruslan Mustakov
ecb4c4268c Resume audio on iOS after phone call or alarm
When a phone call or an alarm triggers on iOS, the application receives
an "audio interruption" and it's up to the application to resume
playback when the interruption ends. I added handling for audio
interruptions same as if the game is focused out and then back in.

(cherry picked from commit 96301e934d)
2018-05-13 21:46:53 +02:00
Hein-Pieter van Braam
5917063192
Merge pull request #18082 from RandomShaper/improve-gui-touch-3.0
Implement universal translation of touch to mouse (3.0)
2018-05-13 21:30:37 +02:00
Rémi Verschelde
1905e1c8a2 Android: Increase targetSdkVersion to 27
Matches the change for 2.1 in #18626, and the new requirements from Google
for new apps starting with August 2018 (targetSdkVersion 26 or higher):
https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

(cherry picked from commit a6552819b1)
2018-05-08 15:30:11 +02:00