Commit graph

1287 commits

Author SHA1 Message Date
Rémi Verschelde
0cee288c11 Merge pull request #10148 from leezh/pcre2
Replacement of internal RegEx with PCRE2
2017-08-31 11:56:19 +02:00
Rémi Verschelde
b86aa5614f Merge pull request #10793 from RandomShaper/fix-android-dbg-pre-21
Fix pre-Lollipop Android debug
2017-08-31 11:00:01 +02:00
Rémi Verschelde
433d4ada05 Merge pull request #10765 from poke1024/osx-system-dir
Implements OS_OSX::get_system_dir()
2017-08-31 10:58:02 +02:00
Pedro J. Estébanez
d5447a90cc Fix pre-Lollipop (21) Android debug
Namely, automatically pick debug over Wi-Fi for devices with an older release and debug over USB otherwise.

A message is printed both in editor output window and console (uppercase here) to let the user know about what mechanism is being used and why.
2017-08-30 20:39:01 +02:00
Pedro J. Estébanez
a464659d5b Fix parsing of Android API level
And renaming the `Device.release` field to `api_level` for correctness.
2017-08-30 20:21:26 +02:00
Hein-Pieter van Braam
d44414c711 Disable -ffast-math for etc2comp
Apparently -ffast-math generates incorrect code with recent versions of
GCC and Clang. The manual page for GCC warns about this possibility.

In my tests it doesn't actually appear to be measurably slower in this
case, and this is used in a batch process so it seems safe to disable
this.

This fixes #10758 and fixes #10070
2017-08-30 11:51:24 +02:00
poke1024
9d841b5336 Implements OS_OSX::get_system_dir() 2017-08-29 20:31:03 +02:00
Henrik Andersson
230de5bc9c Fix export of 32 Bits Framebuffer option 2017-08-29 02:36:41 +02:00
Rémi Verschelde
a91d12ab94 Merge pull request #10531 from RandomShaper/remove-old-android-setting
Sanitize Android debug
2017-08-29 00:09:27 +02:00
Rémi Verschelde
9a8a0e20e5 Merge pull request #10552 from RandomShaper/improve-posix
Improve Mac/UNIX conformance/reliability
2017-08-29 00:07:07 +02:00
Rémi Verschelde
3ce6972d2c Merge pull request #10692 from marcelofg55/wasapi_driver
Added new WASAPI driver for Windows
2017-08-28 22:53:53 +02:00
Matthias Hoelzl
b6e1e47e3a Make build scripts Python3 compatible
- The Windows, UWP, Android (on Windows) and Linux builds are
  tested with Scons 3.0 alpha using Python 3.
- OSX and iOS should hopefully work but are not tested since
  I don't have a Mac.
- Builds using SCons 2.5 and Python 2 should not be impacted.
2017-08-27 23:05:39 +02:00
Rémi Verschelde
7ad14e7a3e Dead code tells no tales 2017-08-27 22:13:45 +02:00
Marcelo Fernandez
8e814774b1 Added new WASAPI driver for Windows 2017-08-27 15:26:15 -03:00
Rémi Verschelde
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Rémi Verschelde
c90bfcb1c6 Re-apply clang-format to all files
Some badly formatted code has managed to pass through our CI...
2017-08-27 14:16:32 +02:00
Rémi Verschelde
612099e377 Merge pull request #10591 from Rubonnek/possible-null-ptr-dereference
Added/Fixed null pointer checks
2017-08-27 02:10:56 +02:00
Rémi Verschelde
ea55b400d9 Merge pull request #10598 from Rubonnek/free-memory
Free memory when Main::setup returns an error
2017-08-27 02:10:41 +02:00
Rémi Verschelde
5976e8d7de Merge pull request #10625 from Rubonnek/fixed-leaks
Fixed several memory leaks
2017-08-27 02:10:32 +02:00
Wilson E. Alvarez
7a07895920 Added/Fixed null pointer checks 2017-08-26 16:58:47 -04:00
Henrik Andersson
3cd3c1da5f Fix refactored Object::cast_to in NO_SAFE_CAST branch 2017-08-26 18:59:37 +02:00
Wilson E. Alvarez
bd257153dc Free memory when Main::setup returns an error 2017-08-25 21:12:19 -04:00
Wilson E. Alvarez
1577f41653 Fixed several memory leaks 2017-08-25 08:47:05 -04:00
Hein-Pieter van Braam
cacced7e50 Convert Object::cast_to() to the static version
Currently we rely on some undefined behavior when Object->cast_to() gets
called with a Null pointer. This used to work fine with GCC < 6 but
newer versions of GCC remove all codepaths in which the this pointer is
Null. However, the non-static cast_to() was supposed to be null safe.

This patch makes cast_to() Null safe and removes the now redundant Null
checks where they existed.

It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-24 23:08:24 +02:00
Pedro J. Estébanez
d806ad4a3d Implement custom thread numbering for POSIX
For every UNIX-derived (Android, Linux, macOS, iOS) flavor, a global counter is atomically incremented on thread start. That id is kept as thread-local storage.

Therefore, thread ids are sequential numbers, trivially comparable. This improves the previous state of things, in which `pthread_t` were casted to `Thread::ID` and unportabily compared. Also big, ugly thread ids appeared.
2017-08-24 07:02:55 +02:00
Fabio Alessandrelli
d7f08ead4e Allow building fat binaries with osxcross 2017-08-23 15:44:22 +02:00
Rémi Verschelde
582a97fc2c Merge pull request #10575 from henkz1/android_quit_error
fix UnsatisfiedLinkError when quitting on android
2017-08-23 08:11:34 +02:00
Henrik Andersson
16de3835fa fix UnsatisfiedLinkError when quitting 2017-08-23 03:14:51 +02:00
Wilson E. Alvarez
baa94a3758 Removed unnecessary returns and break statements 2017-08-22 13:01:57 -04:00
Pedro J. Estébanez
2a5ee5dec9 Fix Android remote debug not hitting breakpoints
A change in `Main`'s API is needed. Please read the comment in the diff for an explanation.
2017-08-22 17:24:20 +02:00
Pedro J. Estébanez
39c6b3d942 Make Android debug over USB the only option
'Remote debug over ADB' is removed as that will be always the case.
2017-08-22 17:17:42 +02:00
Rémi Verschelde
7f49e2a7a0 Merge pull request #10487 from marcelofg55/curscr_as_default
p_screen param from get_screen_* funcs now default to the current screen
2017-08-22 08:12:04 +02:00
Rémi Verschelde
df590fc2d3 Merge pull request #10340 from Rubonnek/remove-unnecessary-assignments
Removed unnecessary assignments
2017-08-22 00:58:12 +02:00
Rémi Verschelde
13f879587d Merge pull request #10254 from marcelofg55/master
Added notification const NOTIFICATION_WM_ABOUT
2017-08-22 00:56:31 +02:00
Marcelo Fernandez
63f847b306 p_screen param from get_screen_* funcs now default to the current screen 2017-08-21 18:28:29 -03:00
Wilson E. Alvarez
738d2ab969 Removed unnecessary assignments 2017-08-21 15:15:55 -04:00
Rémi Verschelde
4717d37bfa Merge pull request #10471 from akien-mga/args-doubledash
Third take at making command-line arguments more UNIX-like + main.cpp and help cleanup
2017-08-21 21:01:19 +02:00
Marcelo Fernandez
c6edf1821e Fix y axis for set_window_position on OS X 2017-08-21 12:36:04 -03:00
Rémi Verschelde
93f1fb1c2f Fixes for new two-dash long command line arguments
- Fixes some single-dash leftovers that were missed in the previous commit
- Reorder the help output for clarity, and document missing options
- Drop obsolete options: --noop, --pack, --editor-scene, --level, --import, --import-script, --no-quit
- Improve error message on malformed arguments and do not display help on error
- Always use long form of arguments when starting a new Godot process from C++, for clarity and easy grepping
- Cleanup obsolete code here and there
2017-08-21 08:09:22 +02:00
Juan Linietsky
b9dcebb37c Revert "Second take at making command-line arguments more UNIX-like + main.cpp and help cleanup" 2017-08-19 17:47:27 -03:00
Rémi Verschelde
70b0857f6c Fixes for new two-dash long command line arguments
- Fixes some single-dash leftovers that were missed in the previous commit
- Reorder the help output for clarity, and document missing options
- Drop obsolete options: --noop, --pack, --editor-scene, --level, --import, --import-script, --no-quit
- Improve error message on malformed arguments and do not display help on error
- Cleanup obsolete code here and there
2017-08-19 16:48:11 +02:00
Zher Huei Lee
e3e2f06324 Replacement of internal RegEx with PCRE2
The pattern and replacement matching behaviour has been changed purely
due to the nature of switching to a standards-compliant library.

One mistake in the previous behaviour was that named groups didn't have
a number. This has been corrected.

As names are actually just an alias of numbered groups,
RegExMatch::get_name_dict() is now get_names() and is a dict
referring to the group number it represents.

Duplicate names are enabled and the with the first matching instance
used.

Due the lack of a suitable equivalent in PCRE2, RegExMatch::expand() was
removed.
2017-08-19 19:29:14 +08:00
Richard Adenling
398e0930dc Set the X11 class hint before mapping the window
Setting the class hint before mapping the window will allow some
window managers to determine if a window should be treated specially.
This is also in accordance with the ICCCM spec which says that
WM_CLASS should only be changed when a window is in a
withdrawn (unmapped) state.

Fixes #10429
2017-08-19 00:16:46 +02:00
Rémi Verschelde
6afa087596 Windows: Drop support for obsolete MinGW
The version we support is MinGW-w64: https://sourceforge.net/p/mingw-w64
The old original MinGW from which it was forked (https://sourceforge.net/projects/mingw),
is no longer maintained and useless for us.

Fixes #10396.
2017-08-18 21:46:46 +02:00
Rémi Verschelde
2ed87f33cf Workaround missing WM_TOUCH on mingw-w64 < 4.0
Upstream bug report: https://sourceforge.net/p/mingw-w64/bugs/460/
2017-08-18 21:05:19 +02:00
Rémi Verschelde
3b553377c7 Windows: Drop support for Vista (0x0600)
We need the efficient SRWLock methods which are not supported on Vista,
and loading them dynamically while providing fallbacks is not worth the
effort. Closes #10243.

Sorry Vista users... As you are running a supported which is no longer
supported by Microsoft (https://support.microsoft.com/en-us/help/13853/windows-lifecycle-fact-sheet),
we can only encourage you to upgrade to a more recent version if you can,
or switch to Linux, which should give your old hardware a new youth.
2017-08-18 19:50:24 +02:00
Marcelo Fernandez
eab850524e Add closest_power_of_2 func and implement mix_rate/latency on OS X 2017-08-17 19:51:13 -03:00
Wilson E. Alvarez
bde864cd30 Removed unused variable 2017-08-17 11:43:44 -04:00
Marcelo Fernandez
aae29c7a0e Added notification const NOTIFICATION_WM_ABOUT 2017-08-17 11:28:45 -03:00
TwistedTwigleg
00f6c85928 Synchronize parameter names in definition and declaration
Fixes #10244.
2017-08-16 17:22:23 +02:00