Commit graph

66927 commits

Author SHA1 Message Date
Nodragem
e7e633760a prevent the click to get processed further after a paste action 2024-08-09 10:39:25 +01:00
Rémi Verschelde
2edf9b95b3
AudioStreamPolyphonic: Implement stopping with sample playback
Fixes #94724.
2024-08-09 10:57:50 +02:00
Rémi Verschelde
c73ac74c4a
Merge pull request #95311 from mihe/file-access-use-after-free
Fix use-after-free in `FileAccess::exists`
2024-08-09 10:24:02 +02:00
Rémi Verschelde
d7c8a9f179
Merge pull request #95307 from mihe/editor-help-use-after-free
Fix use-after-free in `EditorHelp`
2024-08-09 10:23:55 +02:00
Rémi Verschelde
088065c6cc
Merge pull request #95295 from bruvzg/macos_kill
[macOS] Remove kill override.
2024-08-09 10:23:45 +02:00
Sai Nane
e6a7c63125 binder_common: Fix uninitialized marshalling
C# uses `long`s to access many native values. With `PtrToArg<m_enum>` and
`PtrToArg<bitfield<m_enum>>` this isn't a problem, as C++ code converts
through a `*(int64_t*)` cast in assignment, so all 64-bits are initialized.

However, with `PtrToArg<char32_t>`, value assignment happens through an
`*(int *)` cast, leaving 32 bits uninitialized where `int` is 32 bits. On
platforms where `int` is 16 bits, there are presumably 48 bits uninitialized,
though there are very few platforms where this is still the case.

The easiest way to see the practical effects of this is by looking at
`EventInputKey.Unicode`:

```csharp
    public override void _Input(InputEvent @event) {
        if (@event is InputEventKey keyEvent) {
            if (keyEvent.IsPressed() && !keyEvent.Echo) {
                var raw = keyEvent.Unicode;
                var value = raw & 0xffffffff;
                GD.Print($"Key pressed: raw: {raw}; masked: {(char) value} ({value})");
            }
        }
    }
```

Pressing 'a' emits the following line:
```
Key pressed: raw: -3617008645356650399; masked: a (97)
```

Examining execution flow in gdb shows this conversion going through the
following line:
```
PtrToArg<char32_t>::encode (p_ptr=0x7ffcd5bb4b18, p_val=97 U'a') at ./core/variant/binder_common.h:221
221			*(int *)p_ptr = p_val;
```

Here, `p_val` is still 97, which is the value `InputEventKey.Unicode`
is expected to have. After assignment, `p *(int64_t *)0x7ffcd5bb4b18` displays
`-3617008645356650399`, with only the lower 32 bits being properly assigned,
and is the value we see from C#.

With this patch applied, the above testing `_Input` now prints:
```
Key pressed: raw: 97; masked: a (97)
```

Thank you to blujay1269 for asking about an unexpected value they saw in
`EventInputKey.Unicode`, which prompted this investigation.
2024-08-09 05:15:54 +00:00
Mikael Hermansson
613600fa89 Fix use-after-free in FileAccess::exists 2024-08-09 03:33:51 +02:00
Mikael Hermansson
6435112e97 Fix use-after-free in EditorHelp 2024-08-09 02:42:58 +02:00
Hugo Locurcio
fb88658cc8
Draw a checkerboard behind translucent colors in CodeEdit autocompletion previews
This makes translucent colors easier to interpret as such
and is consistent with how they're displayed in ColorPicker.
2024-08-09 00:03:11 +02:00
bruvzg
932acce8f2
Fix TextServer::shaped_text_*_character_pos for the first character of wrapped string. Allow starting/ending RTL selection before line start. 2024-08-09 00:03:00 +03:00
Yahkub-R
bcd776e441 Fix AudioStreamPlayer get_playback_position() for web build 2024-08-08 15:58:25 -04:00
bruvzg
9949d5a089
[macOS] Remove kill override. 2024-08-08 21:39:00 +03:00
MylesScholz
cdaba941d5 StyleBoxTexture unit tests
Capitalization fix in test_style_box_texture.h

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>

Newline fix in test_style_box_texture.h

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-08-08 11:36:34 -07:00
Joel Croteau
f44d6a235f Fix reload of GDExtension libraries in framework package on macos
`GDExtension::open_library` has a check in it to see if the library was loaded
from a temp file, and if it was to restore the original name as that is the one
we actually care about. This check is breaking extension reloading on Mac when
the library path is to a framework folder, as the file inside the framework
will not generally be the same name as the folder.

This check also shouldn't be necessary even on Windows, which is the only
platform that uses `generate_temp_files`, since disposal of the created temp
file is handled within `OS_Windows::open_dynamic_library`, and
`GDExtension::open_library` (which is the only function to call
`open_dynamic_library` with a `p_data` argument) only cares about the original
library file path and has to do extra work to remove the name of the temp file.
Instead, I have removed that check and set `OS_Windows::open_dynamic_library`
to return the name of the original file and not the name of the copy.

This fixes GDExtension reloading on macOS. I do not have a Windows machine
available to test that it still works properly on Windows, so someone should
check that before merging this.
2024-08-08 08:31:49 -06:00
Sen
52cd5acdda Fix for multimesh motion vector corruption by resetting motion vector state and filling both halves of buffer 2024-08-08 16:19:31 +02:00
Rio Arswendo Rachmad
138bcc7cfd fix: project settings not properly saved after a file removal 2024-08-08 20:14:53 +07:00
Rémi Verschelde
739019e4e4
Merge pull request #95277 from akien-mga/ci-emscripten-3.1.64
CI: Update Emscripten to 3.1.64
2024-08-08 15:05:03 +02:00
OlesyaGerasimenko
443da32655
Add Russian translation to Linux .desktop file 2024-08-08 14:22:19 +02:00
Claire Blackshaw
19c7afee07 OpenXR - Support for the Logitech MxInk Stylus
In future work we may want to expose an isStylus or similar for
XR Trackers, though that is likely outside the scope of this commit
which is the core extension work.

Vendor Ref: https://logitech.github.io/mxink/OpenXR.html
2024-08-08 11:09:29 +01:00
Giganzo
36c9d31a9e Fix huge tscn icon in FileSystem split mode using list view 2024-08-08 11:59:14 +02:00
Rémi Verschelde
d32a10897d
CI: Update Emscripten to 3.1.64
This is the version we're using for 4.3-stable.
2024-08-08 11:17:35 +02:00
Chaosus
dc6f90acd8 Forbid function declaration with a const qualifier in shaders 2024-08-08 11:23:27 +03:00
Rémi Verschelde
03afb92efa
Merge pull request #95194 from Faless/mp/fix_relay_negative_target
[MP] Fix relay protocol routing with negative targets
2024-08-08 10:16:31 +02:00
Rémi Verschelde
32eb97fd2a
Merge pull request #95074 from RandomShaper/d3d12_exit_crash
D3D12: Avoid crash on exit
2024-08-08 10:16:24 +02:00
Rémi Verschelde
1938d170aa
iOS: Fix typo in GodotApplicationDelegate
Fixes #90714.
2024-08-08 10:06:36 +02:00
bruvzg
600e770f39
[Editor] Allow MSDF font rendering for custom fonts, add editor setting to control it. 2024-08-08 10:59:33 +03:00
Rémi Verschelde
9221294653
Merge pull request #95264 from Hilderin/fix-reimport-file-multiple-scenes
Fix reimport file multiple scenes
2024-08-08 07:54:59 +02:00
Raul Santos
262671c644
C#: Expose Transform2D.Determinant() 2024-08-08 06:31:46 +02:00
jsjtxietian
6cf9af2817 Fix error when use relative #include in .gdshader / .gdshaderinc file 2024-08-08 11:59:14 +08:00
Hilderin
b1c111d033 Fix reimport file multiple scenes 2024-08-07 20:22:46 -04:00
Rémi Verschelde
4bef4d9808
Merge pull request #95225 from Hilderin/fix-performance-reimport-file
Fix performance issue reimport file reload scene
2024-08-07 23:47:06 +02:00
Rémi Verschelde
da9f943330
Merge pull request #95134 from Calinou/audio-interactive-transition-editor-expand-columns
Expand columns in the audio interactive transition editor
2024-08-07 23:47:00 +02:00
Rémi Verschelde
d775887c83
Merge pull request #95061 from Geometror/vs-style-improvements1
[VisualShader] Reduce size changes of nodes when connecting/disconnecting
2024-08-07 23:46:50 +02:00
kleonc
6b82c48bc6 Fix leaf Bone2Ds drawing in Polygon2D UV editor 2024-08-07 21:06:00 +02:00
kobewi
8623a75380 Fix usage of add_inspector_plugin() 2024-08-07 14:16:02 +02:00
Rémi Verschelde
33fe10c065
Merge pull request #95245 from KoBeWi/regression_flood
Initialize project name when importing project
2024-08-07 13:49:06 +02:00
kobewi
9a8ba93963 Initialize project name when importing project 2024-08-07 13:22:55 +02:00
Rémi Verschelde
1e8bfdcd4f
Merge pull request #95239 from AThousandShips/skeleton_internal_fix
Make `Skeleton3D` bone simulator an internal child
2024-08-07 12:08:12 +02:00
Rémi Verschelde
7cf8e5ef2b
Merge pull request #95235 from bruvzg/macos_opengl_load
[macOS] Load OpenGL.framework by path to avoid issues with non-Latin executable names.
2024-08-07 12:08:07 +02:00
Rémi Verschelde
17f3d351af
Merge pull request #95233 from Faless/ws/fix_set_no_delay_win
[WS] Fix `set_no_delay` on Windows
2024-08-07 12:08:02 +02:00
Rémi Verschelde
5e7592a342
Merge pull request #95232 from bruvzg/popup_time_up
[PopupMenu] Increase mouse button release timeout and reset it from `post_popup`.
2024-08-07 12:07:57 +02:00
Rémi Verschelde
031b71f5bc
Merge pull request #95103 from jamie-pate/fix_89119
Fix LightmapGI causes crash when using --headless
2024-08-07 12:07:53 +02:00
Rémi Verschelde
1260bfb39d
Merge pull request #95069 from Calinou/tilemap-point-to-tilemaplayer-conversion
Document converting a TileMap node to TileMapLayer using the editor
2024-08-07 12:07:42 +02:00
A Thousand Ships
602a348ab1
Make Skeleton3D bone simulator an internal child 2024-08-07 11:38:16 +02:00
Jamie Pate
f8c99efc3b
Fix LightmapGI causes crash when using --headless
Fixes #89119

Add dummy LightmapInstance and Lightmap resources for headless rendering

Prevents the RenderingServer from crashing when it accesses
lightmap_instance->base_data
2024-08-07 11:38:05 +02:00
Hugo Locurcio
5bc4b49f0b
Document converting a TileMap node to TileMapLayer using the editor 2024-08-07 11:15:29 +02:00
bruvzg
2bd21b588e
[macOS] Load OpenGL.framework by path to avoid issues with non-Latin executable names. 2024-08-07 11:57:27 +03:00
Fabio Alessandrelli
7f610a2c6e [WS] Fix set_no_delay on Windows
Windows socket implementation is, as usual, broken in many ways.

This includes `setsockopt` failing to set `TCP_NODELAY` if the socket is
still in a connecting state.

This also means we need to keep polling the IP resolver until the socket
reaches the CONNECTED state (so it can set the TCP_NODELAY after the
connection is successful).
2024-08-07 09:47:00 +02:00
bruvzg
460b538746
[PopupMenu] Increase mouse button release timeout and reset it from post_popup. 2024-08-07 10:22:12 +03:00
Bastiaan Olij
1371b35b6e Update OpenXR thirdparty library to 1.1.38, changed OpenXR init to stay on 1.0.x 2024-08-07 13:58:05 +10:00