Commit Graph

846 Commits

Author SHA1 Message Date
Hugo Locurcio 3f078c99f6
Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscores 2021-05-06 02:52:01 +02:00
Aaron Franke 0de9a7d803
Rename `doubleclick` to `double_click` 2021-05-04 04:38:08 -04:00
Rémi Verschelde 5b16020846
Replace remaining uses of `NULL` with `nullptr`
Follow-up to #38736 (these uses were likely added after this PR was merged).
2021-04-29 11:53:27 +02:00
Rémi Verschelde 8247667a3e
Core: Drop custom `copymem`/`zeromem` defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.
2021-04-27 16:26:27 +02:00
floppyhammer 18678fd11e Fix window resizing after minimization on Windows 2021-03-30 20:09:19 +08:00
Marcel Admiraal fd30c36985 Rename Texture.get_data() to get_image() 2021-03-28 13:00:46 +01:00
Aaron Franke a5324787c8
Rename some more global enums (Key, Joy, MIDI) 2021-03-23 07:13:23 -04:00
Aaron Franke 10d7fccb54
Rename ButtonList enum and members to MouseButton 2021-03-23 07:13:23 -04:00
Rémi Verschelde fcddd8c53a
Merge pull request #46966 from qarmin/faster_release
Allow to not optimize release build
2021-03-20 22:44:47 +01:00
Rafał Mikrut 0b298d201e Allow to not optimize release build 2021-03-14 15:51:05 +01:00
Rémi Verschelde 0fd723d3ec
Merge pull request #46941 from goostengine/asan-msvc
Add `use_asan` option for MSVC to enable AddressSanitizer
2021-03-13 22:10:01 +01:00
Rémi Verschelde 7015027cbf
Merge pull request #46900 from Ev1lbl0w/bugfix-malloc_calls
Replace malloc's with Godot's memalloc macro
2021-03-13 21:55:52 +01:00
Ev1lbl0w 838e7d0a8d
Replace malloc's with Godot's memalloc macro 2021-03-13 11:51:45 +00:00
Andrii Doroshenko (Xrayez) 53901d870b Add `use_asan` option for MSVC to enable AddressSanitizer
Exposes AddressSanitizer support in MSVC compiler. Can be installed via individual
components in the Visual Studio 2019 Installer.

Disabled by default. Compile the engine with `scons use_asan=yes`.
2021-03-12 18:44:06 +02:00
Anshul7sp1 91181c2086 Fixes small typos and grammar correction 2021-03-12 19:05:16 +05:30
PouleyKetchoupp 27d5e1fff0 Added LocalVector to Visual Studio debugger visualization 2021-02-24 18:35:39 -07:00
bruvzg 3e0262509f
Move tablet driver API from OS to DisplayServer. 2021-02-18 17:12:24 +02:00
reduz 8b19ffd810 Make Servers truly Thread Safe
-Rendering server now uses a split RID allocate/initialize internally, this allows generating RIDs immediately but initialization to happen later on the proper thread (as rendering APIs generally requiere to call on the right thread).
-RenderingServerWrapMT is no more, multithreading is done in RenderingServerDefault.
-Some functions like texture or mesh creation, when renderer supports it, can register and return immediately (so no waiting for server API to flush, and saving staging and command buffer memory).
-3D physics server changed to be made multithread friendly.
-Added PhysicsServer3DWrapMT to use 3D physics server from multiple threads.
-Disablet Bullet (too much effort to make multithread friendly, this needs to be fixed eventually).
2021-02-10 13:21:46 -03:00
Bastiaan Olij 4946ae16fc Use /Zi and /FS for including debugger symbols on Windows with MSVC 2021-02-09 00:20:42 +11:00
Rémi Verschelde 849c090343
SCons: Fix debug_symbols tests after switch to BoolVariable
Bug introduced in #45679.

Fixes part of #45816.
2021-02-08 08:53:16 +01:00
kobewi b6e2ad0e7e Cancel event dispatch on error 2021-02-07 21:50:12 +01:00
Rémi Verschelde db26871210 SCons: Add `production=yes` option to use production defaults
This is meant for users making custom builds to match the options used on
optimized, official builds.

This enables, on the platforms which support them:
- `use_static_cpp=yes` (portable binaries for Linux and Windows)
- `use_lto=yes` (link time optimizations - note: requires a lot of RAM!)
- `debug_symbols=no` (no debug symbols, smaller binaries)

Also abort when using MSVC with `production=yes`, as:
- It cannot optimize the GDScript VM like GCC or Clang do, leading to
  significant performance drops.
- Its LTO support is unreliable, at least used to trigger crashes last
  we tried it extensively.

All options can still be overridden if specified, and the `dev=yes` option
was changed to also support overrides.
2021-02-03 11:48:17 +01:00
Pedro J. Estébanez 99fe462452 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-01-29 12:02:13 +01:00
Rémi Verschelde d39f6386ce
Merge pull request #45314 from RandomShaper/modernize_rwlock
Modernize RWLock
2021-01-22 14:51:05 +01:00
Pedro J. Estébanez 8ed259b792 Modernize RWLock
- Based on C++14's `shared_time_mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-01-19 11:53:10 +01:00
Marios Staikopoulos 2a2de2f684 BUGFIX: Fix unintialized cursor_shape on windows display server 2021-01-18 15:52:47 -08:00
Marcel Admiraal 2a74b388d0 Split OS::execute into two methods
1. execute(): Executes a command and returns the results.
2. create_process(): Creates a new process and returns the new process' id.
2021-01-09 10:03:23 +00:00
Yuri Roubinsky 785f84f1d1 Removes semicolon typo in display_server_windows 2021-01-06 15:08:51 +03:00
Yuri Roubinsky d4939aa05f Fix PopupMenu's which are not closed after a recent commit 2021-01-06 14:42:15 +03:00
Rémi Verschelde 9d6df31b84
Merge pull request #44299 from Chaosus/fix_win32_warning
Fixed warning at window closing (WIN32)
2021-01-05 09:00:47 +01:00
Rémi Verschelde b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
Yuri Roubinsky 41efbf8cae Fixed warning at project startup (WIN32) 2021-01-01 18:09:34 +03:00
Yuri Roubinsky 8a2bc6bf58 Fix window restoring after fullscreen again 2020-12-31 16:07:05 +03:00
Rémi Verschelde 8886a6a45c
Merge pull request #44757 from andrew-softdev/my-bug-fix
Incorrect format specifiers used to display some type data in the Visual Studio debugger
2020-12-28 20:44:15 +01:00
andrew-softdev 679aabea26 Incorrect format specifiers used to display some String/StringName data 2020-12-28 18:46:32 +00:00
Rémi Verschelde e4c0572385
Merge pull request #44593 from madmiraal/rename-mainloop-methods
Rename MainLoop methods to match Node methods
2020-12-28 14:44:28 +01:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Marcel Admiraal d9e9eb8d04 Rename MainLoop methods to match Node methods 2020-12-22 12:34:57 +00:00
Marcel Admiraal 2df9a8ccad Rename Rect2 and Rect2i clip() to intersection() 2020-12-19 12:59:08 +00:00
Marcel Admiraal b56a2f34ce Add missing override keywords in os_windows.h 2020-12-18 09:38:09 +00:00
Marcel Admiraal fa435a550a Add override keywords to core/os.h derived classes. 2020-12-17 18:02:31 +00:00
Rémi Verschelde 0f84d8dc49
SCons: Add only selected platform's opts to env
Otherwise we can get situations where platform-specific opts with the same name
can override each other depending on the order at which platforms are parsed,
as was the case with `use_static_cpp` in Linux/Windows.

Fixes #44304.

This also has the added benefit that the `scons --help` output will now only
include the options which are relevant for the selected (or detected) platform.
2020-12-16 16:31:19 +01:00
Marcel Admiraal 8ef5e3201c Don't handle BaseException in build scripts 2020-12-12 10:05:42 +00:00
Rémi Verschelde 37d0d757d6
Merge pull request #40708 from bruvzg/improve_os_locale
Improve `OS::get_locale()` and documentation.
2020-12-10 11:49:00 +01:00
Rémi Verschelde e5e1277ecd
Merge pull request #44161 from Faless/fix/fa_buffered_remove
Remove unused FileAccessBuffered
2020-12-09 09:14:14 +01:00
Rémi Verschelde 90bdba576a
Merge pull request #43742 from qarmin/editor_modules_default_values
Initialize class/struct variables with default values in platform/ and editor/
2020-12-08 15:53:42 +01:00
Fabio Alessandrelli 781efc26e0 Remove now unused FileAccessBuffered. 2020-12-06 19:37:11 +01:00
reduz 2787ad65be RenderingServer reorganization 2020-12-04 18:39:46 -03:00
Bastiaan Olij cf5737acbe Added driving joystick type to windows joystick handling 2020-12-04 23:31:19 +11:00
Rémi Verschelde 328af1db75
Merge pull request #44074 from reduz/reorganize-3d
Reorganize rendering server.
2020-12-04 08:36:31 +01:00