Commit graph

2298 commits

Author SHA1 Message Date
Rémi Verschelde eaaff9da31
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
2019-06-27 01:05:18 +02:00
qarmin 4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Nicholas Thompson c48576f733 Allow '-' character in iOS reverse DNS identifiers dissallow underscores. 2019-06-25 11:46:43 +01:00
Rémi Verschelde ab932bb675
Merge pull request #29948 from lawnjelly/androidkeyboard
Fix some keyboards not working with Android
2019-06-24 19:32:42 +02:00
Rémi Verschelde 1769cbc0e2 SCons: Default to builtin libpng/freetype on Linux
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.
2019-06-23 10:02:35 +02:00
lawnjelly 512f8ebb93 Fix some keyboards not working with Android
Fixes #17004

Currently the keydown and keyup messages are handled with method like this:

if ((source & InputDevice.SOURCE_JOYSTICK) == InputDevice.SOURCE_JOYSTICK
|| (source & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD
|| (source & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
// joystick input
}
else
{
// keyboard input
}

The constant for SOURCE_DPAD is 513
10 0000 0001

and the constant for SOURCE_KEYBOARD is 257
1 0000 0001

However, rather confusingly, for many keyboards the source sent by android is 769
11 0000 0001

Thus the keyboard is passing the check as being a DPAD and being processed as a joystick rather than keyboard. This PR handles the specific case of 769, allowing input from physical keyboards.
2019-06-21 12:57:33 +01:00
Luka Dornhecker ad504b926f Add option to toggle console window on Windows
This is an editor setting and its value can also be toggled
using an entry in the Editor toolbar. The console will still
appear briefly when starting the project manager or editor,
as it's still compiled as console application.

Does not impact exported games, which will still run without
console in release and with console in debug mode.

A project setting or export option could be added to disable
it in debug mode if there's demand for it, but that would
greatly reduce the usefulness of debug builds if Windows users
can no longer report error and crash messages.

Fixes #17889.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2019-06-20 16:55:52 +02:00
Rémi Verschelde e09cf96857
Merge pull request #29874 from ibrahn/rework-png-loadsave
PNG driver reworked to use libpng 1.6 simplified API
2019-06-20 11:10:02 +02:00
Rémi Verschelde d61bce1b75
Merge pull request #29910 from m4gr3d/dev_deprecate_armv6
Deprecate support for Android armv6 architecture
2019-06-20 10:22:23 +02:00
fhuya f7200d6960 Deprecate armv6 support for Android 2019-06-19 12:05:58 -07:00
JohnJLight 38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Ibrahn Sahir 5e24611241 Png driver reworked to use libpng 1.6 simplified API
Wrapped libpng usage in a pair of functions under PNGDriverCommon,
which convert between Godot Image and png data.
Switched to libpng 1.6 simplified API for ease of maintenance.
Implemented ImageLoaderPNG and ResourceSaverPNG in terms of
PNGDriverCommon functions.
Travis, switched to builtin libpng (thus builtin freetype and zlib also)
so we can build on Xenial.
2019-06-19 11:05:58 +01:00
Martin Capitanio ce1c840635 Linux: Check return values of posix read/write
Fixes #29849, for real this time.
2019-06-19 11:57:38 +02:00
bruvzg e19b6296e3
Update macOS global mouse position at startup 2019-06-18 22:44:29 +03:00
Rémi Verschelde 0f543ba99d
Merge pull request #29852 from georgwacker/fix-controller-hang
Fix endless controller iteration on windows
2019-06-17 18:58:41 +02:00
Georg Wacker 4014888687 Fix endless controller iteration
Fixes #29846
2019-06-17 18:01:09 +02:00
Rémi Verschelde 40db7b85af Linux: Check return value of chdir on cleanup
Some compilers trigger a warning for it if we do not bother
checking the return value.

Fixes #29849.
2019-06-17 17:06:25 +02:00
Rémi Verschelde 24ee8c3566 Add script to fix style issues and copyright headers
This is only meant to check the validity of the whole codebase every
now and then, or to apply clang-format config changes when relevant.
2019-06-17 13:35:47 +02:00
Rémi Verschelde 0d61fc2c0f
Merge pull request #29752 from bruvzg/window_size_limits
Add ability to limit maximum/minimum window size.
2019-06-17 11:58:00 +02:00
Rémi Verschelde f6f9f89078
Merge pull request #29325 from m4gr3d/setup_godot_for_ovr_support
Setup Godot to support the Oculus Mobile SDK.
2019-06-16 10:37:57 +02:00
Rémi Verschelde baab976d0f
Merge pull request #10643 from BastiaanOlij/camera_server
CameraServer class
2019-06-16 10:22:26 +02:00
Rémi Verschelde 1e483d7c73
Merge pull request #29786 from dotdigitalgroup/hidpi-javascript-fix-master
Fix pointer position in hidpi-corrected resolutions on web
2019-06-15 23:06:02 +02:00
Rémi Verschelde 68735d2a88 Fix compilation warnings in JS and Windows builds
Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0.

JS can now build with `werror=yes warnings=extra`.
MinGW64 still has a few warnings to resolve with `warnings=extra`,
and only one with `warnings=all`.

Part of #29033 and #29801.
2019-06-15 14:40:45 +02:00
BastiaanOlij 02ea99129e Adding a new Camera Server implementation to Godot.
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server.
Other parts of Godot can interact with this to obtain images from the camera as textures.
This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
2019-06-15 21:30:32 +10:00
bruvzg b924fb97d6
Add ability to limit maximum/minimum window size. 2019-06-15 09:49:11 +03:00
Leonardo Giovanni Scur 31cc1bdb58 Fix pointer position in hidpi-corrected resolutions on web 2019-06-14 17:37:21 -03:00
Rémi Verschelde bbbc04b2fe
Merge pull request #29711 from zaksnet/windows-export-improvemnts
Added hint for windows export options
2019-06-12 23:44:11 +02:00
Zak 3168c25bad Added hint for windows export options 2019-06-12 14:42:35 +03:00
Rémi Verschelde f65b0c6d89
Merge pull request #29679 from akien-mga/windows-res-desc
Remove "Editor" from Windows PE file description
2019-06-12 13:24:30 +02:00
Rémi Verschelde ec98db048f
Merge pull request #29481 from bruvzg/macos_fix_dvorak_qwerty_cmd_hotkeys
Fixes hotkeys on "Dvorak - QWERTY ⌘" keyboard layout.
2019-06-12 12:50:55 +02:00
Rémi Verschelde 0e6cac8ab8
Merge pull request #29465 from bruvzg/per_pixel_transp_impr
Removes redundant "splash" setting, improves per pixel transparency documentation.
2019-06-12 12:50:17 +02:00
Rémi Verschelde 971b5160c6
Merge pull request #29306 from qarmin/small_code_fixes
Small fixes to unrechable code, possibly overflows, using NULL pointers
2019-06-12 12:49:21 +02:00
Rémi Verschelde 93c00dfcd9 Remove "Editor" from Windows PE file description
Closes #29569.
2019-06-11 15:22:03 +02:00
Rémi Verschelde 6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
Rémi Verschelde 99acec63f1 bullet: Sync with current upstream master branch
This updates our local copy to commit 5ec8339b6fc491e3f09a34a4516e82787f053fcc.
We need a recent master commit for some new features that we use in Godot
(see #25543 and #28909).

To avoid warnings generated by Bullet headers included in our own module,
we include those headers with -isystem on GCC and Clang.

Fixes #29503.
2019-06-11 13:19:42 +02:00
bruvzg 2a950f3a7c
[X11] Add window borderless state detection, fix borderless state restoration after exiting fullscreen. 2019-06-11 12:07:48 +03:00
Rémi Verschelde ee86b18a5e
Merge pull request #29497 from qarmin/fix_memory_leak_in_files
Fix memory leak after closing files
2019-06-10 15:23:26 +02:00
qarmin 53c0a29fb0 Fix memory leak after closing files 2019-06-05 09:34:16 +02:00
bruvzg 360fb3af50
[macOS] Fixes hotkeys on "Dvorak - QWERTY ⌘" keyboard layout. 2019-06-04 19:50:50 +03:00
bruvzg 8ff72987c0
[macOS] Fixes unicode input with IME mode inactive, Improves IME mode documentation. 2019-06-04 11:29:00 +03:00
bruvzg 54863b20e6
Removes redundant "display/window/per_pixel_transparency/splash" setting, improves per pixel transparency documentation. 2019-06-04 11:21:29 +03:00
qarmin 8245db869f Small fixes to unrechable code, possibly overflows, using NULL pointers 2019-06-03 21:52:50 +02:00
Rémi Verschelde f7953ddea8
Merge pull request #29298 from Faless/javascript/clipboard
Partial Javascript clipboard support
2019-06-01 11:18:25 +02:00
Rémi Verschelde af2c742f53 Fix and expose String::strip_escapes(), use it in LineEdit paste
Supersedes #27736.
2019-05-31 15:49:14 +02:00
fhuya 2c3536810a Setup Godot to support the Oculus Mobile SDK. 2019-05-30 16:35:50 -07:00
Fabio Alessandrelli ce542bced1 Implement Clipboard API read when supported.
Being async, the first time a value is pasted GUI elements will still
return the previous one.
This at least until 'clipboardchange' window event gets implemented by
user agents.
2019-05-29 23:21:09 +02:00
Fabio Alessandrelli 2b436dd50e Kinda working HTML5 clipboard paste.
Listen to paste events to update local clipboard.
CTRL+V still not working out of the box.
To do that, We would need to change how we handle keypress, most likely
making it worse and less safe. In the end, I'm not sure we can fix it
properly for now. Maybe in the future, with the Clipboard API, support
of which is still pretty limited on chrome, and only available to
extensions in Firefox.

For now, you can paste via:
- Browser bar -> Edit -> Paste.
- Middle mouse click (Linux only, copies secondary clipboard).

And THEN press CTRL+V
2019-05-29 23:21:09 +02:00
wombatstampede 6e46701e64 Android: Include Joysticks/Gamepads which are available on app start. 2019-05-28 18:23:30 +02:00
Rémi Verschelde 06633a8074
Merge pull request #26462 from SubSage/master
Fixes OS.execute; stderr was silenced; adds missing quote from exe args (windows)
2019-05-28 14:26:57 +02:00
Fabio Alessandrelli 0f76df2397 Add OS clipboard set support to OS Javascript 2019-05-28 12:59:29 +02:00