Commit graph

259 commits

Author SHA1 Message Date
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
Pedro J. Estébanez 088569fe14 Fix no mouse if touch device present in X11
Plus several improvements in this area.

Sadly, grabbing has been disabled until a better solution is found.
2017-12-10 07:15:07 +01:00
Pedro J. Estébanez 4511241991 Implement multitouch on X11 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
Elliott Sales de Andrade 8d246dfc1d Add support for OpenSSL 1.1.0.
This release hides many struct members which provides easier forward
compatibility but is a break from previous releases. A few small macros
provide compatibility between both 1.1.0 and 1.0.x.

Fixes #8624.

(cherry picked from commit 00c03bdd2b)
2017-09-24 09:19:28 +02:00
Rémi Verschelde 1391269a78 Merge pull request #10124 from marcelofg55/handle_sigsegv
Added a SIGSEGV handler that dumps the stacktrace to ease reporting
2017-09-21 11:30:40 +02: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 b48704c620 Fix x11 exported executables not getting the +x flag 2017-09-16 22:38:32 -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 a6805f37d3 Buildsystem: Prevent building X11/server with GCC 6+
This is due to a Godot bug which is now fixed in the master branch, but would require
too much work for a short-lived branch such as 2.1. Building release binaries with GCC 6+
will trigger segfaults due to UB when dereferencing pointers with Object::cast_to.

In theory this check should also be made for Windows cross-compilation with MinGW,
but I am more concerned about Linux distros shipping broken binaries than adventurous
cross-compilers hitting a wall.
2017-08-27 11:11:35 +02:00
Rémi Verschelde 3a8550675f X11: Do not force require system OpenSSL to build 2017-07-31 00:14:04 +02:00
Marcelo Fernandez 4af2afe5b4 Fix fullscreen on X11 for non-resizable windows
(cherry picked from commit 11dbca419c)
2017-07-30 21:09:31 +02:00
Jia Wang 5a5b6dcde0 Workaround to allow pasting unicode characters from X selection.
Fixes #2491.
Fixes #9787.
2017-07-25 07:27:27 +08:00
Poommetee Ketson 4a0dc529ce BuildSystem: generated files have .gen.ext 2017-06-25 20:31:56 +07:00
Andreas Haas c0747b22c3 X11: Turn warning about not finding cursor theme into verbose output.
Failing to get the cursor theme should not cause any issues since we're then using the default one anyway.
So I removed the warning and made it a verbose-only print instead, as people tend to mistake it for a real error..
(pretty much like `iCCP: known incorrect sRGB profile` :P)

(cherry picked from commit d6333066fc)
2017-06-17 11:55:05 +02:00
Rémi Verschelde e3cf067845 X11: Abort build if using OpenSSL 1.1.0+
Workaround until #8624 is fixed.

(cherry picked from commit 2976801012)
2017-05-06 19:01:33 +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
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
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 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 16b78da941 Style: Various fixes to play nice with clang-format
(cherry picked from commit 2a0ddc1e89)
2017-03-18 23:13:47 +01:00
Shlomi Fish cb2cdce6b8 Fix failing build on mageia v6 x64 linux.
There was an error about undeclared malloc()+free().

(cherry picked from commit 0ef3d22d98)
2017-03-18 20:19:57 +01:00
Hein-Pieter van Braam dffdf28349 X11 return to cwd at exit
During runtime godot calls chdir() several times. This doesn't really
matter normally but when using tools such as gprof the location of the
profiling data is kind of hard to intuit.

With this PR we simply store the current working directory at start and
restore it once we're almost done exiting.

This doesn't use the OS abstractions as when we need to get the current
workdir we haven't yet initialized it (by necessity). This would break
if we tried to build X11 for windows, but since the X11 target is
hardcoded to use the UNIX abstractions I don't think it matters.

(cherry picked from commit d0c2015fe1)
2017-03-18 20:12:42 +01:00
marcelofg55 97fef612fb Fix issues with set_window_resizable on x11
(cherry picked from commit 474e3ac055)
2017-03-18 19:56:16 +01:00
Ferenc Arn 5e90183ba4 Use -Ofast on x11. Also introduced use_lto option.
debug_release doesn't turn off optimizations for release target now. Ensure that sanitizer options apply to both C and C++ files.

Built-in optimization/debug flags are prepended such that user-specified flags can override them.

Based on and around the discussion in PR #5194.

(cherry picked from commit 7a85d25218)
2017-03-18 19:52:35 +01:00
Jesper Bækdahl e5f0183b0a x11: don't wait for window to be mapped
(cherry picked from commit 8f7a3884fd)
2017-03-18 19:29:46 +01:00
Rémi Verschelde 5672852351 x11: Improve logic for cross-dependencies between freetype, zlib and libpng
Fixes #7373.

(cherry picked from commit d945c4e58e)
2017-01-12 19:15:30 +01: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
Gustav Lund f10a78e5c0 fix for crash when no ALSA or Pulse installed on linux
(cherry picked from commit 2495e8a941)
2017-01-12 19:15:27 +01:00
Rémi Verschelde a3582fa3cb png: Allow building shared freetype with bundled libpng
This was the behaviour when building Godot 2.1, which allows to build against
Ubuntu 12.04 and its freetype that links old libpng12, while still bundling
libpng16.

(cherry picked from commit 4965ddfaa1)
2016-11-19 14:09:12 +01:00
Rémi Verschelde 326978dcce Revert "libpng: Fix erroneously linking against libpng12 on old distros"
This reverts commits 5fa1bb331a
and ec4be71fad.

Looks like Debian/Ubuntu are not even shipping libpng16 nowadays in their
stable releases, we'll have to go back to statically linking our own
libpng16 to wait for them to stop being 5 years behind everybody.

(cherry picked from commit c32766a482)
2016-11-19 13:40:53 +01:00
Rémi Verschelde 220bcbf7c0 libpng: Fix erroneously linking against libpng12 on old distros
This bit us for 2.1.1 binaries built on Ubuntu 12.04 LTS where
libpng.pc apparently prioritizes libpng12.

(cherry picked from commit 5fa1bb331a)
2016-11-19 13:00:17 +01:00
ISylvox 0413d85add vsnc --> vsync
(cherry picked from commit b5c383fd61)
2016-11-15 08:34:43 +01:00
Rémi Verschelde ce54b6ea8b scons: Reorder options for clarity
Also prefix all thirdparty-related toggles with `builtin`.

(cherry picked from commit cc95d4448c)
2016-11-03 08:41:10 +01:00
Rémi Verschelde a7389217f8 style: Fix PEP8 blank lines issues in Python files
Done with `autopep8 --select=E3,W3`, fixes:

- E301 - Add missing blank line.
- E302 - Add missing 2 blank lines.
- E303 - Remove extra blank lines.
- E304 - Remove blank line following function decorator.
- E309 - Add missing blank line.
- W391 - Remove trailing blank lines.
2016-11-02 22:29:36 +01:00
Rémi Verschelde e259bf8bbb style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-02 22:28:28 +01:00
Rémi Verschelde 561c1f17a1 style: Start applying PEP8 to Python files, indentation issues
Done with `autopep8 --select=E1`, fixes:

- E101 - Reindent all lines.
- E112 - Fix under-indented comments.
- E113 - Fix over-indented comments.
- E115 - Fix under-indented comments.
- E116 - Fix over-indented comments.
- E121 - Fix a badly indented line.
- E122 - Fix a badly indented line.
- E123 - Fix a badly indented line.
- E124 - Fix a badly indented line.
- E125 - Fix indentation undistinguish from the next logical line.
- E126 - Fix a badly indented line.
- E127 - Fix a badly indented line.
- E128 - Fix a badly indented line.
- E129 - Fix a badly indented line.
2016-11-02 22:26:55 +01:00
Błażej Szczygieł 85a7105345 SCons: Use colored output if available, change "colored"->"verbose"
(cherry picked from commit 2bf4553fe0)
2016-10-30 14:51:34 +01:00
Rémi Verschelde 5a49e45d21 SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.

(cherry picked from commit fc8ccd5b8c)
2016-10-30 14:51:34 +01:00