Virtualx Game Engine. Forked from Godot 3.6
Find a file
Connor Lirot 1e01963d29
Fix for linux joypad D-pad zeroing
Some controllers (notably those made by 8bitdo) do not always emit an event to zero out a D-pad axis before flipping direction. For example, when rolling around aggressively the D-pad of an 8bitdo SN30 Pro/Pro+, the following may be observed:

```
ABS_HAT0X : -1
ABS_HAT0Y : -1
ABS_HAT0Y : 0
ABS_HAT0Y : 1
ABS_HAT0X : 1
```

Notable here is that no event for `ABS_HAT0X: 0` is emitted between the events for `ABS_HAT0X: -1` and `ABS_HAT0X: 1`. Consequently, the game engine believes that both the negative _and_ positive x-axis directions of the D-pad are activated simultaneously (i.e `is_joy_button_pressed()` returns `true` for both `JOY_BUTTON_DPAD_LEFT` and `JOY_BUTTON_DPAD_RIGHT`), which should be impossible.

This issue is _not_ reproducible on all controllers. The Xbox One controller in particular will not exhibit this problem (it always emits zeroing out events for an axis before flipping direction).

The fix is to always zero out the opposite direction on the D-pad axis in question when processing an event with a nonzero value. This unfortunately wastes a small number of CPU cycles on controllers that behave nicely.

**I have verified this issue is also reproducible in the stable 3.2 branch**

(cherry picked from commit dd021099ff)
2020-11-17 12:07:01 +01:00
.github Use the Dummy audio driver in CI to prevent spurious error messages 2020-10-31 19:35:20 +01:00
core Release pressed action if event is removed 2020-11-17 12:07:00 +01:00
doc Changed mouse cursor to the caret (text cursor) location. 2020-11-17 12:01:58 +01:00
drivers Merge pull request #43498 from lawnjelly/ewok_poly_modulate 2020-11-16 09:58:36 +01:00
editor Rename the "Delete" option in the FileSystem dock to "Move to Trash" 2020-11-17 12:01:59 +01:00
main Merge pull request #43234 from madmiraal/fix-42876-3.2 2020-11-16 22:41:49 +01:00
misc Add files to create a Windows editor installer using Inno Setup 2020-11-17 12:01:59 +01:00
modules Add HexEncode to C# 2020-11-17 12:02:00 +01:00
platform Fix for linux joypad D-pad zeroing 2020-11-17 12:07:01 +01:00
scene Fix WAV resources ignoring the AudioServer's 'global_rate_scale' value 2020-11-17 12:07:01 +01:00
servers Merge pull request #43554 from lawnjelly/refactor_pixel_snap 2020-11-16 18:24:10 +01:00
thirdparty Update "open-simplex-noise-in-c" to fix undefined signed overflow. 2020-11-11 15:44:18 +01:00
.clang-format clang-format: Add JavaImportGroups for Java code 2020-05-07 13:36:27 +02:00
.editorconfig 3.2 New csproj style with backport of Godot.NET.Sdk 2020-08-20 21:48:59 +02:00
.gitattributes Git: Explicitly list binary files as such to avoid EOL change 2019-05-25 10:43:48 +02:00
.gitignore Add a separate nativeSrcsConfigs module to handle Android Studio constraints for native code editor support. 2020-11-11 15:30:56 +01:00
.mailmap Update AUTHORS and DONORS list 2020-09-08 17:23:16 +02:00
AUTHORS.md Update AUTHORS and DONORS list 2020-10-28 15:09:17 +01:00
CHANGELOG.md Fix typos with codespell 2020-09-18 14:09:51 +02:00
compat.py SCons: Fix python2 compatibility after #37198 and #37248 2020-06-11 20:15:48 +02:00
CONTRIBUTING.md Document the requirement to update the class reference when contributing 2020-06-10 15:30:52 +02:00
COPYRIGHT.txt Rewrite FBX Importer to convert directly to Godot scene format 2020-10-30 15:59:19 +00:00
DONORS.md Update AUTHORS and DONORS list 2020-10-28 15:09:17 +01:00
gles_builders.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
icon.png Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
icon.svg Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02:00
LICENSE.txt Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
logo.png Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02:00
logo.svg Style: Add missing newlines to SVGs 2020-07-24 10:39:18 +02:00
LOGO_LICENSE.md Improve documentation of thirdparty code snippets 2017-05-07 11:42:37 +02:00
methods.py [3.2] Do not raise exception if iOS SDK is not installed. 2020-10-26 14:15:44 +02:00
platform_methods.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
README.md Improve the project README 2020-08-14 00:32:04 +02:00
SConstruct SCons: Refactor and cleanup warnings definition 2020-10-19 16:09:59 +02:00
version.py Bump version to 3.2.4-beta 2020-09-18 08:28:18 +02:00

Godot Engine

Godot Engine logo

2D and 3D cross-platform game engine

Godot Engine is a feature-packed, cross-platform game engine to create 2D and 3D games from a unified interface. It provides a comprehensive set of common tools, so that users can focus on making games without having to reinvent the wheel. Games can be exported in one click to a number of platforms, including the major desktop platforms (Linux, macOS, Windows), mobile platforms (Android, iOS), as well as Web-based platforms (HTML5) and consoles.

Free, open source and community-driven

Godot is completely free and open source under the very permissive MIT license. No strings attached, no royalties, nothing. The users' games are theirs, down to the last line of engine code. Godot's development is fully independent and community-driven, empowering users to help shape their engine to match their expectations. It is supported by the Software Freedom Conservancy not-for-profit.

Before being open sourced in February 2014, Godot had been developed by Juan Linietsky and Ariel Manzur (both still maintaining the project) for several years as an in-house engine, used to publish several work-for-hire titles.

Screenshot of a 3D scene in Godot Engine

Getting the engine

Binary downloads

Official binaries for the Godot editor and the export templates can be found on the homepage.

Compiling from source

See the official docs for compilation instructions for every supported platform.

Community and contributing

Godot is not only an engine but an ever-growing community of users and engine developers. The main community channels are listed on the homepage.

To get in touch with the engine developers, the best way is to join the #godotengine-devel IRC channel on Freenode.

To get started contributing to the project, see the contributing guide.

Documentation and demos

The official documentation is hosted on ReadTheDocs. It is maintained by the Godot community in its own GitHub repository.

The class reference is also accessible from the Godot editor.

The official demos are maintained in their own GitHub repository as well.

There are also a number of other learning resources provided by the community, such as text and video tutorials, demos, etc. Consult the community channels for more information.

Actions Build Status Code Triagers Badge Translate on Weblate Total alerts on LGTM TODOs