1678 Commits

Author SHA1 Message Date
Hugo Locurcio
403f7dc35f Change ".." punctuation for "..." in editor strings (#16507)
(cherry picked from commit 1c419531a009f48aa074f9b5f93b98d387c33723)
2018-06-05 21:42:33 +02:00
Max Hilbrunner
e29800ea7b Javascript: Remove weird log
(cherry picked from commit 0c56e011adf4de59848d8fb801e8741119548543)
2018-06-01 18:00:51 +02:00
Dmitry Pupinin
188bfd2ac9 Increase versionCode range 3.0
(cherry picked from commit d71d968987055473bbd1ab263f7d9386cc6a2614)
2018-06-01 17:33:27 +02:00
Hein-Pieter van Braam
6635f2a108 Add back missing method from e10a2e5999bb646b0145f898328e8f01731ca854 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 9080e96bc81328e658a03e2cd248c06ddbf9f2ec)
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 07f590046ad1ac96098989f8c266bfa0cc414f18)
2018-05-13 21:58:37 +02:00
Leon Krause
66c0be642f Fix relative mouse motion when captured in HTML5 platform
(cherry picked from commit d78b10313b78e56a65ef4fdfeef6d85ae8ad5311)
2018-05-13 21:52:14 +02:00
Guilherme Felipe
2fa54c1df6 Fix custom cursor disappearing on osx
(cherry picked from commit 48f9e6a05b928bdd9085827c4f6b341f960be75e)
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 08a924bcee3b4d128ddcf261a8c2fc915db486fc)
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 96301e934d7600975922c5f373a488a532d77aad)
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 a6552819b1d357c0ee1afdbec7485afafa544793)
2018-05-08 15:30:11 +02:00
RameshRavone
fa19d01c7b Fix: JAR files signed with the MD5 algorithm as unsigned
(cherry picked from commit d3182248c4ab29ab20decabe17066018298a8073)
2018-05-08 09:06:54 +02:00
Pedro J. Estébanez
e10a2e5999 Implement universal translation of touch to mouse
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)

The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.

Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.

*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.

On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.

Plus: Improve/fix tracking of current mouse position.
2018-04-30 19:04:35 +02:00
Ignacio Etcheverry
00c55bb2eb Fix _export_begin not being called when exporting to android
(cherry picked from commit c8884ce3bddfeb2dead4208047edb27f97a7e78d)
2018-04-29 18:45:09 +02:00
Marcelo Fernandez
e7837828f6 Improved error checking at EditorExportPlatformPC::export_project
(cherry picked from commit 0876502f7288a6d4e4bfb58f8692db3516bebb7c)
2018-04-29 15:12:21 +02:00
Leon Krause
c968c787e5 Disable Emscripten assertions in release_debug builds
The messages generated by some assertions can be confusing to users.

(cherry picked from commit d6c9d8d778954c65d69d1af04a9921d8887dec9f)
2018-04-29 15:01:29 +02:00
Fabio Alessandrelli
66b36235c9 Fix IPhone and OSX cross compilation
(cherry picked from commit e7b9e2f97099bb37fc59dfc00affa04cee18a5d7)
2018-04-29 14:46:03 +02:00
Ruslan Mustakov
4eed7cb9b2 Fix Android input source checks
Input source types are not pure bit flags, they are combinations of
flags, so != 0 check was incorrect and resulted in crashes later, when
trying to obtain the device.

(cherry picked from commit 5dffa506dc3168e96b4a03d1defbf34661cdff05)
2018-04-28 22:50:25 +02:00
Igors Vaitkus
6989a7ac53 Fix UpdatePowerInfo method implementation in PowerIphone class
(cherry picked from commit 06fab24348166e47d010029a3b0bf98b8f82bd32)
2018-04-28 20:11:49 +02:00
Fabio Alessandrelli
5e70e4469a Fix bug in HTML5 HTTPClient.
The URL parameter already has a slash, adding an extra one results in
an invalid resource path

(cherry picked from commit b8c73b195fe2a5df407a5ef3423b182a6c19a93c)
2018-04-28 20:01:35 +02:00
Ruslan Mustakov
c8d0d38cab Add safety checks when handling Android input
It is possible that input comes before the engine is fully initialized.
This fixes the crashes that ocurred when that happens.

(cherry picked from commit 995724b762fd86e46eb9c5e61aa42303f2b48086)
2018-04-28 19:58:00 +02:00
Leon Krause
d3ffc8ad0c Fix engine.js startGame() when loading from directory
(cherry picked from commit 3014e48ec5a985b9d143ba27b91e32b933dcfdad)
2018-04-28 19:54:29 +02:00
Leon Krause
393e1ef4ee Allow custom path when using engine.js preloadFile() with URL
(cherry picked from commit d373029382208226a55ddfc028a3261e0dc8279b)
2018-04-28 19:54:19 +02:00
Leon Krause
78b44eab0a Fix engine.js preloadFile() with directories
(cherry picked from commit 6f1bddf4b5e6716f59bcbd9a7587b6d556251ef9)
2018-04-28 19:54:12 +02:00
Leon Krause
0f6626977b Expose Emscripten libs to engine.js discreetly
(cherry picked from commit 63c7fc6358343c3de6cfaa40436063646eb8b7a1)
2018-04-28 19:54:00 +02:00
bruvzg
de66976ff0 Fix dragging window from non-retina to retina display.
(cherry picked from commit 14597dc2b264c02450dfd7a04314e77d27ea7dc7)
2018-04-28 17:51:11 +02:00
Marcelo Fernandez
9a21f964ba Added new audio device functions to set/get the audio device
(cherry picked from commit ecc1b34cbc2375a57afad822218324d8b88fa721)
2018-04-14 21:42:44 +02:00
bruvzg
ce1b62a01f Explicitly set OpenGL profile to core (X11, Windows).
Enable GLES2 on Windows.

(cherry picked from commit ad67911f1a45370558f968cdc1540f707534c28f)
2018-04-14 20:56:49 +02:00
Ruslan Mustakov
99cf2ffb19 iPhone X support and iOS-related fixes
Starting from April 2018 Apple no longer accepts apps that do not
support iPhone X. For games this mainly means respecting the safe area,
unobstructed by notch and virtual home button. UI controls must be
placed within the safe area so that users can interact with them.

This commit:

- Adds OS::get_window_safe_area method that returns unobscured area of
  the window, where interactive controls should be rendered.

- Reorganizes how launch screens are exported - the previous way was
  incorrect and modern iPhones did not pick up the correct screens and
  because of that used a non-native resolution to render the game.

- Adds launch screen options for iPhone X.

- Makes launch screens optional in the export template. If not
  specified, a white screen will be used.

- Adds App Store icon (1024x1024) export option as it now has to be
  bundled with the app instead of being provided in iTunes Connect.

- Fixes crash when launching games in iOS Simulator. It happened because
  controllerWasConnected callback came before the engine was
  initialized. Now in such case the controllers will be queued up and
  registered after initialization is done.

- Fixes issue with the virtual keyboard where for some reason
  autocorrection panel would intersect with the keyboard itself and not
  allow you to use the top row of the keyboard. This is fixed by
  disabling autocorrection altogether.

Closes #17358. Fixes #17428. Fixes #17331.

(cherry picked from commit 1d9a3a9b1c9ef7db26e53c8aeaab731992cffd6e)
2018-04-14 20:17:47 +02:00
Pedro J. Estébanez
4f0b5f7307 Implement always-on-top for MacOS
Courtesy of @bruvzg.

(cherry picked from commit 2e8c7824c0f2946f6bf33fe0a20eabb779a91763)
2018-04-14 19:04:13 +02:00
Pedro J. Estébanez
1c25e50490 Add new window setting: always on top
Implemented for Windows and Linux.

(cherry picked from commit ee2c31d306e9333b520e0668f26807d876905241)
2018-04-14 19:03:53 +02:00
volzhs
b09d06fcf7 Fix getting Android device information
Fix #17644

(cherry picked from commit 4e378aeeb874b596fa08d079d9e107b2863f1144)
2018-03-29 00:34:31 +02:00
Xavier Sellier
fa9e03996c Prevent android to split-screen
(cherry picked from commit 61e8f8a86689bcac91382f993b7b0f9803222b68)
2018-03-29 00:19:49 +02:00
Marcelo Fernandez
8289f8628d Modify OSX can_export logic to match the logic from EditorExportPlatformPC::can_export
(cherry picked from commit a42dfd7882305e80ba7f7cdacc836de1139d6b50)
2018-03-28 23:47:22 +02:00
bruvzg
d8a0b6ba63 Hack to force macOS window activation for non-bundled app.
(cherry picked from commit 506e17ee7075b107b96cc52854b72c9f2bc3014f)
2018-03-28 23:39:16 +02:00
J Andrew Long
fe20a1e35b add restore purchases for iOS
(cherry picked from commit da652c1539281c820240489cb15c3387033b2af9)
2018-03-28 22:16:07 +02:00
Rémi Verschelde
eeb7385f02 SCons: Fix linking system pcre2 on server platform
Fixes #17245.

(cherry picked from commit e619727e999ecd8e6883330f2c6950cd0624de99)
2018-03-04 13:47:35 +01:00
Marcelo Fernandez
61fd30c00e Fixed Windows ignoring minimized/maximized status set by user
(cherry picked from commit f8da9550f4946d438dc1a9074d039ea7a446c293)
2018-03-01 21:15:35 +01:00
Fabio Alessandrelli
44b206a3fa Fix server build on FreeBSD
(cherry picked from commit 8f9914bd94fced7f60dff40e14fe734203d7c5d4)
2018-03-01 21:12:28 +01:00
Hein-Pieter van Braam
675899a521 Fix various valgrind reported uninitialized variable uses
(cherry picked from commit d702d7b335c0c9305e75131770c0ea739b70d813)
2018-03-01 21:06:31 +01:00
Ruslan Mustakov
61a9ef5d81 Fix intermittent audio driver crash during startup on Android
set_pause can be called before the driver is initialized, and there
already is a check for that. The problem is that the 'active' field
was not initialied in the constructor, which lead to it having an
undefined value.

(cherry picked from commit c10749d51f2b77eb1b38909d790e7d3895a97364)
2018-03-01 21:05:15 +01:00
Rémi Verschelde
a4b077a0ba Android: Mark GLES3 as required in the manifest
Fixes #17076.

(cherry picked from commit 7d09e6540afdf69d3610661145d13090a3d9d18a)
2018-02-27 13:33:59 +01:00
bruvzg
48ed52184d Add missing return statements (iOS and server).
(cherry picked from commit e3c2778d7ecf84d362bae74b93572e7775171cad)
2018-02-27 00:06:01 +01:00
Rémi Verschelde
d79a7a2773 Refactor version macros and fix related bugs
The previous logic with VERSION_MKSTRING was a bit unwieldy, so there were
several places hardcoding their own variant of the version string, potentially
with bugs (e.g. forgetting the patch number when defined).

The new logic defines:

- VERSION_BRANCH, the main 'major.minor' version (e.g. 3.1)
- VERSION_NUMBER, which can be 'major.minor' or 'major.minor.patch',
  depending on whether the latter is defined (e.g. 3.1.4)
- VERSION_FULL_CONFIG, which contains the version status (e.g. stable)
  and the module-specific suffix (e.g. mono)
- VERSION_FULL_BUILD, same as above but with build/reference name
  (e.g. official, custom_build, mageia, etc.)
  Note: Slight change here, as the previous format had the build name
  *before* the module-specific suffix; now it's after
- VERSION_FULL_NAME, same as before, so VERSION_FULL_BUILD prefixed
  with "Godot v" for readability

Bugs fixed thanks to that:

- Export templates version matching now properly takes VERSION_PATCH
  into account by relying on VERSION_FULL_CONFIG.
- ClassDB hash no longer takes the build name into account, but limits
  itself to VERSION_FULL_CONFIG (build name is cosmetic, not relevant
  for the API hash).
- Docs XML no longer hardcode the VERSION_STATUS, this was annoying.
- Small cleanup in Windows .rc file thanks to new macros.

(cherry picked from commit 23ebae01dc7e3df9c842ca7d017f7b233837721d)
2018-02-24 01:34:34 +01:00
Rémi Verschelde
689dfcd9ec server: Add support for statically linking libgcc and libstdc++
(cherry picked from commit be7bfdfac30b3772fde6058d470b81b480f03be7)
2018-02-22 19:06:36 +01:00
luz.paz
751806b5c7 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```

(cherry picked from commit 612ab4bbc6f2396f4dcd68c3f142f7dfa2f5f0a5)
2018-02-22 12:17:06 +01:00
K. S. Ernest (iFire) Lee
bbfec2a7cc Add dummy audio driver, fix dummy rasterizer
(cherry picked from commit 4e1923a931a3d849563bbe5d6fe4a52277daf090)
2018-02-21 21:49:10 +01:00
Fabio Alessandrelli
8849377f6d Fixes to OS_Server and DummyRasterizer to match new signatures
(cherry picked from commit 2de10aa4679a2a5612a7d7939dbd8e74a4caa886)
2018-02-21 21:48:58 +01:00