Commit graph

526 commits

Author SHA1 Message Date
Guilherme Silva a392dbdbe3 Add implementation for custom hardware cursor 2017-12-17 13:40:29 -02:00
George Marques f1683a290b
Add support for whole program optimization on MSVC
Since it's similar to LTO, it can be enabled by setting use_lto=yes.
2017-12-16 22:29:02 -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
Hein-Pieter van Braam 05018582d7 Rename the debug symbol files to .debugsymbols
Some users were confused by the '.debug' suffix for the symbols.
2017-12-16 13:55:04 +01:00
Rémi Verschelde cf7bd1a7e3
Merge pull request #14708 from Faless/get_packet_not_const_rebased
Remove "const" from PacketPeer get_packet/get_var, move windows network related stuff to drivers
2017-12-16 00:05:18 +01:00
Hein-Pieter van Braam 241de95884 Fix 32bit MingW build for thekla_altas 2017-12-15 23:26:10 +01:00
Fabio Alessandrelli ac7444023e Move windows networking class to drivers/windows/
Also rename stream_peer_winsock.* to stream_peer_tcp_winsock.* and
StreamPeerWinsock to StreamPeerTCPWinsock.
2017-12-15 18:25:29 +01:00
Fabio Alessandrelli 92067b4714 Remove "const" from PacketPeer get_packet/get_var
They are NOT constant methods, as state by the comment message,
they fetch the last packet and then forget about it, actively
changing the state of the object.
2017-12-15 17:14:17 +01:00
Rémi Verschelde c0beab6c5b Remove debug printf on Windows 2017-12-15 07:56:47 +01:00
Rémi Verschelde fb84b49d87 Fix type mismatch in OS::set_borderless_window
Closes #14663.
2017-12-14 19:16:20 +01:00
Colin Kinloch edb1df15ea Added indent_style to editorconfig, fixed inconsistent use of tabs and spaces in indentation. 2017-12-14 13:52:23 +00: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
bruvzg 5f5c461385
Use MinGW specific binutils for debug symbols separation 2017-12-11 18:12:50 +02:00
Rémi Verschelde a8ee9a6116
Merge pull request #14434 from Smjert/fix/13447/vsync
Fixes vsync setting ignored when using a separate thread for rendering
2017-12-09 13:21:36 +01:00
Rémi Verschelde ae012f2381 Windows export: Use WINE to run rcedit on non-Windows host
WINE can be either run from a provided path ("export/windows/wine"),
or looked up in the system PATH.

Fixes #14441.
2017-12-09 11:42:08 +01:00
Rémi Verschelde 3fd1c0c76b
Merge pull request #14437 from vnen/rcedit
Call rcedit on export for Windows desktop
2017-12-09 10:48:19 +01:00
George Marques 78a7241911
Call rcedit on export for Windows desktop
- Add an editor setting to read the rcedit path.
- Add settings to the export preset with icon and other exe information
(version, name, copyright, etc.)
2017-12-09 01:31:10 -02: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
MrCdK 651677f033 Fix windows compilation when using MinGW 2017-12-07 04:59:11 +01:00
bruvzg 69dca1722f Use run-time dynamic linking for AddDllDirectory and RemoveDllDirectory to support mingw-w64 build and Windows 7 with KB2533623. 2017-12-07 00:20:42 +01:00
Pedro J. Estébanez 6f3343f1ce Remove guards for the now targeted Windows 7+ 2017-12-06 23:47:09 +01:00
Pedro J. Estébanez 0d48af4afd Add build param for targeted Windows version 2017-12-06 23:47:09 +01:00
Pedro J. Estébanez d089e688b0 Improve/fix multitouch on Windows
- Fix logic error.
- Track touches to enable defensive handling and releasing on focus out.
- Change comment-out by preprocessor `#if`.
- Track/report coordinates as float.
2017-12-06 23:47:09 +01:00
Unknown fd1b94e307 Improve slang, especially in user-visible parts 2017-12-05 15:41:38 +01:00
Juan Linietsky 0243803117 Properly take into consideration that VERTEX must be written to in opaque pre pass, does some speed up to scenes using triplanar. 2017-12-01 08:45:36 -03:00
Bastiaan Olij 4c930f3663 Needed a broader search path flag 2017-12-01 00:34:37 +11:00
Juan Linietsky 9678231b10 Changed the dynamic library open function to allow setting the path of the library to open extra libraries. 2017-11-30 10:00:55 -03:00
Rémi Verschelde f0b43678c4
Merge pull request #13383 from Krakean/fix_whitescreen
Fixed fleeting window white screen on editor/game startup
2017-11-29 09:11:18 +01:00
Rhody Lugo a65c0939fd disable caching for targets using helper functions 2017-11-28 23:24:12 -04:00
Dmitry Koteroff 7f26fba8cb Fixed white screen on editor/game startup by moving window displaying to a bit later phase 2017-11-29 03:49:36 +03:00
Rhody Lugo a4a222d62d use the same cache for all branches for appveyor 2017-11-28 03:23:33 -04:00
Rémi Verschelde af9c67db0c Allow customizing user:// path (folder in OS::get_data_path())
This allows to specify any valid folder name (including with subfolders) to use
as user:// on all platforms. The folder is constrained to the platform-specific
OS::get_data_path() (typically what `XDG_DATA_HOME` resolves to).

Fixes #13236.
2017-11-26 19:02:32 +01:00
Indah Sylvia ac92c147c6 Completed bc2e8d99e5 so that windows can be built 2017-11-25 11:12:07 +07:00
Ruslan Mustakov d42c5646a5 Return and repair file logging
And make it configurable, too.
2017-11-21 16:43:44 +07:00
Rémi Verschelde 3fd23da5ee Rename the version's "revision" to "build"
That "revision" was inherited from SVN days but had been since then
used to give information about the build: "custom_build", "official",
"<some distro's build>".

It can now be overridden with the BUILD_NAME environment variable.
2017-11-20 00:51:14 +01:00
Rémi Verschelde 6947bed015 Pass engine name and version parts as proper strings
Removes the need for _MKSTR all over the place which has the drawback of
converting _MKSTR(UNKNOWN_DEFINE) to "UKNOWN_DEFINE" instead of throwing
a compilation error.
2017-11-20 00:51:14 +01:00
Rémi Verschelde ecf80fbbba
Merge pull request #12988 from akien-mga/xdg-home-paths
Add support for XDG Base Directory spec
2017-11-20 00:42:51 +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 9f134aa5d1 Cleanup old references to GLES2 renderer
There are still some left in the Android Java code, even stuff to swap between
GLES1 and GLES2 support from early Godot days... would be good to see some cleanup
there too one day.

The "graphics/api" option for Android exports is removed, as only GLES 3.0 is supported.
It can be readded when GLES 2.0 support comes back. Fixes #13004.
2017-11-19 17:52:18 +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 2e3a1caa06 Disable OpenGL warnings unless running with -v, closes #7171 2017-11-13 13:40:07 -03: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
Rémi Verschelde cefdb34f6c SCons: make use_lto a global option and opt-in for iphone
Supersedes #12553, see discussion in #12552.
2017-11-02 09:11:50 +01:00
Rémi Verschelde 87694d1884 Disable logging until the logs location is sorted out
Temporary workaround for #12277.
2017-10-29 15:50:27 +01:00
mhilbrunner 0407c2ac46 detect.py: Fix KeyError if using MinGW and LTO 2017-10-27 21:04:27 +02:00
Rémi Verschelde 6361e24f29 Cleanup unnecessary debug prints 2017-10-21 20:41:07 +02:00
Indah Sylvia 53facb07cf Fixed wrong Virtual-KeyCode(0x12) pair on Windows platform (#12073) 2017-10-14 15:41:57 +07:00
Rémi Verschelde 79e247d74e Drop unusued LEGACYGL_ENABLED check
[ci skip]
2017-10-13 00:18:04 +02:00
Marcelo Fernandez 4b695c3bdf OS::execute can now read from stderr too when executing with a pipe 2017-10-03 15:09:04 -03:00
Andreas Haas 132ba0ed97 Merge pull request #11568 from endragor/loggers
Extract logging logic
2017-10-02 23:51:26 +02:00
Poommetee Ketson 478fd21e07 Merge pull request #11575 from marcelofg55/move_path_to_trash
FileSystemDock will now remove files/dirs to trashcan using OS::move_to_trash
2017-10-02 23:52:09 +07:00
Felix M. Cobos ec644ccb69 Reduce gcc lto build time by telling the linker to
use the number of jobs indicated by -j
2017-09-26 17:04: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
Elliott Sales de Andrade 3e69d19116 Use BoolVariable in platform-specific options. 2017-09-25 14:36:30 -04:00
Elliott Sales de Andrade ffab67b8da Use BoolVariable in target/component/advanced options. 2017-09-25 14:36:02 -04:00
Elliott Sales de Andrade f9e463bce2 Use EnumVariable for choice-based build options. 2017-09-25 14:36:01 -04:00
Ruslan Mustakov 1a2311e350 Extract logging logic
Previously logging logic was scattered over OS class implementations
with plenty of duplication. Major changes in this commit:

 - Extracted logging logic into a separate Logger hierarchy. It allows
   easy configuration of logging mechanism depending on compile-time or
   run-time configuration.

 - Implemented RotatedFileLogger which is usually used with StdLogger,
   providing persistency of logs. It is often important to be able to
   obtain logs of the game even in production to be able to understand
   what happened prior to some problem. On mobile there previously was
   no way to obtain the logs aside from having the device connected to
   your machine.

 - flush() is not performed in release mode for every logged line. It
   is only performed for errors.
2017-09-25 16:19:21 +07:00
Hein-Pieter van Braam 43757fcc85 Fix gcc lto
This repairs LTO on X11 and adds it to MingW targets. The difference in
linktime is substantial, but runtime performance is quite a bit better.
2017-09-23 22:55:26 +02:00
Rémi Verschelde e8a0c5da77 Merge pull request #11243 from hpvb/add-debug-info-on-release
Create separate debug info files by default
2017-09-21 10:30:17 +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
Marcelo Fernandez ff1e0a3e2c Prevent running the crash_handler when a debugger is present on windows 2017-09-18 16:29:23 -03: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
Hein-Pieter van Braam 88be952fc9 Create separate debug info files by default
Now that we have a built-in stacktrace on a segfault it would be useful
to have debug information on debug_release builds so that bugreports can
include this information. Without this debug info we will still get
function names in the backtrace but not file location.

This commit will by default build all targets with minimal debug info
and then strip the information into separate files. On MacOS this is a
.dSYM file, on Linux/MingW this is a .debug file. MacOSX will
automatically load a dSYM file if it exists in its debugger. On
Linux/MingW we create a 'gnu debuglink' meaning that gdb and friends
will automatically find the debug symbols if they exist.

Existing workflow for developers does not change at all, except that we
now create two instead of one build artifact by default.

This commit also adds a 'debug_symbols' option to X11, MacOS, and MingW
targets. The default is 'yes' which corresponds to -g1. The alternatives
are 'no' (don't generate debug infos at all) or 'full' which runs with
-g2. A target=debug build will now build with -g3.
2017-09-16 12:00:46 +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
Rémi Verschelde f48a1c9ebf Buildsystem: Windows cross-compilation on Linux defaults to 64-bit 2017-09-13 22:36:15 +02:00
Maxim Sheronov 0fffa45158 Fix enums bindings
Add missed bindings for enums
Move some enums to class to have correct output of api.json
2017-09-13 20:57:07 +03:00
Marcelo Fernandez 83fe937362 Added a crash handler to dump the backtrace on Windows, Linux and OS X 2017-09-13 10:07:23 -03:00
Rémi Verschelde e73e00d369 Style: Apply clang-format to @reduz's changes
[ci skip]
2017-09-13 09:13:34 +02:00
Juan Linietsky eb0f9651b3 HiDPI support on Windows.. yes this is all it took. 2017-09-12 11:18:16 -03:00
Hein-Pieter van Braam 8230bf0a2f Remove assignment and declarations in if statements
After discussing with @reduz and @akien-mga it was decided that we do
not allow assignments or declarations in if statements. This PR removes
the instances of this I could find by automated means.
2017-09-08 14:59:15 +02:00
Poommetee Ketson ed606ded52 Fix files header 2017-09-01 21:07:55 +07:00
Marcelo Fernandez 8e814774b1 Added new WASAPI driver for Windows 2017-08-27 15:26:15 -03:00
Rémi Verschelde bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Wilson E. Alvarez bd257153dc Free memory when Main::setup returns an error 2017-08-25 21:12:19 -04:00
Rémi Verschelde 7f49e2a7a0 Merge pull request #10487 from marcelofg55/curscr_as_default
p_screen param from get_screen_* funcs now default to the current screen
2017-08-22 08:12:04 +02:00
Marcelo Fernandez 63f847b306 p_screen param from get_screen_* funcs now default to the current screen 2017-08-21 18:28:29 -03:00
Wilson E. Alvarez 738d2ab969 Removed unnecessary assignments 2017-08-21 15:15:55 -04:00
Rémi Verschelde 6afa087596 Windows: Drop support for obsolete MinGW
The version we support is MinGW-w64: https://sourceforge.net/p/mingw-w64
The old original MinGW from which it was forked (https://sourceforge.net/projects/mingw),
is no longer maintained and useless for us.

Fixes #10396.
2017-08-18 21:46:46 +02:00
Rémi Verschelde 2ed87f33cf Workaround missing WM_TOUCH on mingw-w64 < 4.0
Upstream bug report: https://sourceforge.net/p/mingw-w64/bugs/460/
2017-08-18 21:05:19 +02:00
Rémi Verschelde 3b553377c7 Windows: Drop support for Vista (0x0600)
We need the efficient SRWLock methods which are not supported on Vista,
and loading them dynamically while providing fallbacks is not worth the
effort. Closes #10243.

Sorry Vista users... As you are running a supported which is no longer
supported by Microsoft (https://support.microsoft.com/en-us/help/13853/windows-lifecycle-fact-sheet),
we can only encourage you to upgrade to a more recent version if you can,
or switch to Linux, which should give your old hardware a new youth.
2017-08-18 19:50:24 +02:00
Wilson E. Alvarez bde864cd30 Removed unused variable 2017-08-17 11:43:44 -04:00
TwistedTwigleg 00f6c85928 Synchronize parameter names in definition and declaration
Fixes #10244.
2017-08-16 17:22:23 +02:00
Rémi Verschelde a8207b2dc7 Merge pull request #10264 from Rubonnek/use-const-reference
Use const reference where favorable
2017-08-16 16:41:35 +02:00
Marcelo Fernandez 51f9bbc556 Fix get_screen_* funcs returning old values after resolution changes on Windows 2017-08-14 14:49:36 -03:00
Wilson E. Alvarez 21d281c4a9 Use const reference where favorable 2017-08-14 13:28:06 -04:00
Rémi Verschelde 3121b3a4f4 Merge pull request #10141 from ISylvox/lower_case_godot_api
Makes all Godot API's Methods lower_case
2017-08-07 14:59:39 +02:00
Indah Sylvia 5ae78fdf6a Makes all Godot API's methods Lower Case 2017-08-07 18:24:35 +07:00
Rémi Verschelde 2bb8ab7b89 Merge pull request #10045 from marcelofg55/audioserver_finish
Fix double finalisation of audio drivers
2017-08-07 11:11:03 +02:00
Bojidar Marinov 7b7c7c8dc0
Rename KEY_RETURN to KEY_ENTER and KEY_ENTER to KEY_KP_ENTER
Closes #7695
2017-08-06 16:26:07 +03:00
Marcelo Fernandez 1ca107a057 Fix double finalisation of audio drivers 2017-08-02 11:45:19 -03:00
Rémi Verschelde 878f34d1e1 Merge pull request #9886 from bruvzg/3.0-win-num-enter-fix
Fix Numpad Enter key on Windows (3.0)
2017-07-31 22:59:24 +02:00
Karroffel 135c2112ad added an optional parameter to OS symbol lookup
When looking up a symbol from a library, previously an error was
shown when the symbol did not exist. That caused confusion when the
lookup was completely optional.
This adds a new parameter to that method so that those errors can
be handled manually if needed.
2017-07-27 11:13:21 +02:00
bruvzg 66d3022516 Fix Numpad Enter key on Windows 2017-07-26 21:35:54 +03:00
Rémi Verschelde 9f768cb519 Make MinGW test less verbose on non-Bash shells
The &> construct seems to be Bash-specific.
Supersedes #9755.
2017-07-25 20:44:44 +02:00
Juan Linietsky 25678b1876 -Renamed GlobalConfig to ProjectSettings, makes more sense.
-Added system for feature overrides, it's pretty cool :)
2017-07-19 17:06:03 -03:00
Juan Linietsky bbada82f80 -Reorganized all properties of project settings (Sorry, Again).
(Lot's of bloat accumulated, so it was time for clean up.)
-Made EditorSettings and ProjectSettings search more useful (search in sections too)
2017-07-17 22:18:58 -03:00
Marcelo Fernandez 8bd002edc1 Fixed issues with borderless windows on Windows 2017-07-09 21:48:22 -03:00
Rémi Verschelde e91a267a7c Buildsystem: Improve detect.py readability and fix issues
Tried to organize the configure(env) calls in sections, using the same order
for all platforms whenever possible.

Apart from cosmetic changes, the following issues were fixed:
- Android: cleanup linkage, remove GLESv1_CM and GLESv2
- iPhone: Remove obsolete "ios_gles22_override" option
- OSX:
  * Fix bits detection (default to 64) and remove obsolete "force_64_bits" option
    (closes #9449)
  * Make "fat" bits argument explicit
- Server: sync with X11
- Windows: clean up old DirectX 9 stuff
- X11:
  * Do not require system OpenSSL for building (closes #9443)
  * Fix typo'ed use_leak_sanitizer option
  * Fix .llvm suffix overriding custom extra_suffix
2017-07-01 08:20:51 +02:00
Poommetee Ketson e3998528e0 BuildSystem: generated files have .gen.extension 2017-06-25 07:55:01 +07:00
Hugo Locurcio 9444e8056a Make the Windows icon file smaller
This results in slightly more compact Godot Windows binaries.
2017-06-20 14:38:50 +02:00
George Marques dd2b7ef747
Fix MouseWheel position on Windows 2017-06-15 13:34:57 -03:00
Juan Linietsky bcc435094d Restired multithread support in OSX and Windows, should stop the crashes. 2017-06-10 10:15:33 -03:00
alexholly a3c90b0293 renamed all Rect2.pos to Rect2.position 2017-06-04 02:09:17 +02:00
Andreas Haas 9bc5348961
InputEvent: Renamed "pos" property to "position"
Make the naming consistent with other classes.
2017-06-03 11:26:39 +02:00
Timo Schwarzer 1e29d92dfa Use new icons everywhere
Closes #8879
2017-05-28 20:18:30 +02:00
BastiaanOlij 8b01f9d28f Fix a few issues compiling windows and using VS2015 and earlier 2017-05-23 21:54:19 +10:00
Juan Linietsky 5b3709d309 Removal of InputEvent as built-in Variant type..
this might cause bugs I haven't found yet..
2017-05-20 17:05:38 -03:00
Juan Linietsky 98a3296702 Removal of Image from Variant, converted to a Resource. 2017-05-17 07:37:45 -03:00
toger5 304a1f5b5a Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
2017-05-07 14:23:56 +02:00
Rémi Verschelde c8aea60324 Improve documentation of thirdparty code snippets 2017-05-07 11:42:37 +02:00
Fabio Alessandrelli 5c6715a291 Fix UDP wait() not returning after first received packet 2017-05-05 17:41:11 +02:00
Rémi Verschelde dd55950b62 Drop EXEC PATHP?? super verbose info message
It seems to give nightmares to Windows users.
2017-04-17 23:39:04 +02:00
Sergey Pusnei 8589ca3903 Rename [gs]et_pos to [gs]et_position for Controls
Control set_pos -> set_position
Control set_global_pos -> set_global_position
[gs]et_mouse_pos -> [gs]et_mouse_position
[gs]et_global_mouse_pos -> [gs]et_global_mouse_position
fixes #8005
2017-04-10 08:27:34 +02:00
Juan Linietsky fccf2816d4 -Fix eternal black screen on Windows
-Disabled warnings on windows, need to properly set up warnings
2017-04-09 17:59:17 -03:00
Rémi Verschelde df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Juan Linietsky ce948ed63b Revert "8145 - Mouse Position is unknown until first mouse event on X11" 2017-04-06 13:08:42 -03:00
Rémi Verschelde 46bc14e66f Merge pull request #8246 from GodotNativeTools/dlscript-module
DLScript module
2017-04-04 00:25:03 +02:00
eska 9dbd6db63b Reenable Windows Desktop export 2017-04-03 19:52:11 +02:00
Karroffel fd55308786 added dlscript module
This module was written by bojidar-bg and me, with the help of ClikCode and touilleMan.

This adds a module to Godot that enables the use of dynamic libraries as a source for scripts.
That also allows third party libraries to be linked to Godot more easily and without creating modules.

For a readme see https://github.com/GodotNativeTools/godot_headers/blob/master/README.md
2017-04-03 17:20:11 +02:00
Karroffel 2281942fb3 Added methods for opening dynamic libraries to OS 2017-03-29 23:05:15 +02:00
Sergey Pusnei c79e998d1f 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
2017-03-28 19:18:40 -04:00
Rémi Verschelde 9d28a5e7d9 Merge pull request #8159 from Hinsbart/last_id
Input: Remove usage of platform dependent event IDs.
2017-03-27 08:52:58 +02:00
Rémi Verschelde d8f32637be 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.

(cherry picked from commit 31107daa1a)
2017-03-26 21:58:37 +02:00
Andreas Haas c0b6756875
Input: Remove usage of platform dependent event IDs.
The ID property for InputEvents is set by `SceneTree` when sending the event down the tree.
So there's no need for the platform specific code to set this value when it will later be overriden anyway...
2017-03-26 15:59:32 +02:00
Rémi Verschelde 296ece2c6a Merge pull request #7985 from Faless/enet_godot_sock_squash
Update ENet to use Godot sockets.
2017-03-24 22:47:18 +01:00
Rémi Verschelde debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
Fabio Alessandrelli 5f681d0b0f Allow non blocking UDP put_packet in C++.
- Add blocking mode option to PacketPeerUDP.
- put_packet returns ERR_UNAVAILABLE when operation would block.
- ENet module uses non-blocking UDP.
2017-03-24 02:30:11 +01:00
Rémi Verschelde 5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
Rémi Verschelde e1c1d7d1d7 Add a bunch of missing Godot headers in own files 2017-03-05 15:47:28 +01:00
Rémi Verschelde 49c065d29c 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.
2017-03-05 14:21:25 +01:00
Julian Murgia 94103c0c02 Add API to access battery power state
Done:
- X11, server (tested)
- Windows (developed, would be nice to retest)
- OSX (not tested)
Prepared (not developed):
- Android (code is here, but may not compile)
- iphone
- winrt
- bb10
- haiku
- javascript
2017-03-04 18:04:29 +01:00
Rémi Verschelde 34a0aa6900 Merge pull request #7862 from Hinsbart/joypad_connections
Better handling of joypad device IDs.
2017-02-26 21:30:24 +01:00
Andreas Haas a175ac7032
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-02-26 21:01:31 +01:00
Rémi Verschelde 2d3dd6f6ee Merge pull request #7854 from neikeq/pr-execute-iter
Replace misuse of list iteration
2017-02-26 20:23:10 +01:00
Rémi Verschelde ca805744fb Merge pull request #7848 from hpvb/fix-7839
Windows: Close audiodriver sooner on exit
2017-02-26 20:18:49 +01:00
Juan Linietsky de0045cf1b -renamed globals.h to global_config.cpp (this seems to have caused a few modified files)
-.pck and .zip exporting redone, seems to be working..
2017-02-21 00:06:30 -03:00
Ignacio Etcheverry 0cd309c5c7 Replace misuse of list iteration 2017-02-20 19:53:14 +01:00
Juan Linietsky f6950956bd Editor Export Settings Dialog is completed!! Now on to make some exporters.. 2017-02-19 23:21:35 -03:00
Hein-Pieter van Braam 04e51859f0 Windows: Close audiodriver sooner on exit
In #7839 I see the same error that was fixed in #7833 occuring on the
Windows platform. This moves the audio driver closing to the same place
in OS_Windows::finalize() as it is in OS_X11::finalize()

This fixes #7839
2017-02-19 20:45:17 +01:00
Rémi Verschelde 70b9aa379d Merge pull request #7581 from Faless/v6_wild_bind
TCP/UDP listen bind to address and bugfixes
2017-02-12 23:31:40 +01:00
Rémi Verschelde 3cab47adba Merge pull request #7782 from SaracenOne/windows_relative_cursor_fix
Fix relative cursor data in CAPTURED mouse mode on Windows.
2017-02-12 23:26:19 +01:00
Rémi Verschelde 43d947f54b Merge pull request #7771 from Limb/winaudiodriver
Close out audio drivers when exiting on Windows.
2017-02-12 23:24:09 +01:00
Rémi Verschelde dc5f978f28 Merge pull request #7770 from Limb/removedx9
Removed DX9 Rasterizer in windows
2017-02-12 23:23:34 +01:00
Saracen 523b69771b Fix glitches when sampling relative cursor data in CAPTURED mouse mode on Windows. 2017-02-11 03:54:36 +00:00
Kenneth Lorthioir bd893f346a Close out audio drivers when exiting.
Prevents a crash when closing the project manager.
2017-02-09 10:40:13 -05:00
Kenneth Lorthioir 091202589c Removed DX9 Rasterizer in windows.
This doesn't seem to be needed anymore and the code to free the unused
rasterizer was throwing a memory violation since it was getting set to a
value somehow.
2017-02-09 10:27:40 -05:00