Commit graph

280 commits

Author SHA1 Message Date
binbitten edc1761c6e Fix horizontal scroll for windows platform 2018-01-20 22:10:03 +01:00
Juan Linietsky 809c0ba3fa Added middle button doubleclick, fixes #15567
(cherry picked from commit 0f00384c93)
2018-01-16 00:04:06 +01:00
Rémi Verschelde 3102dc17ee
Merge pull request #13437 from xsellier/bugfix/mouse-cursor-lag
Implement hardware cursor acceleration for Godot Engine 2.1
2018-01-03 08:36:44 +01:00
Rémi Verschelde 2712014744 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-02 11:27:24 +01:00
Xavier Sellier 377fdc1e33 Hardware cursor implementation for Godot Engine 2.1
- Remove all references to the variable 'custom_mouse_cursor_hotspot' and 'custom_mouse_cursor' from the project settings.
- Indeed, to implement a custom cursor we need to define a sprite for each 'state' of the cursor. Using those variables in the projects settings would define only the _main_ cursor.
- Cleanup the VirtualServer (Remove references to cursor_set_visible, cursor_set_texture and cursor_set_pos)
- Cleanup the Input (set_mouse_in_window should not be used anymore)
- Update the documentation
- Implement it for windows, X11, Javascript, BB 10, OSx, iOS, server, android
- NOT IMPLEMENTED FOR WINRT (As of today, I'm not able to implement this one, this post might help)
- NOT IMPLEMENTED FOR HAIKU (Support of this platform seems perfunctory)
- Build it for Windows, Android and OSX
2017-12-15 11:37:36 -05:00
Rémi Verschelde 6a4e7198c5 Style: apply clang-format (5.0.0) to current source 2017-12-11 15:31:49 +01:00
Rémi Verschelde acb7107720 Style: apply clang-format (3.9.1) to current source 2017-12-11 15:18:06 +01:00
MrCdK 1cda47a7bc Fix windows compilation when using MinGW
(cherry picked from commit 651677f033)
2017-12-07 07:30:22 +01:00
Pedro J. Estébanez 838fd94a70 Remove dead code from Windows build script 2017-12-07 00:00:24 +01:00
Pedro J. Estébanez a6cedd736b Add build param for targeted Windows version 2017-12-07 00:00:24 +01:00
Pedro J. Estébanez cb23cc1ca4 Improve/fix multitouch on Windows
- Fix logic error.
- Track touches to enable defensive handling and releasing on focus out.
- Change comment-out by preprocessor `#if`.
2017-12-07 00:00:24 +01:00
Rhody Lugo 714e02c0f6 disable caching for targets using helper functions 2017-11-28 16:14:24 -04:00
Rhody Lugo 388249c386 use the same cache for all branches for appveyor 2017-11-28 03:23:51 -04:00
sersoong 320ee1851f Porting 3.0 filessytem_dock's context menu to 2.1 2017-11-19 11:21:36 +08: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
Indah Sylvia 06dd291865 Fixed wrong Virtual-KeyCode(0x12) pair on Windows platform (#12073) 2017-10-14 15:49:21 +07: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 60cf34b968 Added a crash handler to dump the backtrace on Windows, Linux and OS X 2017-09-19 19:56:24 -03: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
Wilson E. Alvarez 48b85347c6 Free memory when Main::setup returns an error
(cherry picked from commit bd257153dc)
2017-08-27 13:02:15 +02:00
Rémi Verschelde 5bcfe43a14 Workaround missing WM_TOUCH on mingw-w64 < 4.0
Upstream bug report: https://sourceforge.net/p/mingw-w64/bugs/460/

(cherry picked from commit 2ed87f33cf)
2017-08-27 12:36:55 +02:00
Marcelo Fernandez e0a243385b Fixed issues with borderless windows on Windows 2017-08-20 12:22:14 -03:00
Marcelo Fernandez 830d7c1af1 Fix get_screen_* funcs returning old values after resolution changes on Windows 2017-08-16 13:13:31 -03:00
Rémi Verschelde bba0be7967 Merge pull request #9885 from bruvzg/2.1-win-num-enter-fix
Fix Numpad Enter key on Windows (2.1)
2017-07-31 22:59:32 +02:00
Rémi Verschelde 437cac9f55 Make MinGW test less verbose on non-Bash shells
The &> construct seems to be Bash-specific.
Supersedes #9755.

(cherry picked from commit 9f768cb519)
2017-07-30 21:36:36 +02:00
Brent Taylor 90f853f710 Support MSVC (2015) build tools 2017-07-26 21:45:11 -07:00
bruvzg 673211a692 Fix Numpad Enter key on Windows 2017-07-26 21:39:02 +03:00
Poommetee Ketson 4a0dc529ce BuildSystem: generated files have .gen.ext 2017-06-25 20:31:56 +07:00
George Marques 7174d706aa
Fix MouseWheel position on Windows 2017-06-15 13:18:58 -03:00
George Marques b2f8a365f2
Fix cherry-picking issues caused by code updates 2017-06-07 12:59:42 -03:00
George Marques 48a06f730f
Implement missing WinRT functions
- Fix buildsystem for WinRT/UWP platform.
- Add audio driver and joystick mapping for WinRT.
- Enable thread class for WinRT.
- Refactor MSVC compiler architecture detection to methods.py, so it can
  be used by Windows and WinRT.
2017-06-07 11:36:00 -03:00
Rémi Verschelde aa046a85dc Merge pull request #8740 from pixelpicosean/scrollingWithFactor
Implemented scrolling factor for precision trackpads for 2.1
2017-05-15 07:57:05 +02:00
Sean Bohan ee670f3724 Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.

Ported from 304a1f5b5a (#7864).
Fixes #492 and #3913.
2017-05-15 06:44:00 +08: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 ef351971d8 Drop EXEC PATHP?? super verbose info message
It seems to give nightmares to Windows users.

(cherry picked from commit dd55950b62)
2017-04-20 01:55:54 +02:00
Rémi Verschelde 7f32db5ac9 Revert "8145 - Mouse Position is unknown until first mouse event on X11 & Win"
This reverts commit e5d63aaece.
Same reasoning as #8291.
2017-04-08 11:28:25 +02:00
Rémi Verschelde e9b045d9e5 Add "Godot Engine contributors" copyright line 2017-04-08 00:45:24 +02:00
Sergey Pusnei e5d63aaece 8145 - Mouse Position is unknown until first mouse event on X11 & Win
- X11 update input->pos on EnterNotify
- X11 & Win call first-time events processing before main initialization

(cherry picked from commit c79e998d1f)
2017-04-05 08:08:08 +02:00
Rémi Verschelde b3d1113ae3 Merge pull request #8152 from Hinsbart/input_id_2.1
[2.1] Better handling of joypad device IDs.
2017-03-27 08:51:15 +02:00
Andreas Haas 8c06da0d49
Better handling of joypad device IDs.
Now InputDefault is responsible for giving out joypad device IDs to the platform, instead of each platform handling this itself.
This makes it possible for c++ modules to add their own "custom" gamepad devices, without the risk of messing up events in case the user also has regular gamepads attached (using the OS code).
For now, it's implemented for the main desktop platforms.
Possible targets for future work: android, uwp, javascript
2017-03-26 00:12:11 +01:00
Rémi Verschelde 31107daa1a SCons: Add option to toggle warnings (on by default)
All the warnings are factored out of the platform-specific files and moved to
SConstruct. Will have to check that it does not introduce regressions on some
platforms/compilers.
2017-03-25 09:24:29 +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 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 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