Commit graph

611 commits

Author SHA1 Message Date
Marcelo Fernandez 9dfdddd827 Improved WASAPI driver logic when devices are connected or disconnected 2017-11-01 10:53:58 -03:00
Matthias Hoelzl fb236045de Make build scripts Scons 3.0/Python3 compatible
- Cherry picked #10662 and fixed merge conflicts.
- Manualy merged the change from #11904.
- Did not merge #12236 since I'm not sure whether the issue
  affects Godot 2.1 and I don't have VS2013 to test.
- Did not merge #11843 since it doesn't seem relevant (the
  code is only needed for creating DONORS.md, etc.).
- Did not merge #10727 and #11752 since they seem to be
  already included in #11742.
- The Windows and Linux builds have been tested with Scons 3.0
  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-10-24 06:41:32 +02:00
Marcelo Fernandez 253db95cba OS::execute can now read from stderr too when executing with a pipe. 2017-09-21 17:44:53 -03:00
Marcelo Fernandez b48704c620 Fix x11 exported executables not getting the +x flag 2017-09-16 22:38:32 -03:00
Pedro J. Estébanez 868211eba7 Fix WASAPI cleanup
Audio drivers are destroyed on OS destruction, when memory management is no longer available so they must release their dynamic allocations explicitly in their `finish()` method.
2017-09-12 17:47:17 +02:00
Marcelo Fernandez 68dd103f1b Added new WASAPI driver for Windows 2017-09-03 17:22:05 -03:00
Rémi Verschelde 9d598833d2 Use HTTPS URL for Godot's website in the headers 2017-08-27 14:11:45 +02:00
Rémi Verschelde 886c7d82d0 Re-apply clang-format to all files
Some badly formatted code has managed to pass through our CI...
2017-08-27 14:11:11 +02:00
Rémi Verschelde cf80fbc95c RtAudio: Restore previous (incorrect but safer) buffer size
See #10683 for a potential better fix, but this close to the 2.1.4 release
I am taking the safe route.
2017-08-27 10:12:25 +02:00
Hein-Pieter van Braam 364f2e8082 Correct hash behavior for floating point numbers
This backports the work in #7815 and the subsequent fixes in #8393

The following program now works as expected in this branch in both
release_debug and debug mode:

```gdscript
        print(sqrt(-1))
        print(sqrt(-1))

        var simple1=asin(10.0)
        var simple2=acos(10.0)
        print(simple1)
        print(simple2)
```

And successfully prints -nan 4 times

This fixes #9580 and fixes #8925
2017-08-20 23:44:28 +02:00
Marcelo Fernandez 647c4ae5bf Add closest_power_of_2 func and implement mix_rate/latency on OS X 2017-08-18 12:10:21 -03:00
Rémi Verschelde 938dc07b2b Merge pull request #7912 from RandomShaper/pause-rasterizer-2.1
Implement time scaling for the rasterizer (2.1)
2017-08-17 11:43:58 +02:00
Fabio Alessandrelli 82b7fca937 Explicitily unsed AI_NUMERICHOST flag to fix HTML5
(cherry picked from commit f863c0ca14)
2017-08-13 20:29:46 +02:00
Marcelo Fernandez 45096ee62c Add missing NULL checks to prevent possible crashes on _add_geometry 2017-08-06 10:37:37 -03:00
David Carlier 14392c9798 get_executable_path slight change to make it work under OpenBSD
(cherry picked from commit df87ad14d0)
2017-07-30 21:11:02 +02:00
Poommetee Ketson 4a0dc529ce BuildSystem: generated files have .gen.ext 2017-06-25 20:31:56 +07:00
Rémi Verschelde ff002ada5d Merge pull request #9022 from RandomShaper/improve-mem-class-2.1
Remove mutex-locking from non-debug memory routines (2.1)
2017-06-17 12:45:12 +02:00
Rémi Verschelde 734045667d Merge pull request #9100 from RandomShaper/optimize-2d-lighting-2.1
Add optimizing AT_LIGHT_PASS builtin to canvas shaders (2.1)
2017-06-15 15:12:43 +02:00
Rémi Verschelde 8536d21931 Merge pull request #9101 from RandomShaper/filtered-texscreen-2.1
Add option for filtered texscreen (2.1)
2017-06-15 13:35:33 +02:00
Pedro J. Estébanez 184ef18420 Add optimizing AT_LIGHT_PASS builtin to canvas shaders
This one allows for complex shaders paired with a simple lighting shader to skip code that would otherwise be pointlessly (and wastefully) run during the light pass.
You can use `if (AT_LIGHT_PASS) , negated or not, and that will be converted to a preprocessed #if when the shader is compiled.
Depending on your game (number of items and lights), this can be a *significant* performance gain, or at least avoids relying on the driver's optimizing abilities.
2017-06-15 02:03:25 +02:00
Pedro J. Estébanez 14e30c3faa Remove mutex-locking from non-debug memory routines
since the malloc() suite is nowadays thread-safe by itself (from MSVC 2010 you don't even have a non-MT runtime and for POSIX-based OSs it's mandatory by the spec.

Bonus: Clear about-to-be-released blocks with a better magic number for better debugging of dangling pointers.
2017-06-08 20:37:43 +02:00
Pedro J. Estébanez 8e4c60756a Add option for filtered texscreen 2017-06-08 20:19:04 +02:00
George Marques b2f8a365f2
Fix cherry-picking issues caused by code updates 2017-06-07 12:59:42 -03:00
George Marques 1cb77c3684
Patch thirdy-party libraries to build for WinRT
- Patch enet code.
- Patch OpenSSL code and add shims for unavailable API.
- Add extra definition header for Freetype.
2017-06-07 11:36:00 -03:00
George Marques c51f54749f
Fix drivers coding for WinRT
- Add a proper function to retrieve IP addresses.
- Solve issues with Windows FileAccess and DirAccess to use the same code
  for WinRT.
- Add patches to the GLES2 rasterizer to workaround ANGLE issues.
2017-06-07 11:36:00 -03:00
Rémi Verschelde 6cf507f004 Move other lone thirdparty files to thirdparty/misc
Also move Box2D ConvexDecomposition contrib code to
thirdparty/b2d_convexdecomp.

(cherry picked from commit d4029aa51a)
2017-05-26 23:39:47 +02:00
Fabio Alessandrelli baa175d7f8 Fix local ip addresses (interfaces) detection.
Ignore non-IP addresses for both windows and unix

(cherry picked from commit a1c41be569)
2017-05-12 20:01:53 +02:00
Fabio Alessandrelli 0dc62633e6 Socket helpers now fall back to ipv4 on systems where ipv6 is disabled.
(cherry picked from commit 020f6a7f20)
2017-05-12 20:01:53 +02:00
Fabio Alessandrelli e9a7eeaf9c Fix UDP wait() not returning after first received packet
(cherry picked from commit 5c6715a291)
2017-05-12 20:01:53 +02:00
Fabio Alessandrelli bd26eacc59 Allow non blocking UDP put_packet in C++.
- Add blocking mode option to PacketPeerUDP.
- put_packet returns ERR_UNAVAILABLE when operation would block.
- ENet module uses non-blocking UDP.

(cherry picked from commit 5f681d0b0f)
2017-05-12 20:01:53 +02:00
Rémi Verschelde e9b045d9e5 Add "Godot Engine contributors" copyright line 2017-04-08 00:45:24 +02:00
Rémi Verschelde 93107f4245 Merge pull request #8141 from elasota/fix-unshaded-spillover
Fix renderer sometimes not applying "unshaded" flag (2.1)
2017-03-27 08:47:15 +02:00
elasota 5d691350c4 Fixed "unshaded" flag not being updated if light_type and receive_shadows_state didn't change. 2017-03-24 20:27:06 -04: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 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 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
Pedro J. Estébanez b4119f4fe9 Implement time scaling for the rasterizer
which affects 3D particles and the TIME uniform
2017-03-20 19:58:22 +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 2664549916 Prevent MSVC build issue after clang-format includes reorder 2017-03-18 23:49:09 +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 dbf0137576 Style: Fix statements ending with ';;'
(cherry picked from commit f44ee891be)
2017-03-18 21:14:33 +01:00
Hein-Pieter van Braam c67b08300a Add a simple signal handler for SIGCHLD on Unix
This fixes #6631

(cherry picked from commit cff6840ff7)
2017-03-18 20:05:57 +01:00