Commit Graph

282 Commits

Author SHA1 Message Date
Ibrahn Sahir
9344851b05 Fixed hang when segfaulting after OS object destroyed (OSX and X11)
The two POSIX style crash handlers (OSX and X11) now remove their signal
handlers when they are destroyed.
Additonally if they are called while no OS singleton is set, they will
simply abort(). This should not happen now that they remove themselves,
but if a future change seperates OS object and crash handler lifetimes,
this may be easier to report/debug than hanging on SIGSEGV.
2020-02-22 08:44:16 -05:00
Xavier Sellier
400e273eee Fallback to the dummy audio driver if no other driver works
Fix this issue https://github.com/godotengine/godot/issues/1684
2019-12-19 10:16:01 -05:00
Rémi Verschelde
717d79e540 SCons: Default to builtin libpng/freetype on Linux (+ openssl)
The rationale for keeping those shared by default is that they're typical
dependencies found on any Linux system, and it saves compilation time and
binary size to link their dynamically.

But since official builds default to all-builtin, and Debian/Ubuntu still
don't have libpng16 (which we now require) readily available on all their
supported releases, it's simpler to bundle all the things.

This does not change the fact that those dependencies *can* be unbundled
on Linux, it's only the default option changing.

(cherry picked from commit 1769cbc0e2)

For 2.1, also building by default against bundled openssl.
2019-07-02 15:03:16 +02:00
Rémi Verschelde
7562ce053a Update copyright statements to 2019 2019-06-04 11:41:49 +02:00
Rémi Verschelde
04ea848116 SCons: Fix Python 3 support in GCC version check 2019-06-03 16:26:13 +02:00
Guilherme Felipe
72d4fd8f0d Fix Input::set_custom_mouse_cursor showing cursor when it's invisible 2018-09-17 12:24:44 -03:00
Guilherme Felipe
dda8937ef3 Fix memory leak in set_custom_mouse_cursor 2018-05-26 15:55:57 -03:00
Guilherme Felipe
2f823eb6a7 Prevent crash for invalid reference 2018-05-08 15:13:32 +00:00
Rémi Verschelde
7cb027d071
Merge pull request #18362 from guilhermefelipecgs/support_for_atlas_tex_on_cursor
Add support for atlas texture on set_custom_mouse_cursor
2018-05-01 10:01:25 +02:00
Guilherme Felipe
d65e95e5d6 Add support for atlas texture on set_custom_mouse_cursor 2018-04-24 18:19:10 -03:00
Guilherme Felipe
6217457b14 [2.1] Fix custom cursor when it's hidden
Port of #18075
2018-04-22 12:05:33 -03:00
Guilherme Felipe
0988796f3c Remove size restriction for mouse cursor 2018-04-05 15:35:20 -03:00
Rémi Verschelde
60835ce88e X11: Fix -Wc++11-narrowing error with clang
Fixes #17725.
2018-03-24 12:16:32 +01:00
Pedro J. Estébanez
5571ada4f5 Generate mouse events from touch on X11
To match behavior on other platforms.
2018-02-26 21:19:57 +01:00
Rémi Verschelde
e3bcb8cf4a Silence verbose stderr info message on X11
(cherry picked from commit 94f315df01)
2018-02-18 16:57:14 +01:00
Rémi Verschelde
bad7a8a657 X11: Link libgcc statically with use_static_cpp option
We were already linking libstdc++ statically for official binaries,
protecting us against most portability issues. But apparently since
we started using GCC 7 for official builds, we also need to link
libgcc statically for at least 32-bit builds to be portable.

Fixes #16409.

(cherry picked from commit b526088ae2)
2018-02-18 16:56:34 +01:00
Pedro J. Estébanez
04151ac0b4 Improve/fix fullscreen on X11
- Fix fullscreen flag being unconditionally added.
- Fix setup for non-WM-compliants.
- Backport setting the compositor hint (from 3.0).
2018-02-16 21:59:48 +01:00
Rémi Verschelde
6a180a6983
Merge pull request #15565 from RandomShaper/adpod-topmost-2.1
Add new window setting: always-on-top (2.1)
2018-02-14 16:43:20 +01:00
Rémi Verschelde
4e46b0b668
Merge pull request #13930 from marcelofg55/center_window_2.1
Added OS::center_window to center the window precisely on desktop platforms
2018-02-14 00:15:07 +01:00
Rhody Lugo
7b25a33762 add Colemak layout 2018-01-23 03:15:45 -04:00
Pedro J. Estébanez
554ffdcde7 Add new window setting: always on top
Implemented for Windows and Linux.
2018-01-05 21:28:56 +01:00
Pedro J. Estébanez
a84cb60994 Unify X11 fullscreen setup 2018-01-05 21:28:56 +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
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
marcelofg55
129e0f34d0 Added OS::center_window to center the window precisely on desktop platforms 2017-12-03 17:13:26 -03: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