Hugo Locurcio
be2e8e4047
Convert line endings to CRLF in OS.set_clipboard()
on Windows
...
Windows applications typically expect CRLF line endings in clipboard
content.
This closes #28439 .
2019-04-27 18:59:06 +02:00
Juan Linietsky
af9bb0ea15
Clean up latency related functions
2019-04-27 12:23:05 -03:00
Guilherme Felipe
c709dfdf06
[Input] Release keys/actions pressed if window loses focus
...
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
Co-authored-by: Marcelo Fernandez <marcelofg55@gmail.com>
2019-04-27 12:05:12 -03:00
Michele Valente
c0fcd55f96
fix builds made with Clang on some Linux distros
...
This is the same as #23542 (Fix binaries incorrectly detected as shared
libraries on some linux distros) but for Clang. It should be fine with
Clang 4 or higher.
2019-04-26 15:50:06 +02:00
Rémi Verschelde
7e65a11bcf
Merge pull request #28402 from Valentactive/add-thinlto-support-x11
...
Add option to use ThinLTO
2019-04-25 22:23:31 +02:00
Michele Valente
51f9042a5b
add option to use ThinLTO
...
This adds ThinLTO support when using Clang and the LLD Linker, it's
turned off by
default.
For now only support for Linux added as ThinLTO support on other
platforms may still be buggy.
2019-04-25 19:20:12 +02:00
Rémi Verschelde
24005bc03d
Merge pull request #28396 from akien-mga/scons-capture-the-flags
...
SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGS
2019-04-25 12:22:22 +02:00
Juan Linietsky
cf5881f574
Rename wrong field.
2019-04-24 17:01:20 -03:00
Juan Linietsky
a424d39f76
Remove forgotten strings in configuration files
2019-04-24 16:31:23 -03:00
Juan Linietsky
faaecd6987
Fixes to make exporting more responsive.
...
-Process and drop input in step functions.
-Hide editor file dialog right after pressing ok
-Use actual editor file dialogs for project export.
2019-04-24 15:52:15 -03:00
Rémi Verschelde
c2a669a9f0
SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGS
...
Many contributors (me included) did not fully understand what CCFLAGS,
CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them
in the way they are intended to be.
As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html
- CCFLAGS: General options that are passed to the C and C++ compilers.
- CFLAGS: General options that are passed to the C compiler (C only;
not C++).
- CXXFLAGS: General options that are passed to the C++ compiler. By
default, this includes the value of $CCFLAGS, so that setting
$CCFLAGS affects both C and C++ compilation.
- CPPFLAGS: User-specified C preprocessor options. These will be
included in any command that uses the C preprocessor, including not
just compilation of C and C++ source files [...], but also [...]
Fortran [...] and [...] assembly language source file[s].
TL;DR: Compiler options go to CCFLAGS, unless they must be restricted
to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to
CPPFLAGS.
2019-04-24 16:57:58 +02:00
Kenneth Lee
5c5c3a590a
Fixes build for Windows cross-compilation
...
Fixes #28299
2019-04-23 17:48:46 +00:00
KLee1248
8cbfc0365b
Re-maps KEY_BRACELEFT/RIGHT for OSX users
...
Should fix #28098 .
2019-04-19 02:31:15 +00:00
Rémi Verschelde
2dee231c8e
Merge pull request #28146 from volzhs/unique_id_android
...
Fix get_unique_id() on Android
2019-04-18 13:53:27 +02:00
volzhs
5a4b2087a0
Fix get_unique_id() on Android
2019-04-18 08:07:03 +09:00
Rémi Verschelde
0a40ac3246
Merge pull request #28058 from guilhermefelipecgs/fix_28024
...
Add Input::get_current_cursor_shape
2019-04-16 09:25:00 +02:00
Guilherme Felipe
1bae73d7d0
Add Input::get_current_cursor_shape
...
[Clean up] Removed unused/unnecessary methods.
2019-04-15 15:22:09 -03:00
Fabio Alessandrelli
6a1bf006a3
Move IDHandler JS module to platform from Websock
2019-04-12 12:41:49 +02:00
Windy Darian
ff3fdabc52
Force utf-8 source file encoding in MSVC
...
On Windows, when "Language for non-Unicode programs" were set to "Japanese (Japan)", MSVC would by default use Shift JIS (code page 932) to interpret source files, which would result in test_string failing to compile because of characters in `test_34()`. Forcing utf-8 for MSVC fixes the issue
2019-04-10 23:01:05 -04:00
Hein-Pieter van Braam
f75b9e6246
Merge pull request #27815 from Faless/unix/mem_access
...
Fix jump over uninitialized value in OS Unix/X11
2019-04-10 11:06:37 +02:00
Rémi Verschelde
c8994b56f9
Style: Apply new changes from clang-format 8.0
...
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
Fabio Alessandrelli
0bcf0314f7
Fix jump over uninitialized value in OS Unix/X11
2019-04-09 15:12:55 +02:00
Rémi Verschelde
846e7bbc53
Merge pull request #27490 from bruvzg/macos_non_resizable_fullscreen
...
Allow non-resizeable windows to enter full-screen mode.
2019-04-09 12:30:17 +02:00
Juan Linietsky
dd03dcbd5a
Android now (optionally) builds the template when exporting
...
Added new way to create add-ons
Removed old way to create add-ons
2019-04-07 15:46:52 -03:00
Juan Linietsky
cd4449e7ab
Add FileAccess::set_unix_permissions for Unix platforms
2019-04-07 15:45:30 -03:00
Hein-Pieter van Braam
01f7166d09
Merge pull request #26961 from ibrahn/fix-x11setcontext-access-freed
...
fixed an access after free in OS_X11::set_context. (long version)
2019-04-23 06:14:49 +03:00
Hein-Pieter van Braam
a76d59cba9
Merge pull request #27208 from Calinou/add-lld-linker
...
Add support for linking using LLD on X11
2019-04-23 06:11:48 +03:00
Ibrahn Sahir
9d0b3b300c
fixed an access after free in OS_X11::set_context.
...
Added constructor and assignment operator for CharString
from const char* to simplify memory management when working with
utf8/ascii strings for APIs taking char*.
Reworked OS_X11::set_context to use CharString and avoid some manual
memory management.
2019-04-22 13:34:17 +01:00
Rémi Verschelde
a342131eba
Merge pull request #27673 from qarmin/small_fixes
...
Small fixes, mostly duplicated code
2019-04-22 12:00:34 +02:00
Rémi Verschelde
b4860ce3ac
Merge pull request #28166 from KLee1248/first_bug
...
Use SHGetKnownFolderPath instead of SHGetFolderPathW
2019-04-22 11:53:09 +02:00
Rémi Verschelde
f20c9c25eb
Merge pull request #28164 from BastiaanOlij/AndroidCameraPermission
...
Add camera permissions to android
2019-04-19 11:27:11 +02:00
Rémi Verschelde
d1c26674eb
Merge pull request #28051 from WindyDarian/no_utf8_for_vs2013
...
Ignore '/utf-8' flag on Visual Studio 2013
2019-04-19 08:41:43 +02:00
KLee1248
3d908f57d8
Use SHGetKnownFolderPath instead of SHGetFolderPathW.
...
When getting system directories for Windows, we currently use
SHGetFolderPathW. This is a deprecated function and doesn't support
"Downloads" folders.
As a replacement, this commit uses the newer SHGetKnownFolderPath
function, which is supported since Windows Vista. Godot 3.0 only
supports Windows 7+, so we don't need to use SHGetFolderPathW for
backwards compatibility.
Fixes #26876
2019-04-18 06:45:04 -07:00
Bastiaan Olij
fab84c7dff
Add camera permissions to android
2019-04-18 23:16:41 +10:00
Windy Darian
bd7aa1b6f6
Ignore '/utf-8' flag on vs2013
2019-04-15 08:44:34 -04:00
qarmin
856a8226a5
Small fixes, mostly dupicated code
2019-04-08 11:03:37 +02:00
Rémi Verschelde
c562a7d149
Merge pull request #27067 from shartte/remove-context-gl
...
Remove ContextGL
2019-04-07 12:38:55 +02:00
Hendrikto
49a81308c0
Remove unused imports
2019-04-06 18:05:05 +02:00
Sebastian Hartte
3a8c6db513
Remove ContextGL since as an abstraction it's unused.
2019-04-06 17:52:52 +02:00
Rémi Verschelde
d450220bae
Use mix rate and output latency constants in audio drivers
...
Fix default mix rate in Xaudio2 and potential shadowing issue in JAndroid.
2019-04-06 12:37:25 +02:00
Rémi Verschelde
a9a4936518
Merge pull request #27010 from BastiaanOlij/restructure_android_glue
...
Restructuring android glue code to make it easier to extend
2019-04-06 00:09:16 +02:00
Rémi Verschelde
e4a96164b6
SCons: add methods.using_clang
to check used compiler
...
Also rename `use_gcc` to `using_gcc` to make it clear that it returns
a config but does not alter it.
2019-04-05 12:51:15 +02:00
Bastiaan Olij
b2c0a687f1
Restructuring glue code to make it easier to extend
2019-04-05 21:44:06 +11:00
qarmin
8460d0678c
Small fixes to static analyzer bugs
2019-04-04 22:00:16 +02:00
Rémi Verschelde
44f1b390a3
SCons: Fix python3 compat for builtin_bullet=no
2019-04-03 11:25:01 +02:00
marxin
e7f22ebdcd
Enable warnings=extra on clang and GCC testers.
...
And remove 2 warnings from warnings=extra.
2019-04-02 17:14:47 +02:00
Rémi Verschelde
ab76c649c5
Merge pull request #26958 from bruvzg/macos_hidpi_fixes
...
Fix hiDPI scaling support in `get_real_window_size` and `set_window.size`
2019-04-01 11:00:50 +02:00
bruvzg
7c7182483f
[macOS] Allow non-resizeable windows to enter fullscreen mode.
2019-03-28 15:37:10 +02:00
Pedro J. Estébanez
9c3ddf05cb
Revert accidental commits
...
This reverts commit fb37284c02
.
This reverts commit 4db0f51b9a
.
2019-03-20 21:43:55 +01:00
Pedro J. Estébanez
fb37284c02
Create class for shared memory blocks [wip]
2019-03-20 20:44:43 +01:00
Hugo Locurcio
fd7f253649
Add support for linking using LLD on X11
...
LLD is often faster than GNU ld and gold, resulting in a better
development experience.
This closes #15364 .
2019-03-18 16:52:00 +01:00
Sam Green
4946335d3d
Add EAGLContext for the fallback case
2019-03-16 01:39:36 -07:00
Sam Green
440706814a
Add logging around opengl es context creation. Ensure we can access project settings prior to creating our gl es context, so we can properly determine which driver to use.
2019-03-14 16:31:54 -07:00
bruvzg
85cc435103
[X11] Fix get_window_position
to return absolute coordinates, change set_window_position
to take window decorations into account.
2019-03-12 19:09:16 +02:00
Rémi Verschelde
53131635b4
Merge pull request #26962 from ibrahn/small-x11setcontext-fix
...
fix for access after free in OS_X11::set_context.
2019-03-12 16:28:43 +01:00
Ibrahn Sahir
7822cc9329
fix for access after free in OS_X11::set_context.
2019-03-12 13:41:02 +00:00
Rémi Verschelde
291c281fcf
Merge pull request #26957 from nekomatata/vs-natvis-fix
...
Fixed & improved Visual Studio custom debugger visualization
2019-03-12 14:03:27 +01:00
bruvzg
1b6330b125
[macOS] Fix hiDPI scaling support in OS.get_real_window_size
and OS.set_window.size
functions.
2019-03-12 11:41:41 +02:00
PouleyKetchoupp
fac0f76b7a
Fixed & improved Visual Studio custom debugger visualization
2019-03-12 08:59:30 +01:00
Rémi Verschelde
f1b01c96b9
HTML5: Fix ETC export for GLES2 fallback on mobile
2019-03-11 16:49:33 +01:00
DESKTOP-3H3MR3A\eloisa
b22cf46fdb
Request Android record permission when needed
2019-03-08 12:38:36 -03:00
Rémi Verschelde
201cb8d7ed
Merge pull request #26745 from akien-mga/android-modules-def
...
Define android/modules globally so it appears in Project Settings
2019-03-07 23:06:05 +01:00
Rémi Verschelde
c74bf2e6b1
Define android/modules globally so it appears in Project Settings
...
Until now people had to add it manually to project.godot to load custom modules.
2019-03-07 11:25:58 +01:00
Philip Whitfield
b717eb714c
osx: update mouse position on mouse press
2019-03-07 10:10:33 +01:00
Rémi Verschelde
1100d6a8f2
Merge pull request #26672 from RandomShaper/fix-22955-android-context-loss
...
Restart game on GL context loss on Android
2019-03-06 22:53:12 +01:00
bruvzg
24d59b56d3
[macOS] Fixes NumPad keys detection, adds some missing key mappings.
2019-03-06 22:03:15 +02:00
Pedro J. Estébanez
2d0d64794e
Restart game on GL context loss on Android
...
Bonus:
Remove useless old code about reload hooks
Fixes #22955 .
2019-03-06 19:09:17 +01:00
Rémi Verschelde
e60465dd75
Merge pull request #26707 from bruvzg/fix_macos_mscroll
...
Fix macOS accumulated mouse scroll events.
2019-03-06 15:32:03 +01:00
bruvzg
37f0a6d99a
Fix macOS accumulated mouse scroll events.
2019-03-06 15:35:19 +02:00
volzhs
8920bb8c1b
Fix directory check when exporting project
...
Fix #26702
2019-03-06 21:20:18 +09:00
Rémi Verschelde
b4d5c1ab5b
Merge pull request #26633 from akien-mga/driver-fallback-etc
...
Disable driver fallback to GLES2 by default
2019-03-06 00:57:49 +01:00
Rémi Verschelde
d592ee6be8
Merge pull request #26666 from Calinou/update-server-buildsystem
...
Update the server platform's `detect.py` to match x11's
2019-03-06 00:21:01 +01:00
Luis Martinez
9e465c9fd0
Fixes stderr silence; adds missing quote from exe args(windows)
...
8d117b214f/core/bind/core_bind.cpp (L452)
This function calls the bottom function
8d117b214f/drivers/unix/os_unix.cpp (L312)
OS.execute doesn't send out a value to stderr, so stderr defaults to
false, which will invoke this bottom line and always silence stderr.
8d117b214f/drivers/unix/os_unix.cpp (L315)
Some programs, such as FFmpeg, will print out to stderr with valuable
and vital information. This fixes stderr always being silenced, user can
now opt to have it be read as normal.
2019-03-05 17:07:00 -06:00
Rémi Verschelde
4a8f219660
Merge pull request #26664 from marxin/fix-25714-__bswap_16
...
Replace usage of __bswap_16 with BSWAP16 (#25714 ).
2019-03-05 23:13:23 +01:00
Rémi Verschelde
2e79ec973f
Merge pull request #26626 from rluders/misleading-error-message-export
...
Fixing misleading error message when trying to export
2019-03-05 22:55:16 +01:00
Hugo Locurcio
9e912a4c89
Update the server platform's detect.py
to match x11's
...
This adds support for LTO, UBSAN/ASAN/LSAN, debugging symbols options
and `optimize=size` in the `server` platform.
2019-03-05 22:22:10 +01:00
marxin
f0d2f079c4
Replace usage of __bswap_16 with BSWAP16 ( #25714 ).
2019-03-05 22:17:20 +01:00
Ricardo Lüders
3fdbdd8380
Fixes misleading error message when trying to export
...
This patch fixes the misleading error message when users
try to "export all" into an invalid destination path.
Closes #26539
2019-03-05 21:32:52 +01:00
Rémi Verschelde
b0f782a0e3
Disable driver fallback to GLES2 by default
...
GLES2 is not designed to be a drop-in replacement for the GLES3 backend,
so the fallback mode has to be used knowingly. It *can* make sense for
simple projects which make sure to handle the differences between both
rendering backends, but most users should stick to one supported backend.
By making it opt-in, we can now use this parameter to define whether to
export ETC textures to Android and iOS when using GLES3 + Fallback.
When using GLES3 without Fallback on Android, set the proper min GLES
version in the AndroidManifest.
Also made the option boolean and renamed it for clarity and to avoid
conflict with the previous String option (which would always evaluate as
"true" otherwise).
Fixes #26569 .
2019-03-05 16:36:46 +01:00
bruvzg
75d75c68c4
Fix HTML5 quick preview URL
2019-03-05 15:48:11 +02:00
Sam Green
36d627a9cf
Remove microphone from export options and distribution plist
2019-03-04 18:01:02 -08:00
Rémi Verschelde
b811207406
More style cleanup...
2019-03-04 10:11:29 +01:00
Juan Linietsky
a1e73dcc94
Add support for event accumlation (off by default, on for editor), fixes #26536
2019-03-03 19:53:13 -03:00
Juan Linietsky
8b4c4d9b2f
Implement a more coherent (and way less hack) way to block animation updates, fixes #24618
2019-03-03 17:57:16 -03:00
Juan Linietsky
ae886a6f32
Ability to keep pumping messages while being debugged, may be a solution for #21431
2019-03-03 17:12:19 -03:00
Rémi Verschelde
9d002442b2
Improve VRAM texture compression checks for mobile/web
...
For HTML5, we need to support S3TC if running on desktop,
and ETC or ETC2 for mobile, so make this explicit.
Add logic to check for ETC2 support on GLES3,
and remove incorrect ETC feature for GLES3 on Android.
Fix ETC check invalidating templates on HTML5.
Fixes #26476 .
2019-03-03 13:24:08 +01:00
Rémi Verschelde
a42549b8f7
Merge pull request #26474 from akien-mga/scons-silence-x11
...
SCons: Reduce spam from x11:can_build
2019-03-02 10:48:42 +01:00
Rémi Verschelde
c77c4ef3b1
SCons: Reduce spam from x11:can_build
...
When cross-compiling for non-X11 on Linux, it used to be quite spammy.
Now it will only print errors if you miss more than just pkg-config and x11.
2019-03-02 10:39:20 +01:00
Rémi Verschelde
1807e0f135
SCons: Move platform-specific Opus config to its module
2019-03-02 10:30:25 +01:00
Rémi Verschelde
351a2fa41c
Merge pull request #26353 from ivanarh/android_hide_keyboard_crash
...
Android: Fixed a possible crash in keyboard hide method.
2019-03-01 20:19:48 +01:00
Rémi Verschelde
482dcf5266
Merge pull request #26407 from marcelofg55/audio_input_android
...
Implement Audio Input support on Android
2019-03-01 08:51:00 +01:00
Marcelo Fernandez
29fb6b4e15
Implement Audio Input support on Android
2019-02-28 14:33:43 -03:00
Rémi Verschelde
1e266d874d
X11: Fix drag and drop from non-latin paths
...
Fixes #25826 .
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2019-02-28 12:32:39 +01:00
Ivan Ponomarev
288ff2fd08
Android: Fixed a possible crash in keyboard hide method. It's called not from main thread so InputMethodManager can't be used directly.
2019-02-27 16:59:50 +03:00
Ivan Ponomarev
1073f0b423
Android: Fixed problems with memory leaks due to absent ReleaseStringUTFChars calls.
2019-02-27 15:11:08 +03:00
Rémi Verschelde
426a6fdc17
Merge pull request #26134 from marxin/fix-Wsign-compare
...
Fix -Wsign-compare warnings.
2019-02-27 09:22:47 +01:00
marxin
e5f665c718
Fix -Wsign-compare warnings.
...
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
2019-02-27 07:45:57 +01:00
Juan Linietsky
f669ebeeaf
-Properly handle missing ETC support on export
...
-Added ability for resource importers to save metadata
-Added ability for resource importers to validate depending on project settings
2019-02-26 18:45:06 -03:00
Ivan Ponomarev
1d576f17a7
Fixed possible crash on iOS in applicationDidReceiveMemoryWarning method: event loop may be null when it's called.
2019-02-26 18:36:20 +03:00
Juan Linietsky
5eeb06ffd1
-Remove harcoded opengl extension testing from OS, ask rasterizer instead.
...
-Fixed a bug where etc textures were imported broken
2019-02-26 11:58:47 -03:00