Commit Graph

5903 Commits

Author SHA1 Message Date
Ignacio Etcheverry 77cb8f058d Replace misuse of list iteration
(cherry picked from commit 0cd309c5c7)
2017-03-18 20:13:17 +01:00
Hein-Pieter van Braam dffdf28349 X11 return to cwd at exit
During runtime godot calls chdir() several times. This doesn't really
matter normally but when using tools such as gprof the location of the
profiling data is kind of hard to intuit.

With this PR we simply store the current working directory at start and
restore it once we're almost done exiting.

This doesn't use the OS abstractions as when we need to get the current
workdir we haven't yet initialized it (by necessity). This would break
if we tried to build X11 for windows, but since the X11 target is
hardcoded to use the UNIX abstractions I don't think it matters.

(cherry picked from commit d0c2015fe1)
2017-03-18 20:12:42 +01:00
Vincent 02d711eb61 RichTextLabel add function remove_line
(cherry picked from commit c20b186e73)
2017-03-18 20:11:42 +01:00
Hein-Pieter van Braam 4cf49bb6f4 Allow preload to accept a const string.
In preload() parsing this code will lookup the identifier in the local
constant database. If the identifier corresponds to a string constant
it is used as the path for preload().

Currently this does not work for global constants, only constants
declared in the same class as the preload is happening. We can implement
a full fix too. Maybe we can use this PR to discuss the possibilities.

This (partially) fixes #6798

(cherry picked from commit 3e5743ca36)
2017-03-18 20:10:36 +01:00
Andreas Haas 674a090e59 Spinbox: don't ignore double clicks.
Fixes the problem with spinboxes not updating when clicking too fast.

(cherry picked from commit dd4c2709e4)
2017-03-18 20:09:55 +01:00
Hein-Pieter van Braam 38e86c8c24 Remove bounds check when resuming from yield.
The code would get a pointer to the beginning of the call_args by using
operator[] at the stack Vector. This does bound checking. When there are
no call_args this bound check fails and the error mentioned in #7796
gets triggered.

This bound check is actually not necessary as call_args just gets set to
NULL and never dereferenced. This new code will just unconditionally set
the pointer to the place where the call_args are if there are any. There
is no NULL check for call_args anywhere so this is safe.

Fixes #7796

(cherry picked from commit e8611966de)
2017-03-18 20:09:45 +01:00
Brett-Mitchell 616850b3c0 Fix for issue #7766
Add initialization for OS_OSX.mouse_mode in OS_OSX::OS_OSX().  mouse_mode now defaults to OS::MOUSE_MODE_VISIBLE.
(cherry picked from commit 6921e11805)
2017-03-18 20:09:45 +01:00
Andreas Haas 12a1b517ca ProjectSettings: InputMap dialog fixes
Now the selection jumps to the correct action after a new event has been added.
Also sets the default device id for Joypad button events to 0.

(cherry picked from commit 92ac7067e6)
2017-03-18 20:08:25 +01:00
Saracen 919c1d627f Fix glitches when sampling relative cursor data in CAPTURED mouse mode on Windows.
(cherry picked from commit 523b69771b)
2017-03-18 20:06:40 +01:00
Andreas Haas fb2173174d Particles2D: implement texture flip parameters.
(cherry picked from commit 6a2dccaf77)
2017-03-18 20:06:11 +01:00
Hein-Pieter van Braam c67b08300a Add a simple signal handler for SIGCHLD on Unix
This fixes #6631

(cherry picked from commit cff6840ff7)
2017-03-18 20:05:57 +01:00
Bojidar Marinov 9f536e3962 Make _sc_ files work like ._sc_, fixes #7762
(cherry picked from commit 27bb6b5282)
2017-03-18 20:04:00 +01:00
m4nu3lf ca2277f3f1 Fixed property setter in G6DOF joint
(cherry picked from commit 0d9b53ce5e)
2017-03-18 19:58:23 +01:00
kbake 31260bb720 Selected text is now deselected on ctrl+home/end
This fixes Issue #7694 and also the error mentioned in the comments of that issue.

(cherry picked from commit 1169f4e040)
2017-03-18 19:58:13 +01:00
marcelofg55 97fef612fb Fix issues with set_window_resizable on x11
(cherry picked from commit 474e3ac055)
2017-03-18 19:56:16 +01:00
Chris Bradfield c01c5fce59 grammar fixes, it's -> its
(cherry picked from commit 10176228b2)
2017-03-18 19:55:34 +01:00
Andreas Haas 6fb2abc7d8 SceneTreeDock: Fix crash when dragging invalid nodes.
Fixes #7529

(cherry picked from commit a64a348054)
2017-03-18 19:54:51 +01:00
Ferenc Arn 5e90183ba4 Use -Ofast on x11. Also introduced use_lto option.
debug_release doesn't turn off optimizations for release target now. Ensure that sanitizer options apply to both C and C++ files.

Built-in optimization/debug flags are prepended such that user-specified flags can override them.

Based on and around the discussion in PR #5194.

(cherry picked from commit 7a85d25218)
2017-03-18 19:52:35 +01:00
Ray Koopa 3f8ce209b7 Added warning when removing animations
(cherry picked from commit f279df2654)
2017-03-18 19:52:08 +01:00
Andreas Haas 8015ab0db3 Add ClassDB binding for File.get_modified_time
Closes #7613

(cherry picked from commit 5ec0610c60)
2017-03-18 19:46:36 +01:00
Geequlim ca3881ccb8 Add 'Copy Node Path' action to right mouse menu
(cherry picked from commit 65db43d5ae)
2017-03-18 19:43:13 +01:00
Fabio Alessandrelli b9451ce58d Fix gibberish output for windows/mingw.
%ls should be used instead of %s or %S to speficy narrow/wide charstring
in wprintf fwprintf

Fixes #6252

(cherry picked from commit 3df934acad)
2017-03-18 19:42:21 +01:00
volzhs 507bb0e1cb Change camera default rotation
(cherry picked from commit 0ecf7f7ca0)
2017-03-18 19:42:07 +01:00
Jerome67000 ab7faa1281 #7215 try to fix adb bad targeting user on device
(cherry picked from commit 8c19a6cb85)
2017-03-18 19:41:37 +01:00
Andreas Haas 1eb9925f58 CollisionShape2D: Fix warning icon not updating.
`CollisionPolygon2D` also had this problem.

(cherry picked from commit 16eee2f59b)
2017-03-18 19:32:02 +01:00
Ray Koopa 98f01f9143 Respect style boxes for Button states other than "normal"
(cherry picked from commit 2baeb531e6)
2017-03-18 19:31:43 +01:00
Jesper Bækdahl e5f0183b0a x11: don't wait for window to be mapped
(cherry picked from commit 8f7a3884fd)
2017-03-18 19:29:46 +01:00
Rémi Verschelde 618ac3842e Merge pull request #8068 from Hinsbart/fix_ps_cross_2.1
InputMap: Rename joypad button "PS X" to "PS Cross". [2.1]
2017-03-18 14:52:59 +01:00
Andreas Haas 5cc184d732
InputMap: Rename joypad button "PS X" to "PS Cross". 2017-03-18 12:36:53 +01:00
Rémi Verschelde b5be9d6115 Merge pull request #8038 from RandomShaper/remove-warning-2.1
Remove warning on owner re-assignment (2.1)
2017-03-18 10:49:35 +01:00
Rémi Verschelde 58455f03f7 Merge pull request #8031 from RandomShaper/fix-redundant-connections-2.1
Fix redundant connections (2.1)
2017-03-18 10:46:59 +01:00
Pedro J. Estébanez 7b27cc91b1 Remove warning on owner re-assignment 2017-03-15 12:28:38 +01:00
Pedro J. Estébanez 148566b31b Fix redundant connections saved in sub-inheritance 2017-03-15 11:48:24 +01:00
Pedro J. Estébanez 6289997724 Fix ambiguity in StringName (null data vs. data with empty string) 2017-03-15 04:26:23 +01:00
Rémi Verschelde 8ea4413a2c Merge pull request #8016 from RandomShaper/optimize-assert-2.1
Skip asserts on non-debug builds at compiler level (2.1)
2017-03-13 11:08:47 +01:00
Rémi Verschelde c185fe1095 Merge pull request #7991 from BastiaanOlij/CoreMotion_2.1
Core motion for Godot 2.x (based on PR 7127)
2017-03-13 11:03:31 +01:00
Rémi Verschelde ce09a094ab Merge pull request #7987 from RandomShaper/fix-touch-button-2.1
Several fixes for TouchScreenButton (2.1)
2017-03-13 11:02:50 +01:00
Rémi Verschelde 3c566fc552 Merge pull request #7978 from RandomShaper/fix-sub-inheritance-2.1
Fix node duplication in scene sub-inheritance (2.1)
2017-03-13 11:00:59 +01:00
Rémi Verschelde e869a8a279 Merge pull request #7969 from RandomShaper/pr-7565-polish
PR 7565 + polish
2017-03-13 11:00:20 +01:00
Rémi Verschelde 91cf3c1321 Merge pull request #7957 from RandomShaper/fix-kb-2d-motion-2.1
Fix KinematicBody2D motion issues + KinematicBody2D.test_move_from() (2.1)
2017-03-13 10:59:53 +01:00
Pedro J. Estébanez 204a7481e0 Skip asserts on non-debug builds at compiler level 2017-03-13 00:23:42 +01:00
Pedro J. Estébanez 3be30efe8e Fixes for TouchScreenButton
- getting stuck on pause
- handling input when not visible
2017-03-10 14:11:54 +01:00
BastiaanOlij 8436a34305 Core motion for Godot 2.x (based on PR 7127) 2017-03-09 21:46:38 +11:00
Pedro J. Estébanez 6aef1c48c4 Fix node duplication in scene sub-inheritance 2017-03-08 19:58:59 +01:00
Rémi Verschelde 50c6a6d9b1 Merge pull request #7977 from eska014/2.1-web-window
Backport all web 'window' features to 2.1
2017-03-08 07:28:38 +01:00
eska 9518401100 Add window features in web export
- Add 'window' (canvas) resize, maximize and fullscreen
 - Implement get_screen_size
 - Fix fullscreen resolution

(cherry picked from commit 3e1b437315)
2017-03-07 14:11:00 +01:00
eska d34c530a7f Revert "Add fullscreen features in web export"
This reverts commit 17422f1f86.
2017-03-07 14:11:00 +01:00
Pedro J. Estébanez 1e79f80b90 Finish fix for POSITION in 2D shaders 2017-03-06 18:31:29 +01:00
Pedro J. Estébanez 95a5d9e617 Fix KinematicBody2D wrong motion origin
Got part of the fix from 5fc084c28e
Added an engine setting to enable the fix (physics_2d/motion_fix_enabled) which is false by default so the default behavior is the same as always
Added motion methods with a from parameter, the same as 3.0 does
2017-03-06 05:10:15 +01:00
Rémi Verschelde cc265d5506 Merge pull request #7910 from RandomShaper/single-field-prop-edit-2.1
Implement single-field property change for multinode edit (2.1)
2017-03-05 13:43:35 +01:00