Commit Graph

5761 Commits

Author SHA1 Message Date
Rémi Verschelde d2e8a21cb1 i18n: Adapt script to tools/editor -> editor move 2017-03-24 22:24:56 +01:00
Rémi Verschelde a531051a61 Only assume HiDPI mode if DPI >= 192 and width > 2000
Also use single-dock column if width < 1200.

Manually adapted from bfe67a3b87
and c103f32ea3.

Fixes #6096.
2017-03-24 18:26:56 +01:00
Rémi Verschelde fd17d301d0 Merge pull request #8100 from BastiaanOlij/ios_magnetometer_2.1
Fixing magnetometer on iOS
2017-03-23 09:57:29 +01:00
Rémi Verschelde aaf4e3ab9f Merge pull request #8108 from Faless/2.1-v6fix-cherry
Cherry pick #7510 and #7581 to 2.1
2017-03-23 08:29:08 +01:00
Fabio Alessandrelli 15ecdb5f00 Fix buffer size check in UDP socket.
We were reserving 12 bytes from the buffer for ip, port, and length, but since
IPv6 introduction we should be reserving 24 (IPv6 are 16 bytes)

(cherry picked from commit 5dc7c920bf)
2017-03-22 21:11:49 +01:00
Fabio Alessandrelli 994df5df5c Use default UDP ring buffer size of 65536 for clients
We should probably create a specific function for setting the
recv buffer anyway. UDP sockets does not need to bind (listen)
to be able to call recvfrom. This is especially useful for clients
who just call set_send_address and start communicating with a server.

(cherry picked from commit 9336857132)
2017-03-22 21:07:27 +01:00
Fabio Alessandrelli 7dbccc9a57 Fix bug causing UDP socket to close after the first send if not listening
The ring buffer for receiving packets was not resized in constructor

(cherry picked from commit 68dc969f8c)
2017-03-22 21:05:27 +01:00
Fabio Alessandrelli cab9ad7657 Update docs reference for TCP_Server::listen and UDPPacketPeer::listen
(cherry picked from commit e5e4e7b6a9)
2017-03-22 21:05:02 +01:00
Fabio Alessandrelli 9f41c0a356 Avoid deadlock when writing/reading data on a connecting TCP socket
TCP status polling is always performed as non blocking.
Trying to put a packet on a connecting socket will fail immediately.

(cherry picked from commit fa0cb7da0e)
2017-03-22 21:03:26 +01:00
Fabio Alessandrelli 86de0bd081 Bind to IPv4 on OpenBSD when using wildcard
OpenBSD does not support binding on both IPv4 and IPv6 using the same socket

(cherry picked from commit 619e7a2c8b)
2017-03-22 21:01:14 +01:00
Fabio Alessandrelli d9525082fe Remove set_ip_type from network classes (no longer needed)
- TCP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `connect` -> resolve using best protocol (UNSPEC), socket from address type

- UDP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type
    (to change socket type you must first call `close` it)

(cherry picked from commit 88a56ba783)
2017-03-22 21:00:23 +01:00
Fabio Alessandrelli 0b9684a085 Implement UDP listen bind address
(cherry picked from commit 2fe4ef6699)
2017-03-22 20:25:56 +01:00
Fabio Alessandrelli 43d992fc34 Implement TCP Server bind address
(cherry picked from commit b2839343ca)
2017-03-22 20:25:52 +01:00
Fabio Alessandrelli 90a747a52d IP_Address can now be a wildcard (not a valid IP, used for binding)
(cherry picked from commit 4198291cd4)
2017-03-22 20:01:41 +01:00
Fabio Alessandrelli 603105df18 Convert validity checks of IP_Address to is_valid method.
(cherry picked from commit 98a7e2b4e0)
2017-03-22 20:01:41 +01:00
Fabio Alessandrelli aeffe74a27 Avoid calling close when polling a UDP peer without socket
(cherry picked from commit e4b9b37ccf)
2017-03-22 20:01:13 +01:00
Fabio Alessandrelli ccf37c4ca2 TCP connect always opens correct socket type
TCP client connections does not need to rely on ipv6 dual stack sockets

(cherry picked from commit 55b4f3686d)
2017-03-22 15:40:31 +01:00
BastiaanOlij 4b7d1d8c15 Fixing magnetometer on iOS 2017-03-21 23:50:53 +11:00
Rémi Verschelde a14ad02d15 Merge pull request #8094 from RandomShaper/fix-yield-crash-2.1
Fix random crashes when using yield() (2.1)
2017-03-21 11:07:34 +01:00
Pedro J. Estébanez 48da11372e Fix random crashes when using yield() 2017-03-21 02:54:46 +01:00
Rémi Verschelde 9c75b9dddf Merge pull request #8091 from RandomShaper/fix-particles-2d-2.1
Fix Particles2D process mode back-compat issue (2.1)
2017-03-20 19:49:58 +01:00
Pedro J. Estébanez 98ba3db502 Fix Particles2D process mode back-compat issue 2017-03-20 19:47:25 +01:00
Rémi Verschelde ea987256f6 Revert "Fix drag and drop on 2d viewport"
This reverts commits a9d8da91b7
and 4230b22558.
2017-03-20 16:57:29 +01:00
Rémi Verschelde 51c5a12f43 Travis: Run clang-format static check
Commits or PRs that do not respect the clang-format style that we
enforce will fail the test.

Adding ubuntu-toolchain-r-test as its libstdc++ is necessary to install
libllvm-3.9.

(cherry picked from commit 6aee289b3e)
2017-03-19 16:14:53 +01:00
Rémi Verschelde 3251e93cee Fix linking order for builtin freetype
Before this change the libfreetype_builtin.a lib would be appended
at the very end of the linking flags, after system libs such as -lX11
or -lkernel32.

(cherry picked from commit 26c6c2b01a)
2017-03-19 16:14:47 +01:00
Rémi Verschelde 4230b22558 Fix cherry-pick mistake using 3.0 method
Bug introduced in a9d8da91b7.
2017-03-19 10:01:53 +01:00
Rémi Verschelde f4f0a6c609 Merge pull request #8073 from Hinsbart/bind_parse_ev
Input: bind parse_input_event() [2.1]
2017-03-19 10:00:00 +01:00
Andreas Haas 2f1a0448a7
Input: bind parse_input_event()
When using get_tree().input_event(ev), the engine will JUST send the event down the SceneTree.
However, you won't get any of the benefits of the Input singleton:
- No InputMap actions will be emitted
- The internal input state won't be modified, so methods like `Input.get_mouse_pos()` or `Input.is_joy_button_pressed` won't return the expected output after sending the event.

This is fixed by using `Input.parse_input_event(ev)` instead.
I guess we'll also have to update the docs to reflect that this is the preferred method of sending custom InputEvents.
2017-03-19 08:33:07 +01:00
Andreas Haas c5c546fb7f X11: Don't reset mouse cursor theme.
On KDE (and possibly others) the "default" cursor theme is actually some system default, not the one you've set in the desktop setting.
This was especially annoying when using a white cursor, as Godot would then reset back to a dark one.
In my case it was also keeping the cursor from changing its shape.

(cherry picked from commit fc84ccc468)
2017-03-19 00:44:22 +01:00
Ramesh Mani Maran f2f2369db8 android: adding classpath and gradle plugins
(cherry picked from commit 27c7d253aa)
2017-03-19 00:44:13 +01:00
Andreas Haas 3c16e7842f Editor: Fix "About" dialog
Use a HBoxContainer instead of hardcoded positions.

(cherry picked from commit 7ec697695f)
2017-03-19 00:44:05 +01:00
mbalint12 82ad45024f Fixed typo in gdscript autocompletion.
There was a missing '!' sign, but autocompletion shows parent script members too.

(cherry picked from commit edaf77abd6)
2017-03-19 00:43:07 +01:00
denis e3e86567ba Update mouse position on touch and release events (Android)
(cherry picked from commit 55835167a4)
2017-03-19 00:42:58 +01:00
CrazyGuy108 10119f7b04 List Control::has_point as a virtual method
According to Issue #8018, a BIND_VMETHOD macro wasn't present in scene/gui/control.cpp, while it was declared to be a virtual method in scene/gui/control.h.

classes.xml was updated to also list this method in Control.

(cherry picked from commit 9589936d6e)
2017-03-19 00:42:34 +01:00
volzhs a9d8da91b7 Fix drag and drop on 2d viewport
(cherry picked from commit 4d0a75750f)
2017-03-19 00:40:54 +01:00
AlexHolly cf7ba8e390 fix remove_and_skip()
(cherry picked from commit 3f78f1f17d)
2017-03-19 00:38:36 +01:00
Ignacio Etcheverry 94653f0e88 Fix connection errors when replacing node
- Avoid connecting the signals to nonexistent methods
- Preserve only persistent connections

(cherry picked from commit d210ac66ef)
2017-03-19 00:38:30 +01:00
Rémi Verschelde f8db8a3faa Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
2017-03-19 00:36:26 +01:00
Rémi Verschelde 1d418afe86 Prevent cyclical dependency issue after clang-format includes reorder 2017-03-19 00:33:35 +01:00
Rémi Verschelde d4e0be7632 Add missing map.h include in color defs
(cherry picked from commit 5e13a762ec)
2017-03-19 00:32:58 +01:00
Rémi Verschelde 2664549916 Prevent MSVC build issue after clang-format includes reorder 2017-03-18 23:49:09 +01:00
Rémi Verschelde 1b0e2b0c39 Refactoring: rename tools/editor/ to editor/
The other subfolders of tools/ had already been moved to either
editor/, misc/ or thirdparty/, so the hiding the editor code that
deep was no longer meaningful.

(Manual redo of 49c065d29c)
2017-03-18 23:45:45 +01:00
Rémi Verschelde 9d2c0f6c6e clang-format: Add pre-commit hook
Derived from https://github.com/githubbrowser/Pre-commit-hooks
and https://gitlab.cern.ch/GeantV/geant/blob/master/hooks/pre-commit-clang-format

(cherry picked from commit 0e4ee5935a)
2017-03-18 23:29:45 +01:00
Rémi Verschelde 19f90b59d5 Style: Add .clang-format based on LLVM style
Adapted some parameters to fit the de facto Godot style as closely as possible
(tab indentation, long lines with no wrapping - for now -, indented case labels,
left-aligned pointer operators).

(cherry picked from commit 503c98ead4)
2017-03-18 23:29:45 +01:00
Rémi Verschelde 6e5246e312 Reorder the folders in tools to prepare moving tools/editor
- `certs` and `editor_fonts` go to `thirdparty`
- `dist` and `scripts` go to a new `misc` folder
- `collada` and `doc` go to `tools/editor`

The next step will be to rename `tools/editor` to `editor` directly,
but this will be done at the right time to avoid breaking too many PRs.

(cherry picked from commit b87a232668)
2017-03-18 23:29:43 +01:00
Rémi Verschelde 16b78da941 Style: Various fixes to play nice with clang-format
(cherry picked from commit 2a0ddc1e89)
2017-03-18 23:13:47 +01:00
Rémi Verschelde 2d479aa0c6 Style: Prevent clang-format on JS code
(cherry picked from commit 39114178a0)
2017-03-18 22:52:28 +01:00
Rémi Verschelde dbf0137576 Style: Fix statements ending with ';;'
(cherry picked from commit f44ee891be)
2017-03-18 21:14:33 +01:00
Rémi Verschelde 75bf6a9978 Style: Keep long lines for now
clang-format does not play well with tab-aligned multiline statements...
Some more research will be needed if we want to set a column limit.

(cherry picked from commit e2a3f06f3d)
2017-03-18 21:06:07 +01:00
Rémi Verschelde 4bfecab813 Style: No break before list brace
clang-format does not handle that well *at all*.

For the reference, found the relevant pieces of code with:
`ag "=[ "$'\t'"]?"$'\n'"[ "$'\t'"]?{" --ignore=thirdparty`

(cherry picked from commit 40323407df)
2017-03-18 21:05:58 +01:00