Commit graph

230 commits

Author SHA1 Message Date
Marcelo Fernandez d780d774aa Clean and expose get_audio/video_driver_* funcs on OS class 2018-03-04 14:18:05 -03:00
bruvzg f0d24de960
Fix --help output, allow renderer override from command line (--video-driver). 2018-03-02 10:05:14 +02:00
karroffel eac4c984df add GLES 2 renderer for 2D
This commit adds a new rendering backend, GLES2, and adds a
project setting to enable it.

Currently this backend can only be used on the X11 platform,
but integrating into other platforms is planned.
2018-03-01 15:12:30 +01:00
Hein-Pieter van Braam d702d7b335 Fix various valgrind reported uninitialized variable uses 2018-02-28 21:55:13 +01:00
luz.paz 612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Rémi Verschelde 2b7037b148
Merge pull request #16675 from Iskustvo/improved_error_detectioin_in_move-to-trash_for_Linux
[X11] Improving error detection in move_to_trash
2018-02-19 20:50:58 +01:00
Iskustvo 268d7c7c5b [X11] Improving error detection in move_to_trash 2018-02-18 17:02:19 +01:00
Pedro J. Estébanez 935a99e758 Remove window decorations for fullscreen on X11 2018-02-16 22:09:17 +01:00
Rémi Verschelde e0f43e0678
Merge pull request #15564 from RandomShaper/adpod-topmost
Add new window setting: always on top
2018-02-14 16:43:40 +01:00
Rémi Verschelde 7d7f8d9e54
Merge pull request #15864 from GodotExplorer/pr-get_unique_id-desktop-impl
Implement more methods for OS on Desktop platforms
2018-02-14 16:11:53 +01:00
Marcelo Fernandez ea1d726a46 Added OS::center_window to center the window precisely on desktop platforms 2018-02-12 15:45:41 -03:00
geequlim df1c16d0fe X11: implement OS.get_unique_id 2018-01-31 09:40:33 +08:00
Hein-Pieter van Braam fb60f2dbe6 Fix Copy/Paste problems on X11
The target of the TARGETS type should be XA_ATOM and not XA_TARGETS when
requested. Since we are sending a number of ATOMS the size should be set
to the integer size and not the char size.

The size field of the atoms is also the number of atoms and not the size
of the array. This caused some clients to wrongly interpret the data and
read garbage in the X11 packet.

I also add the more modern representation for UTF-8 and clarify the
error message if a client attempts to request a type we don't know
about.

This fixes #10431
2018-01-29 18:38:04 +01:00
Rémi Verschelde 94f315df01 Silence verbose stderr info message on X11 2018-01-24 21:49:11 +01:00
Pedro J. Estébanez ee2c31d306 Add new window setting: always on top
Implemented for Windows and Linux.
2018-01-05 21:31:04 +01:00
Andreas Haas fab0d53f7e
X11: Add missing return in OS_X11::initialize(). 2018-01-05 12:11:45 +01:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Emmanuel Leblond e315c94900 Change OS::initialize signature to return Error (fix segfault on x11) 2018-01-04 15:15:55 +01:00
Rémi Verschelde 5019f5e298
Merge pull request #15092 from guilhermefelipecgs/fix_infinite_loop_on_splash_screen
Fix infinite loop on splash screen on tiling windows managers
2018-01-03 11:41:38 +01:00
Rémi Verschelde 6322b0bbb7
Merge pull request #12814 from guilhermefelipecgs/add_hardware_custom_cursor
Custom hardware-accelerated mouse cursor
2018-01-03 08:35:59 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Guilherme Silva 2a6035dff4 Fix infinite loop introduced by 6f3486c4 on tiling windows managers 2017-12-27 08:44:18 -02:00
Enzo Nocera 6f3486c486 x11: Fix maximized splash-boot screen bug.
Fixes #14336
2017-12-24 01:16:17 +01:00
Guilherme Silva a392dbdbe3 Add implementation for custom hardware cursor 2017-12-17 13:40:29 -02:00
Juan Linietsky 652c98a7be Add epic hack so vsync can be toggled in run-time from script. Fixes #14458.
Call needs to be routed via visual server to reach the proper thread.
2017-12-16 17:11:02 -03:00
Rémi Verschelde fb84b49d87 Fix type mismatch in OS::set_borderless_window
Closes #14663.
2017-12-14 19:16:20 +01:00
Juan Linietsky f3ad14224e -Add lightmapper
-Fixes to unwrapper (remove degenerates), makes Thekla not crash
-Added optional cancel button in EditorProgress
-Added function to force processing of events (needed for cancel button)
2017-12-14 09:01:27 -03:00
Pedro J. Estébanez ef64bfd687 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.

Fixes #14427.
2017-12-10 07:14:59 +01:00
Andreas Haas 94a573bb39
X11: Process entire event queue at startup.
Should fix #14336
2017-12-09 23:24:25 +01:00
Stefano Bonicatti c067cf2c6a Fixes vsync setting ignored when using a separate thread for rendering
Setting the vsync in the main thread, after the rendering thread starts
and takes the OpenGL context fails, so we need to do that before.
Also, for some reason, the main thread cannot make current the context
anymore.

Fixes #13447
2017-12-09 01:43:23 +01:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Pedro J. Estébanez 6decbec461 Implement multitouch on X11 2017-12-06 23:47:09 +01:00
Rémi Verschelde 450bdda97a
Merge pull request #12387 from santouits/x1111
Fix x11 boot logo position in fullscreen and in maximized
2017-11-20 15:48:08 +01:00
Rémi Verschelde 32c12a92a5 Add initial support for the XDG Base Directory spec
Spec version 0.7 from https://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html
(latest as of this commit).

Three virtual methods are added to OS for the various XDG paths we will use:
- OS::get_data_path gives XDG_DATA_HOME, or if missing:
  ~/.local/share on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows
- OS::get_config_path gives XDG_CONFIG_HOME, or if missing:
  ~/.config on X11, ~/Library/Application Support/ on macOS and %APPDATA% on Windows
- OS::get_cache_path gives XDG_CACHE_HOME, or if missing:
  ~/.cache on X11, ~/Library/Caches on macOS and %APPDATA% on Windows

So for Windows there are no changes, for Linux we follow the full split spec
and for macOS stuff will move from ~/.godot to ~/Library/Application Support/Godot.

Support for system-wide installation of templates on Unix was removed for now,
as it's a bit hackish and I don't think anyone uses it.

user:// will still be OS::get_data_path() + "/godot/app_userdata/$name" by
default, but when using the application/config/use_shared_user_dir option
it will now use XDG_DATA_HOME/$name, e.g. ~/.local/share/MyGame.

For now everything still goes in EditorSettings::get_settings_dir(), but
this will be changed in a later commit to make use of the new splitting
where relevant.

Part of #3513.
2017-11-19 20:54:24 +01:00
Rémi Verschelde 73049d115e Rename OS::get_data_dir to OS::get_user_data_dir
Will be needed to avoid confusion with system data path (XDG_DATA_HOME)
and editor data dir in upcoming refactoring.
2017-11-17 20:55:09 +01:00
Juan Linietsky d09160a8b6 Make video mode initialization more intuitive, fixes #12022 2017-11-09 13:02:26 -03:00
Juan Linietsky 7715a261d5
Merge pull request #12262 from AndreaCatania/pplug
Physics server plug
2017-11-03 23:39:44 -03:00
AndreaCatania 7a9ca08f16 Implemented physics plug
Moved init_physics

Implemented physics 2D plug

Fix clang

Fix clang

Fix static check

Fix clang

Fix static check

Moved physics server initialization

Moved physics server settings initialization
2017-11-04 03:25:51 +01:00
N0hbdy f3fc07272c Add Colemak keybindings to editor for osx 2017-10-30 22:51:02 +01:00
Marcelo Fernandez be6ac69f75 Implemented OS get_latin_keyboard_variant on x11 2017-10-30 12:14:40 -03:00
santouits 55fae24710 Fix x11 boot logo position in fullscreen and in maximized 2017-10-26 01:06:26 +03:00
Marcelo Fernandez 2baf54526b Fix BSD compile issues 2017-10-17 16:50:41 +00:00
J08nY b1252caa10
Use binary names instead of absolute paths in calls to OS::execute.
Now that #12009 is merged, we should let the system find the binary on
the users $PATH and don't assume we know where to look for them in
different distributions.
2017-10-13 16:45:24 +02:00
Rémi Verschelde 79e247d74e Drop unusued LEGACYGL_ENABLED check
[ci skip]
2017-10-13 00:18:04 +02:00
Marcelo Fernandez 20918587d3 FileSystemDock will now remove files/dirs to trashcan using OS::move_to_trash 2017-09-25 21:49:01 -03:00
Rémi Verschelde 0eec37e247 Merge pull request #11141 from fcobos/x11_borderless_switch_fix
X11 - Adding borders back to a borderless window was not working.
2017-09-21 10:23:52 +02:00
letheed 5ad9be4c24 Rename pos to position in user facing methods and variables
Rename user facing methods and variables as well as the corresponding
C++ methods according to the folloming changes:

* pos -> position
* rot -> rotation
* loc -> location

C++ variables are left as is.
2017-09-20 13:11:10 +02:00
Rémi Verschelde 53bbc046ee Merge pull request #11252 from marcelofg55/fix_noaudio_crash
Fix crash when no audio driver is available
2017-09-17 22:48:22 +02:00
Thomas Herzog 7dffed485b Merge pull request #11230 from maxim-sheronov/fix_enum_bindings
Fix enums bindings
2017-09-15 08:43:35 +02:00
Marcelo Fernandez 7a4c0ff35e Fix crash when no audio driver is available 2017-09-13 20:54:55 -03:00