Commit Graph

65 Commits

Author SHA1 Message Date
Rémi Verschelde bb13fa896e Style: Format code with clang-format 6.0.1 2018-07-18 17:56:12 +02:00
Emanuele Fornara a2bc0be605 Use generic joystick define (Linux platforms) 2018-02-13 21:34:46 +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 9d598833d2 Use HTTPS URL for Godot's website in the headers 2017-08-27 14:11:45 +02:00
Andreas Haas e85be2f5df InputDefault: Fix joypad actions when axis quickly changes direction.
The fix (inserting a fake event so actions get released properly) was already there but disregarded the case when the hardware sends values in the [0;1] range.

(cherry picked from commit 3bea3256f5)
2017-08-13 20:29:47 +02:00
Corruptinator aef0554386 Fixed OUYA Controller Mapping!
The input_default.cpp now has the corrected OUYA Game Controller Mapping
which allows the game console to respond to the controller!
2017-08-13 02:34:22 -07:00
Corruptinator eede898648 OUYA Game Controller GUID for input_default.cpp
Updated input_default.cpp to include the button mapping and GUID of the
OUYA Game Controller. This allows the controller itself to work on
Android devices, including the OUYA and hopefully this fixes issue #9390
for the 2.1.4
2017-07-11 05:15:51 -07:00
Marcelo Fernandez bcb8cc2faa Fix possible crash in joy_axis (fixes #4944).
(cherry picked from commit 2419a4e4ff)
2017-06-25 14:20:47 +02: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
Andreas Haas 37d9a7bee4
Re-add ouya gamepad mapping.
Also adds yet another type of ps4 controller.
2017-04-10 16:38:44 +02:00
Rémi Verschelde e9b045d9e5 Add "Godot Engine contributors" copyright line 2017-04-08 00:45:24 +02:00
Pedro J. Estébanez 5889169bbd Fix warped mouse panning on Linux
Fix/improve it also on certain edge cases for any platform
2017-04-03 02:59:03 +02:00
Andreas Haas 33f9873b70
Input: Update Gamepad mappings. 2017-04-02 09:59:53 +02:00
Andreas Haas 6438823037 Merge pull request #8166 from evolarium/joystick_fix
Initialize hat values for mapping and revert X360 mappings.
2017-03-30 14:16:03 +02:00
Jordan Patterson 391f6c5536 Initialize hat values for mapping and revert X360 mappings. 2017-03-27 11:00:37 -06: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
Andreas Haas ed3134088b Input: Update mouse position on mouse-button events.
(cherry picked from commit 468719c480)
2017-03-24 23:19:49 +01:00
Pedro J. Estébanez 2c2c48ffb3 Implement warped mouse panning for 2D & 3D editors
Enabled by default as in Blender, but can be disabled separately for 2D & 3D;
the core functionality is in Input so this could be reused or even exposed to scripts in the future
2017-03-22 21:18:47 +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 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
BastiaanOlij 8436a34305 Core motion for Godot 2.x (based on PR 7127) 2017-03-09 21:46:38 +11:00
Rémi Verschelde d8223ffa75 Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!

(cherry picked from commit c7bc44d5ad)
2017-01-12 19:15:30 +01:00
Andreas Haas 64b083b496 Allow whitespace in Gamepad mappings.
Previously, mappings that contained whitespace (most likely after a comma seperator) would not parse
correctly.
Consider the following mapping as an example:

"_test_guid_, test controller, a:b0, b:b1, leftx:a0 ,"

(cherry picked from commit fa502b7ccc)
2016-10-17 20:50:43 +02:00
Andreas Haas 33223e7a8a Add function to get readable names for joystick events
Closes #6476

(cherry picked from commit e0fcd9331a)
2016-10-09 17:19:57 +02:00
Andreas Haas e788ffff65 Fix input action pressed state not changing for quick joystick movements.
fixes #6488
Also removes a bunch of dead code related to checking if a joystick axis is pressed.

(cherry picked from commit 84783fe77b)
2016-10-09 17:16:19 +02:00
Andreas Haas 323dec7dd5 x11: fix x360 wireless gamepad mapping.
Uses hat values instead of buttons for the dpad now.
Fixes #6419

(cherry picked from commit 20bad652ef)
2016-09-18 23:13:06 +02:00
Andreas Haas adcf45b627 Update gamepad mappings from community db.
(cherry picked from commit 808bd53934)
2016-09-18 23:03:22 +02:00
Andreas Haas cd6afd5f1d Fix crash when trying to access the guid of an unavailable Gamepad.
Throws an error now.

(cherry picked from commit 02a8604906)
2016-09-01 08:45:51 +02:00
Andreas Haas 5f18c5cb46 Fix steam controller gamepad mapping
The left stick click was missing

(cherry picked from commit e52567bd29)
2016-08-08 18:14:51 +02:00
Andreas Haas ccf6b3151d Add gamepad mapping for the steam controller userspace driver. 2016-07-26 11:54:59 +02:00
Jamil Halabi 370ae3512d Added gyroscope support to Godot and Android 2016-07-16 01:43:32 +08:00
punto- bba89aef3b Merge pull request #5559 from Hinsbart/connected_joysticks
Input: add get_connected_joysticks() method.
2016-07-10 14:00:27 -03:00
Andreas Haas 45cfd199a4
Input: add get_connected_joysticks() method.
fixes #5465
2016-07-05 14:08:02 +02:00
Andreas Haas 91add16300 Can use AtlasTextures as custom mouse cursor.
fixes #3957
2016-07-03 19:36:12 +02:00
Wilhem Barbier 913e3206db Fix the joystick vibration timestamp 2016-06-20 09:57:23 +02:00
Rémi Verschelde 57e1387199 Merge pull request #5225 from Hinsbart/x_rumble
Windows: Support gamepad vibration using XInput.
2016-06-19 12:59:18 +02:00
Rémi Verschelde a7fc04626a Add missing license headers in our source files (#5255)
Also removes a couple wrong Godot headers from third-party source files.
2016-06-18 14:46:12 +02:00
Andreas Haas 0e8b860048 Windows: Support gamepad vibration using XInput. 2016-06-15 14:40:57 +02:00
Wilhem Barbier f665200df7 Add joystick vibration support on Linux (#5043) 2016-06-15 07:25:35 +02:00
Andreas Haas 3d0b390457 Update gamepad mappings.
Merge mappings from https://github.com/gabomdq/SDL_GameControllerDB
2016-06-14 02:32:30 +02:00
fluffrabbit 4877b714b3
Add magnetometer sensor support for Android 2016-05-27 14:36:55 -03:00
Hinsbart d6cd5108e3 Fix ds3 gamepad mapping 2016-05-04 00:21:32 +02:00
hinsbart 0022af9647 use joystick name from mapping-db if available 2016-02-29 16:48:19 +01:00
Krzysztof Jankowski 6b6ce35e78 OUYA gamepad mappings fix
Fix gamepad mappings for OUYA revision 4
2016-02-25 17:24:57 +01:00
Dana Olson 7efb45e0db added more Android gamepad mappings 2016-02-24 00:40:27 -05:00
Dana Olson 862c56c004 added a couple more Linux mappings, tweaked Ouya Linux mapping 2016-02-23 11:37:32 -05:00
hondres 9134ec942e fix is_joy_mapped return value 2016-02-16 23:23:06 +01:00
hondres 04f7c32847 fix joystick axis handling for Input.is_action_pressed() 2016-02-15 22:26:20 +01:00