summaryrefslogtreecommitdiff
path: root/main
AgeCommit message (Collapse)Author
2019-02-22Don't crash when parse_utf8 receives a NULL pointerHein-Pieter van Braam
This can happen when chaining calls to various string methods when the string is empty.
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-20Merge pull request #26087 from akien-mga/settings-per-pixel-transparencyRémi Verschelde
ProjectSettings: fix category for per pixel transparency settings
2019-02-20ProjectSettings: fix category for per pixel transparency settingsRémi Verschelde
2019-02-20GDScript: Remove unused `switch`, `case` and `do` CF keywordsRémi Verschelde
They had been reserved for future implementation, but we now have the `match` CF keyword which does the same and more. According to @reduz `do` was even added by mistake when copying from the shader language parser, it was never intended to add support for `do`... `while` loops, as the syntax would be awkward in GDScript, and the added sugar is not worth it. Fixes #25787.
2019-02-18Fix warnings seen with warnings=all and recent GCC 8.2.marxin
2019-02-12Drivers, main, servers: Ensure classes match their header filenameRémi Verschelde
Renamed: - `drivers/alsamidi/alsa_midi.h` -> `midi_driver_alsamidi.h` (same for `coremidi` and `winmidi`) - `main/timer_sync.h` -> `main_timer_sync.h` - `servers/visual/visual_server_global.h` -> `visual_server_globals.h`
2019-02-12Merge pull request #25481 from hpvb/fix-ubsan-asan-reportsRémi Verschelde
Fix many asan and ubsan reported issues
2019-02-10Be explicit about usage of GDScript testsRémi Verschelde
Also drop empty "image" test, and print proper error when passing wrong test name. Fixes #25638.
2019-02-09[Core] Rename Matrix3 file to BasisAaron Franke
The code already referred to "Basis", it's just the file name that was different for some reason.
2019-01-30Fix many asan and ubsan reported issuesHein-Pieter van Braam
This allows most demos to run without any ubsan or asan errors. There are still some things in thirdpart/ and some things in AudioServer that needs a look but this fixes a lot of issues. This should help debug less obvious issues, hopefully. This fixes #25217 and fixes #25218
2019-01-24Make recursive nature of iteration not fail.Juan Linietsky
2019-01-24Do not fail on recursive iteration. Not ideal but should work for now and ↵Juan Linietsky
not crash. Fixes #25272 Eventually some sort of main even queue should be implemented to do this properly.
2019-01-22Avoid cyclic iteration check, fixes #24969Juan Linietsky
2019-01-21Sync controller mappings DB with SDL2 community repoRémi Verschelde
Synced with gabomdq/SDL_GameControllerDB@c5af5d58f44e070b1fa127f70f38eeeaaaff12a3. Closes #25138.
2019-01-16Donors: Remove GameDev.tv from splash screenRémi Verschelde
2019-01-16Fix some errors found by static analysisRémi Verschelde
Fixes items 10, 16 and 19 from PVS-Studio blog post in #24014.
2019-01-14GLES2: Make Nvidia flicker workaround opt-inRémi Verschelde
It has a big impact on 2D and text rendering performance (cf. #24466) so the solution seems worse than the bug it aims to work around. It's now opt-in via "rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround" for those who need it and have a simple enough game for the performance drop not to be an issue. Fixes #24466.
2019-01-07Repair String lstrip and rstrip.Ibrahn Sahir
Background: lstrip and rstrip were broken by changes to String in: 0e29f7974b59e4440cf02e1388fb9d8ab2b5c5fd which removed it's access to Vector::find(CharType). Moved Vector's find up into CowData so it can be shared by Vector and String. Added String::find_char using CowData::find. Implemented rstrip and lstrip using find_char. Added a few tests for String rstrip and lstrip.
2019-01-04Fixed out of bounds axis name accessWilson E. Alvarez
2019-01-04String[size()] should return a default constructed CharTypeHein-Pieter van Braam
As per the C++ standard 21.3.4.1 for std::string: Returns: If pos < size(), returns data()[pos]. Otherwise, if pos == size(), the const version returns charT(). Otherwise, the behavior is undefined. Since the behavior is undefined Godot now does the same thing for const and non-const versions of operator[]. This fixes #21242 and fixes #22221.
2019-01-03Don't apply target_fps in editorTimo Schwarzer
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!
2018-12-20Core: Drop unused global_defaults logicRémi Verschelde
It used to be used for Android and iOS to specify platform-specific project settings overrides, but we now have feature tags for that.
2018-12-17Fix maybe-uninitialized warnings from GCC 4.8.xRémi Verschelde
Fixes the following warnings in `p=server target=release_debug` builds on Travis CI: ``` ./core/os/memory.h: In function 'MainLoop* TestOAHashMap::test()': ./core/os/memory.h:108:111: warning: 'dummy' may be used uninitialized in this function [-Wmaybe-uninitialized] #define memnew_placement(m_placement, m_class) _post_initialize(new (m_placement, sizeof(m_class), "") m_class) ^ main/tests/test_oa_hash_map.cpp:98:7: note: 'dummy' was declared here int dummy; ^ scene/resources/bit_mask.cpp:447:3: warning: 'next_i' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/resources/bit_mask.cpp:448:4: warning: 'next_j' may be used uninitialized in this function [-Wmaybe-uninitialized] ```
2018-12-16Merge pull request #19501 from Zylann/custom_loadersRémi Verschelde
Added basic support for custom resource savers and loaders
2018-12-15Added basic support for custom resource savers and loadersMarc Gilleron
2018-12-14Merge pull request #20081 from moiman100/fix-double-click-holdRémi Verschelde
Fixes is_pressed when holding double click.
2018-12-07Merge pull request #22733 from guilhermefelipecgs/fix_wm_classRémi Verschelde
[x11] Use "application/config/name" for WM_CLASS
2018-12-07Merge pull request #22323 from williamd1k0/ignore-main-sceneRémi Verschelde
Editor: Skip loading main scene if restore_scenes_on_load is used
2018-12-05Tests: Drop old test_io referencing data which isn't includedRémi Verschelde
This should eventually be rewritten to properly test IO features, but this would be part of a bigger work on adding a proper testing framework for Godot features. Fixes #2454.
2018-11-28Fix many errors found by PVS-StudioAaron Franke
Fix errors 2, 3, 4, 6, 8, 9, 11, 12, 13, 14, and 15.
2018-11-23Improved support for custom image loadersFabian
2018-11-10Merge pull request #23597 from vnen/network-fs-fixRémi Verschelde
Fix deploy with network filesystem
2018-11-10Fix deploy with network filesystemGeorge Marques
Also make some prints only happen in verbose mode.
2018-11-10Allow to specify a custom strength when calling Input.action_press(), this ↵Davide Baldo
allows virtual axis, mainly for mobile.
2018-10-25Merge pull request #23262 from swenner/more-cppcheck-fixesRémi Verschelde
More cppcheck fixes, fixes #22702
2018-10-25fixed uninitialized variables and false positives found by CppCheckSimon Wenner
2018-10-25Merge pull request #22779 from Superwaitsum/LimitSettingsRémi Verschelde
Limit several project settings
2018-10-24Add some limits on the Editor SettingsSuperwaitsum
2018-10-24Merge pull request #23012 from RandomShaper/fix-touch-speed-trackingRémi Verschelde
Track screen drag speed
2018-10-19Merge pull request #23035 from voithos/missingpckMax Hilbrunner
Show an alert when a project is not found in release mode
2018-10-17Show an alert when a project is not found in release modeZaven Muradyan
Previously, an error message would get printed to the console, but this is problematic in e.g. Windows where a console is not displayed. In the case of a missing .pck file, the binary would just silently fail. Now, it shows an alert. Fixes #21994.
2018-10-16Merge pull request #22548 from fire/visualscript_whitespaceRémi Verschelde
Visualscript search fixes
2018-10-14Track screen drag speedPedro J. Estébanez
Following the universal input handling effort, this works the same for every platform, as long as the touch move event coming from it contains the relative movement. The same tracking algorithm used to track the mouse speed is used here, but tracking separately each touch index. Fixes #3623.
2018-10-11Make visualscript search better.K. S. Ernest (iFire) Lee
* There were spaces unequally inside the function definitions. * camelcase_to_underscore() should also work for numbers inside of the camel case. * Removed the builtin concept * Capitalize descriptions from methods too. * Match the visual script functions by removing the empty arguments "( )" * Add some test cases
2018-10-11Add testcase whether OAHashMap loses keysFlorian Jung
This demonstrates issue #22928.
2018-10-05[x11] Use "application/config/name" for WM_CLASSGuilherme Felipe
2018-10-04Fix GCC 8 warnings about potentially unitialized variablesRémi Verschelde
Fixes the following GCC 8 warnings: ``` core/image.cpp:730:44: warning: 'mip1_weight' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:293:20: warning: 'mip2' may be used uninitialized in this function [-Wmaybe-uninitialized] core/image.cpp:293:20: warning: 'mip1' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/audio_stream_preview.cpp:58:19: warning: 'vmax' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/audio_stream_preview.cpp:85:19: warning: 'vmin' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/editor_themes.cpp:306:53: warning: 'preset_contrast' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/plugins/animation_blend_space_2d_editor.cpp:459:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] editor/plugins/animation_blend_space_2d_editor.cpp:443:27: warning: 'prev_idx' may be used uninitialized in this function [-Wmaybe-uninitialized] main/tests/test_oa_hash_map.cpp:57:29: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized] modules/csg/csg.cpp:764:40: warning: 'max_angle' may be used uninitialized in this function [-Wmaybe-uninitialized] modules/csg/csg_shape.cpp:1945:3: warning: 'face_count' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1593:8: warning: 'cone_aperture' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/3d/voxel_light_baker.cpp:1592:6: warning: 'cone_dir_count' may be used uninitialized in this function [-Wmaybe-uninitialized] scene/animation/animation_blend_space_2d.cpp:471:8: warning: 'mind' may be used uninitialized in this function [-Wmaybe-uninitialized] core/os/memory.cpp:94: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] core/os/memory.cpp:95: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] core/os/memory.cpp:98: warning: ignoring #pragma clang diagnostic [-Wunknown-pragmas] ```
2018-10-03Fix some more warnings reported by CIRémi Verschelde
Fixes the following Clang 7 warnings: ``` core/io/marshalls.cpp:872:10: warning: unused variable 'f' [-Wunused-variable] core/ustring.cpp:1831:2: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] core/ustring.cpp:1832:2: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] drivers/gles3/rasterizer_gles3.cpp:82:24: warning: unused function '_gl_debug_print' [-Wunused-function,34] main/main.cpp:118:13: warning: unused variable 'auto_build_solutions' [-Wunused-variable] modules/csg/csg_gizmos.cpp:225:46: warning: 'current' may be used uninitialized in this function [-Wmaybe-uninitialized] ```