Commit graph

618 commits

Author SHA1 Message Date
Technohacker
0456311be3
Don't force borderless mode when using per-pixel transparency 2020-05-10 21:05:37 +05:30
bruvzg
da2ca9e22a [Linux/Windows] Set pressure to 1.0f when primary button is pressed and device is not pressure sensitive.
(cherry picked from commit 0128947894)
2020-05-05 13:41:29 +02:00
Marcel Admiraal
a286edb821 Fix X11 pressure and tilt values.
(cherry picked from commit a2ad0878ed)
2020-05-05 13:41:29 +02:00
Marcel Admiraal
b4ab045444 Fix loss of precision in X11 device info.
(cherry picked from commit 9369b37f1f)
2020-04-16 12:47:19 +02:00
Rémi Verschelde
acd14e645a Remove unused classes and stray headers
Found by reviewing headers with 1 or less matching includes:
```
find -name thirdparty -prune -o -name "*.h" -exec basename {} \; | sort -u > headers
for header in $(cat headers); do echo "$header: "; rg -l "#include \"(.*/)?$header\"" | wc -l; done > list-includes
```

(cherry picked from commit 9d24541597)
2020-03-25 11:38:54 +01:00
Rajat Goswami
19e71f94d8 Adding missing include guards to header files identified by LGTM.
This addresses the issue godotengine/godot#37143

(cherry picked from commit 2ecf928ae3)
2020-03-25 11:38:54 +01:00
m6c7l
dec7014ca8 issue-37239 add relaxation to conditions in the joystick check routine for being identified as joystick
(cherry picked from commit 36293f4256)
2020-03-25 11:38:54 +01:00
Rémi Verschelde
ec752f7c9b Linux: Add Mesa 20 "Intel" to prime detection
Diff in `glxinfo` between Mesa 19.3.4 and 20.0.1:
```diff
-OpenGL vendor string: Intel Open Source Technology Center
-OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 630 (Kaby Lake GT2)
-OpenGL core profile version string: 4.6 (Core Profile) Mesa 19.3.4
+OpenGL vendor string: Intel
+OpenGL renderer string: Mesa Intel(R) HD Graphics 630 (KBL GT2)
+OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.1
```

(cherry picked from commit db28e7ef69)
2020-03-25 11:38:53 +01:00
Rémi Verschelde
98d0bf7d7a assimp: Clean and document buildsystem, prepare for unbundling
- Improve the SCsub to allow unbundling and remove unnecessary code.
- Move files around to match upstream source.
- Re-sync with upstream commit 308db73d0b3c2d1870cd3e465eaa283692a4cf23
  to ensure we don't have local modifications.
- Doesn't actually build against current version 5.0.1 due to the lack
  of the new ArmaturePopulate API that Gordon authored. We'll have to
  wait for a public release with that API (5.1?) to enable unbundling.

(cherry picked from commit 9d8a9ea826)
2020-03-06 23:53:23 +01:00
Rémi Verschelde
75164169c4 SCons: Fix get_compiler_version() to return ints
Otherwise comparisons would fail for compiler versions above 10.
Also simplified code somewhat to avoid using subprocess too much
needlessly.

(cherry picked from commits c7dc5142b5
and df7ecfc4a7)
2020-03-04 14:40:12 +01:00
bruvzg
a7ff22ea6d Fix pressure / tilt ranges on Linux.
(cherry picked from commit d552f93f8b)
2020-02-14 15:58:15 +01:00
Yuri Roubinsky
e8474435e5 Restores correct window position after fullscreen toggling off on Linux
(cherry picked from commit 90f00c0813)
2020-02-06 13:02:07 +01:00
Yuri Roubinsky
8c689f7d4a Fix restoring window from fullscreen to normal on Linux
(cherry picked from commit 8737269275)
2020-02-06 13:02:07 +01:00
Rémi Verschelde
05fc26de1c
Merge pull request #35444 from RandomShaper/fix_link_bsd
Fix error with linkers other than GNU ld
2020-01-23 07:57:02 +01:00
Pedro J. Estébanez
35dd36ca35 Fix error with linkers other than GNU ld 2020-01-22 22:38:08 +01:00
Eric Rybicki
67261b1e87 Remove buggy check if key was already released for accumulated input
Fixes #27104
2020-01-22 17:03:33 +01:00
Rémi Verschelde
6b64c60b0e
Merge pull request #35209 from RandomShaper/fix_pck_embed_linux
Fix error exporting to X11 with embedded PCK
2020-01-16 18:45:20 +01:00
Pedro J. Estébanez
4eeae59293 Fix error exporting to X11 with embedded PCK
Fixes #32513.
2020-01-16 17:47:37 +01:00
Rémi Verschelde
c7b701dfd2 Image: Include S3TC compression via Squish in non-tools build
We already build Squish in templates build for S3TC decompression,
so we can as well expose the compression feature.

Fixes #25640.
2020-01-13 15:58:49 +01:00
Rémi Verschelde
3f8c93dffe Fix warning in Linux crash handler on 32-bit 2020-01-10 14:28:21 +01:00
Rémi Verschelde
8454804972
Merge pull request #33967 from Calinou/add-os-is-window-focused
Add an `OS.is_window_focused()` getter
2020-01-06 11:39:18 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
bruvzg
2ef8c5fac5
iOS modular build and export implementation. 2019-12-01 21:57:18 +02:00
Hugo Locurcio
21a3923410
Add an OS.is_window_focused() getter
This makes it possible to know whether the window is focused
at a given time, without having to track the focus state manually
using `NOTIFICATION_WM_FOCUS_IN` and `NOTIFICATION_WM_FOCUS_OUT`.

This partially addresses #33928.
2019-11-28 16:42:51 +01:00
Rémi Verschelde
d191ffb47d X11: Fix memory leak in handle_key_event
Extracted from #27189.
2019-11-12 07:51:51 +01:00
bruvzg
f675621725
[macOS, Windows, X11] Add graphic tablet pen pressure and tilt support to InputEventMouseMotion event. 2019-10-30 14:42:21 +02:00
bruvzg
2a76fba1f6
Fix X11 modifier keys. 2019-10-12 00:09:14 +03:00
PouleyKetchoupp
5bfe32eaa4 Properly revert cursor when using set_custom_mouse_cursor with null
Fixes #32486
2019-10-03 13:02:11 +02:00
qarmin
50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
thomas.herzog
4553935f27 [X11] set PID as window attribute
This allows other programs to find out the PID of a Godot instance just
by the X11 window ID.
2019-09-11 10:13:48 +02:00
bruvzg
bd63d3e1ec
Fix modifier keys causing key-code mismatch on Linux/X11. 2019-08-28 13:27:13 +03:00
IAmActuallyCthulhu
82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Carl Drougge
deb73001ab OS_X11::set_window_maximized gives up after 0.5s
Spinning forever is clearly worse, especially since this happens on at
least FVWM even though the window actually is maximized.
2019-08-10 21:29:45 +02:00
Robin Hübner
6ab118c464 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
qarmin
14c16d6851 Added Thread Sanitizer 2019-08-07 12:01:14 +02:00
Hugo Locurcio
7de2c70e11
Turn OS.set_min/max_window_size() warnings into errors
Since invalid values will cause the setting to be discarded,
it makes more sense to display an error message instead of a
warning message.
2019-07-30 14:50:52 +02:00
Guilherme Felipe
c3f69c6c76 Fix crash caused by a9a0d0fb15 2019-07-24 15:01:28 -03:00
qarmin
aab8da25ad Fix some code found by Coverity Scan and PVS Studio 2019-07-23 09:14:31 +02:00
Guilherme Felipe
a9a0d0fb15 Fix cursor blinking in integrated GPUs
Optimization for Input::set_custom_mouse_cursor when used inside
_process function. (Avoids cursor blinking in low end devices)
2019-07-09 19:38:25 -03:00
qarmin
9a77d748c0 Fixes minor issues found by static analyzer 2019-07-07 23:08:51 +02:00
Rémi Verschelde
a149e412f7
Merge pull request #24086 from RandomShaper/bundle-pck-to-executable
Enhance game export
2019-07-05 10:28:29 +02:00
Fabio Alessandrelli
aae6c075aa Remove libwebsocket. No longer used, yay! 2019-07-04 15:03:04 +02:00
Pedro J. Estébanez
40f4d3cf0f Add embedded PCK option to PC platforms
The basic point is as in 2.1 (appending the PCK into the executable), but this implementation also patches a dedicated section in the ELF/PE executable so that it matches the appended data perfectly.

The usage of integer types is simplified in existing code; namely, using plain `int` for small quantities.
2019-07-03 21:58:12 +02:00
Rémi Verschelde
b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).

We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00
Bojidar Marinov
f7dad789e9
Fix various memory leaks and errors 2019-07-02 17:23:54 +03:00
Rémi Verschelde
d17eac735c
Merge pull request #29815 from NilsIrl/plus_file_1
Replace ` + "/" + ` with `String::file_add()`
2019-07-01 12:06:35 +02:00
Rémi Verschelde
eaaff9da31
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
2019-06-27 01:05:18 +02:00
qarmin
4e5310cc60 Some code changed with Clang-Tidy 2019-06-26 15:08:25 +02:00
Nils ANDRÉ-CHANG
d2833d4f4d Replace + "/" + with String::file_add() 2019-06-23 13:33:50 +01:00
Rémi Verschelde
1769cbc0e2 SCons: Default to builtin libpng/freetype on Linux
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.
2019-06-23 10:02:35 +02:00