Commit Graph

1650 Commits

Author SHA1 Message Date
Marcelo Fernandez 9a21f964ba Added new audio device functions to set/get the audio device
(cherry picked from commit ecc1b34cbc)
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 ad67911f1a)
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 1d9a3a9b1c)
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 2e8c7824c0)
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 ee2c31d306)
2018-04-14 19:03:53 +02:00
volzhs b09d06fcf7 Fix getting Android device information
Fix #17644

(cherry picked from commit 4e378aeeb8)
2018-03-29 00:34:31 +02:00
Xavier Sellier fa9e03996c Prevent android to split-screen
(cherry picked from commit 61e8f8a866)
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 a42dfd7882)
2018-03-28 23:47:22 +02:00
bruvzg d8a0b6ba63 Hack to force macOS window activation for non-bundled app.
(cherry picked from commit 506e17ee70)
2018-03-28 23:39:16 +02:00
J Andrew Long fe20a1e35b add restore purchases for iOS
(cherry picked from commit da652c1539)
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 e619727e99)
2018-03-04 13:47:35 +01:00
Marcelo Fernandez 61fd30c00e Fixed Windows ignoring minimized/maximized status set by user
(cherry picked from commit f8da9550f4)
2018-03-01 21:15:35 +01:00
Fabio Alessandrelli 44b206a3fa Fix server build on FreeBSD
(cherry picked from commit 8f9914bd94)
2018-03-01 21:12:28 +01:00
Hein-Pieter van Braam 675899a521 Fix various valgrind reported uninitialized variable uses
(cherry picked from commit d702d7b335)
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 c10749d51f)
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 7d09e6540a)
2018-02-27 13:33:59 +01:00
bruvzg 48ed52184d Add missing return statements (iOS and server).
(cherry picked from commit e3c2778d7e)
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 23ebae01dc)
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 be7bfdfac3)
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 612ab4bbc6)
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 4e1923a931)
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 2de10aa467)
2018-02-21 21:48:58 +01:00
Fabio Alessandrelli 149ffcb1a4 server platform now compiles and run on linux.
Seems to also be able to do exports of some demos I tried.

(cherry picked from commit 6784d743f7)
2018-02-21 21:48:46 +01:00
Leon Krause a423adbee6 Flush HTTPClient response data only on request/close in HTML5 platform
(cherry picked from commit 98039909f2)
2018-02-19 22:42:38 +01:00
Leon Krause c5b5fd61d4 Warn when polling HTTPClient synchronously in HTML5 platform
(cherry picked from commit ca9fa9cca8)
2018-02-19 22:42:31 +01:00
Leon Krause 5bb269d01d Disable insecure HTTP methods CONNECT and TRACE in HTML5 platform
(cherry picked from commit 2cd7bc04ea)
2018-02-19 22:42:22 +01:00
Leon Krause d5535d9357 Fix HTML5 HTTPClient response header retrieval
(cherry picked from commit 8a21f27f54)
2018-02-19 22:42:08 +01:00
Leon Krause 2714b851bf Fix HTML5 HTTPClient failure detection
(cherry picked from commit 9ea4452d21)
2018-02-19 22:42:01 +01:00
Pedro J. Estébanez bafbd73b51 Remove window decorations for fullscreen on X11
(cherry picked from commit 935a99e758)
2018-02-19 22:36:20 +01:00
Rémi Verschelde 8372a404bb X11: Link libgcc statically with use_static_cpp option
We were already linking libstdc++ statically for official binaries,
protecting us against most portability issues. But apparently since
we started using GCC 7 for official builds, we also need to link
libgcc statically for at least 32-bit builds to be portable.

Fixes #16409.

(cherry picked from commit b526088ae2)
2018-02-19 22:33:29 +01:00
BTaskaya 12da8dcdeb PEP3101 applied with changing old type string formatting as new ones
(cherry picked from commit 78dba05fc0)
2018-02-19 22:25:41 +01:00
Iskustvo 4bdcee2b9d [X11] Improving error detection in move_to_trash
(cherry picked from commit 268d7c7c5b)
2018-02-19 22:20:06 +01:00
Rémi Verschelde fd033473c7 Fix broken APK expansion due to missed option renames
Command line options were refactored for 3.0 to follow the common usage
of double-dashed long options, but `--main-pack` went through the cracks.

Fixes #16533.

(cherry picked from commit e3658a6464)
2018-02-19 22:19:08 +01:00
Marcelo Fernandez 150423203b Added OS::center_window to center the window precisely on desktop platforms
(cherry picked from commit ea1d726a46)
2018-02-19 22:14:05 +01:00
Rémi Verschelde 801b544ee1 Windows: Fix case of imm32 for case-sensitive MinGW build
Fixes #16713.

(cherry picked from commit 4fa8987494)
2018-02-19 22:13:44 +01:00
geequlim 097f95993f Windows: implement OS.get_unique_id and OS.set_ime_position
(cherry picked from commit 3be04f73f5)
2018-02-19 22:13:39 +01:00
Colin Kinloch 611caa06a5 Fixed android arm64v8
(cherry picked from commit 853b1daa49)
2018-02-19 20:46:49 +01:00
Paolo Perkovic 7de47fbabb Fix inconsistencies and typos in argument names
(cherry picked from commit 08d4bfacaf)
2018-02-04 20:10:13 +01:00
Hein-Pieter van Braam a34afa3820 Implement OS::get_processor_count() for Windows
Current this is hardcoded as '1' for any platform except Unix. The
little is_wow64() dance is required to get correct output on a 32bit
compiled godot running on 64bit Windows according to MSDN.

This code should be UWP safe but I have no way to test that so it's not
implemented for UWP yet.

(cherry picked from commit b4d369c887)
2018-01-30 20:56:53 +01:00
bruvzg 77d27053c3 [macOS] Strip executable when `separate_debug_symbols` is set to yes
(cherry picked from commit 9ef0315b06)
2018-01-30 20:56:16 +01:00
Hein-Pieter van Braam e69b30b276 Fix Copy/Paste problems on X11
The target of the TARGETS type should be XA_ATOM and not XA_TARGETS when
requested. Since we are sending a number of ATOMS the size should be set
to the integer size and not the char size.

The size field of the atoms is also the number of atoms and not the size
of the array. This caused some clients to wrongly interpret the data and
read garbage in the X11 packet.

I also add the more modern representation for UTF-8 and clarify the
error message if a client attempts to request a type we don't know
about.

This fixes #10431

(cherry picked from commit fb60f2dbe6)
2018-01-30 20:55:11 +01:00
Rémi Verschelde f12e8568d4
Merge pull request #16081 from djgaspa/dll-directory
Fix remove_dll_directory crash when cookie is null
2018-01-27 23:32:05 +01:00
bruvzg 24b01fe70c
Fix macOS build after #16092 2018-01-26 22:39:08 +02:00
Hein-Pieter van Braam c6d9a7665a Make separate debug symbols opt-in
This adds a separate_debug_symbols option to the x11, windows, and osx
targets. This will default to adding normal debugging symbols to the
artifacts and only splits them when separate_debug_symbols=yes on the
Scons command line.
2018-01-26 20:46:56 +01:00
Rémi Verschelde 9ba5fb87f0 Bullet: allow unbundling only if > 2.87
Looks like we are using cutting edge methods which are not even
if the current stable 2.87.
2018-01-26 19:17:24 +01:00
djgaspa 18e66a28bc Fix remove_dll_directory crash when cookie is null 2018-01-26 12:30:02 +01:00
Rémi Verschelde 8afe5b4d9f
Merge pull request #16059 from eska014/html5-notls
Disable OpenSSL module in HTML5 platform by default
2018-01-25 09:14:50 +01:00
Leon Krause 4a3aaaf276 Disable OpenSSL module in HTML5 platform by default 2018-01-25 09:07:07 +01:00
Rémi Verschelde 94f315df01 Silence verbose stderr info message on X11 2018-01-24 21:49:11 +01:00
Leon Krause dcc55bad20 Fix HTML5 JS API setResizeCanvasOnStart 2018-01-24 05:08:35 +01:00