summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2020-02-08Merge pull request #36011 from madmiraal/fix-33391Rémi Verschelde
Remove do{ } while(0) wrapper around error macros.
2020-02-08Merge pull request #35682 from nathanwfranke/canvas-cull-control-fixRémi Verschelde
Fix bug where canvas culls things at origin with size 0
2020-02-08Remove do{ } while(0) wrapper around error macros.Marcel Admiraal
As pointed out by Faless, a do{ } while(0) wrapper around a continue or break just ends the do{ } while(0) loop. The do{ } while(0) loop exists to enable the macro to be used as a function which requires a semicolon. The alternative approach is to use an if(1) { } else ((void)0) wrapper. Since the macro already has an if(unlikely(m_cond)) { } this patch simply adds the else ((void)0) to this if statement instead. For consistency all the macros have been updated in the same way, and trailing else warnings corrected. However, the wrappers around ERR_PRINT and WARN_PRINT were removed, because they generated too many ambiguous trailing else warnings. They are also single line macros so a wrapper is not needed.
2020-02-07Fix bug where Control at origin with 0 size not renderednathanwfranke
Make a new method instead to make the code more elegant Move Function down a bit
2020-02-07SCons: Generate header with info on which modules are enabledRémi Verschelde
We already had `MODULE_*_ENABLED` defines but only in the modules environment, and a few custom `*_ENABLED` defines in the main env when we needed the information in core. Now this is defined in a single header which can be included in the files that need this information.
2020-02-06Merge pull request #35887 from dankan1890/quick_fixRémi Verschelde
Fixed String::humanize_size crash.
2020-02-05Apply macro documentation from #35521.Marcel Admiraal
2020-02-05Remove trailing semicolons from do..while wrappers.Marcel Admiraal
- Remove trailing semicolons from ERR_FAIL_INDEX macros. - Remove trailing semicolons from ERR_FAIL_UNSIGNED_INDEX macros. - Remove trailing semicolons from CRASH_BAD_INDEX macros. - Remove trailing semicolons from CRASH_BAD_UNSIGNED_INDEX macros.
2020-02-05Add do..while(0) wrappers to macros without one.Marcel Admiraal
- Add do..while(0) wrapper to ERR_FAIL_NULL macros. - Add do..while(0) wrapper to ERR_FAIL_COND macros. - Add do..while(0) wrapper to ERR_CONTINUE macros. - Add do..while(0) wrapper to ERR_BREAK macros. - Add do..while(0) wrapper to CRASH_COND macros. - Add do..while(0) wrapper to ERR_FAIL macros. - Add do..while(0) wrapper to ERR_PRINT macros. - Add do..while(0) wrapper to WARN_PRINT macros. - Add do..while(0) wrapper to WARN_DEPRECATED macros. - Add do..while(0) wrapper to CRASH_NOW macros.
2020-02-05Remove duplicate WARN_PRINT macro.Marcel Admiraal
2020-02-05Remove duplicate ERR_PRINT macro.Marcel Admiraal
2020-02-05Clean up error_macros.hMarcel Admiraal
2020-02-03Fixed String::humanize_size crash.dankan1890
Close #35872
2020-01-28Color: Fix deprecation warning mentioning 'get_v()' instead of 'v'Rémi Verschelde
Fixes #35657.
2020-01-28MessageQueue: Fix setting name in OOM error messageRémi Verschelde
Cf. #35653.
2020-01-28Fixes invalid writes in Image operationsHaoyu Qiu
2020-01-26Merge pull request #35521 from Calinou/improve-error-macrosRémi Verschelde
Improve and document error macros
2020-01-26doc: Document named color constantsRémi Verschelde
Busywork but it's good for our completion rate :)
2020-01-24Improve and document error macrosHugo Locurcio
Documentation can be visible in many IDEs by hovering the macro anywhere it's used. Error message styling was also tweaked for consistency.
2020-01-24Add explanations for errors related to Vector/Quat normalizationHugo Locurcio
2020-01-23Merge pull request #35438 from MadEqua/virtual-keyboard-line-editRémi Verschelde
Android virtual keyboard respecting LineEdit max length.
2020-01-23Android virtual keyboard respecting LineEdit max length.Bruno Lourenço
2020-01-23Make `OS.execute()` blocking by default if not specifiedHugo Locurcio
This makes `OS.execute()` calls quicker to set up when calling programs in a blocking fashion.
2020-01-22Merge pull request #35414 from Ovnuniarchos/AlsaMidiBadPitchBendRémi Verschelde
ALSA MIDI: Pitch bend and System Common messages
2020-01-22Merge pull request #35406 from lawnjelly/ortho-shadowRémi Verschelde
Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
2020-01-22ALSA MIDI driver:Ovnuniarchos
Pith bend message now has correct size (was 2 bytes instead of 3). Recognized (but not implemented) 0xF? messages. SysEx messages will be reocognized as such, but their contents will be ignored.
2020-01-22Change CameraMatrix::get_viewport_size to get_viewport_half_extentslawnjelly
Fixes #26637. Fixes #19900. The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2. Code which called this function has also been modified accordingly. This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width. It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22Merge pull request #35423 from Faless/fix/object_emit_freeRémi Verschelde
Make sure we know when deleting an emitting object
2020-01-22Make sure we know when deleting an emitting objectFabio Alessandrelli
We used a lock signals in the signal_map while emitting, because it was not allowed to disconnect them while being emitted. We used that lock to check if we where deleting an object during signal emission. Now that we allow to disconnect signals while they are being emitted, if an object first disconnects, then gets deleted we can't know that a signal was being emitted during the destructor. This commit adds a new `_emitting` boolean member to Object to be set while emitting and checked in the destructor, while removing the old signal lock which is now unused.
2020-01-22Thread: Fix typo in destructor error messageRémi Verschelde
2020-01-22Fixes leak when importing zip in AssetLibHaoyu Qiu
2020-01-21Merge pull request #35408 from Faless/ws/fix_packet_countRémi Verschelde
Fix MultiplayerAPI crash when peer implementation misbehave.
2020-01-21Fix MultiplayerAPI crash when peer impl misbehave.Fabio Alessandrelli
Also fix WebSocketMultiplayer::get_available_packet_count() return value when peer is not configured to use the multiplayer API.
2020-01-20Fix AtlasPacker ignoring semi-transparent pixelsEric Rybicki
Fixes #33106
2020-01-20Merge pull request #35345 from timothyqiu/pck-packer-leakRémi Verschelde
Fixes leak when calling PCKPacker::pck_start multiple times
2020-01-20Fixes leak when pck_start multiple timesHaoyu Qiu
2020-01-20Fixes XMLParser leak when open multiple timesHaoyu Qiu
2020-01-19PacketPeer use heap buffer for var encoding.Fabio Alessandrelli
Used to allocate in stack (via alloca) which causes crashes when trying to encode big variables. The buffer grows as needed up to `encode_buffer_max_size` (which is 8MiB by default) and always in power of 2.
2020-01-14Merge pull request #35092 from AndreaCatania/frames_expRémi Verschelde
Exposed physics frame count and idle frame count
2020-01-13Object: Avoid error on emit_signal with freed targetRémi Verschelde
As advised by @reduz.
2020-01-13Exposed physics frame count and idle frame countAndrea Catania
2020-01-13Object: Remove error on disconnect of locked signalsRémi Verschelde
According to https://github.com/godotengine/godot/commit/22637beb2ed625c3e43ab75ab5865b57d7470948#commitcomment-36651823 and as confirmed by @reduz, this seems not to be necessary now that we copy-on-write. This triggered freeze scenarios in cases where a node would be deleted while being used as a target in a signal emission. Fixes #34650. Fixes #34769. Now those two errors go back to reporting: ``` ERROR: emit_signal: Condition ' !target ' is true. Continuing..: At: core/object.cpp:1191. ```
2020-01-13Revert "Enable Vsync via Compositor by default"Rémi Verschelde
This reverts commit 9600fd5dde1f85b7dd2dd8558d52ff86b18651e7. Add comment warning about possible implications of using this option. Fixes #35038.
2020-01-10[macOS] Load PCK from the .app bundle resources, instead of changing working ↵bruvzg
directory.
2020-01-10Merge pull request #34968 from Calinou/enable-vsync-via-compositorRémi Verschelde
Enable Vsync via Compositor by default
2020-01-09Enable Vsync via Compositor by defaultHugo Locurcio
This feature was added in #33414 but it was disabled by default. Now that it got some testing, it's probably safe to enable it by default.
2020-01-09GDScript: Validate object instance on `is` operationGeorge Marques
Avoids crashes on debug mode. Instead it now breaks the execution and show the error in-editor. Will still crash on release. Also add a similar check to Marshalls to ensure the debugger doesn't crash when trying to serialize the invalid instance.
2020-01-08Check if resource exists before loadingTomasz Chabora
2020-01-08Merge pull request #34875 from neikeq/api-hash-no-underscore-methodbindsRémi Verschelde
ClassDB: Exclude method binds starting with '_' from API hash
2020-01-07ClassDB: Exclude method binds starting with '_' from API hashIgnacio Etcheverry
These methods are not meant to be part of the scripting API. These are not the same as virtual methods starting with '_', e.g.: '_process'.