Commit Graph

1548 Commits

Author SHA1 Message Date
bruvzg 15d37ed2a8
[MinGW] Restore executable size check. 2024-05-08 12:43:02 +03:00
Rémi Verschelde 7d03b1de0b
Style: Trim trailing whitespace and ensure newline at EOF
Found by apply the file_format checks again via #91597.
2024-05-08 10:12:46 +02:00
Rémi Verschelde 2885620385
Merge pull request #91361 from RandomShaper/fix_no_focusin
Windows: Fix `WINDOW_EVENT_FOCUS_IN` not delivered in some cases
2024-05-07 13:48:48 +02:00
Rémi Verschelde 86fb866b6a
Merge pull request #85188 from aitorciki/nvdrs-fixes
[Windows] Fix NVIDIA app profile creation
2024-05-07 13:48:40 +02:00
Rémi Verschelde e63252b421
Merge pull request #90705 from AThousandShips/foreach_list
Reduce and prevent unnecessary random-access to `List`
2024-05-07 09:04:44 +02:00
Thaddeus Crews ecebe0b40d
Implement "get_mingw_tool" to fix mingw prefixes
• Replaces "try_cmd" entirely and removes need for "get_mingw_bin_prefix" in isolation
2024-05-06 17:32:53 -05:00
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
Pedro J. Estébanez 12fda2fc13 Windows: Fix WINDOW_EVENT_FOCUS_IN not delivered in some cases 2024-05-03 13:42:12 +02:00
K. S. Ernest (iFire) Lee f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
bruvzg e5205e589f
[StatusIndicator] Add method to get indicator icon screen rect. 2024-05-02 14:39:33 +03:00
Rémi Verschelde 85062e37ef
Merge pull request #89588 from bruvzg/status_ind_menu_direct
[StatusIndicator] Switch API to use Texture2D instead of Image, improve handling on macOS, add method to set native popup menu directly.
2024-05-01 09:54:44 +02:00
Rémi Verschelde 271d7c8db7
Merge pull request #91147 from bruvzg/con_redir_3
[Windows] Improve console IO redirection.
2024-04-29 13:00:41 +02:00
Rémi Verschelde 947f5a8741
Merge pull request #91247 from AThousandShips/callable_fix
Fix unsafe uses of `Callable.is_null()`
2024-04-29 10:10:32 +02:00
Rémi Verschelde dee1231ce6
Merge pull request #91220 from Repiteo/scons/colorize-warn-error
SCons: Colorize warnings/errors during generation
2024-04-29 10:10:16 +02:00
Rémi Verschelde 45c6f18128
Merge pull request #61006 from bruvzg/libbacktrce
[Windows] Enable crash reporter on MinGW builds.
2024-04-29 10:09:22 +02:00
Thaddeus Crews e0e8ce1fc0
SCons: Colorize warnings/errors during generation 2024-04-28 16:24:48 -05:00
A Thousand Ships 31e7ee63f2
Fix unsafe uses of `Callable.is_null()`
`Callable.is_null()` is not equivalent to `!Callable.is_valid()` and
doesn't guarantee the call is valid.
2024-04-27 16:22:57 +02:00
bruvzg 874814794b [Windows] Improve console IO redirection. 2024-04-27 00:40:17 +03:00
Rémi Verschelde fc912defb1
Merge pull request #90326 from fire/vsk-scons-final-4.3
Avoid compiler error with RenderingContextDriverVulkanWindows
2024-04-23 19:11:10 +02:00
bruvzg c1b34672f9
[Windows] Enable crash reporter on MinGW builds, use libbacktrace to generate stack trace from DWARF symbols. 2024-04-22 16:19:37 +03:00
Fredia Huya-Kouadio 764de7fe31 Collapse the gdextension arguments into the `GDExtensionData` struct
This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
2024-04-19 07:56:02 -07:00
Fredia Huya-Kouadio ede88cf59d Fix loading GDExtension dependencies on Android 2024-04-19 07:55:08 -07:00
Rémi Verschelde 7210d6cb43
Merge pull request #90358 from KoBeWi/finding_errors_in_other_apps
Add `OS.get_process_exit_code()` method
2024-04-16 13:30:41 +02:00
kobewi dce4a3e4c2 Add get_process_exit_code() method 2024-04-16 12:46:15 +02:00
Rémi Verschelde c951421c99
Merge pull request #90268 from RandomShaper/wtp_servers
Use WorkerThreadPool for Server threads (enhanced)
2024-04-15 10:12:00 +02:00
Thaddeus Crews 6df57d2d7d
SCons: Fix `silence_msvc` regression 2024-04-13 08:58:29 -05:00
Thaddeus Crews b278cefd1c
SCons: Silence msvc output without hiding errors 2024-04-11 22:21:18 -05:00
Rémi Verschelde e73f40e260
Merge pull request #87117 from DmitriySalnikov/rename_pdb
Add renaming of PDB files to avoid blocking them
2024-04-11 11:02:31 +02:00
Pedro J. Estébanez c28f5901c7 Polish interaction between windowing, input and rendering
- Adapt GL make/release API to the current architecture.
- Fix DisplayServer being locked while dispatching input (prevent deadlocks).
2024-04-10 18:47:42 +02:00
bruvzg bf558adcdd
[.NET] Disable output embedding on macOS, move it to the advanced options on other platforms. 2024-04-09 17:47:39 +03:00
Rémi Verschelde dc91479082
Merge pull request #90382 from RandomShaper/win_focus_fix
Windows: Fix mouse handling regression
2024-04-08 15:54:32 +02:00
Pedro J. Estébanez bdfe76b200 Windows: Fix mouse handling regression 2024-04-08 13:05:01 +02:00
Rémi Verschelde 7d96ec4f9d
Merge pull request #88329 from ManpreetXSingh/key-window-menu
Windows: Add support for enabling Alt+Space menu and fix borderless maximize
2024-04-08 11:20:05 +02:00
Rémi Verschelde 6b4944ee67
Merge pull request #87042 from Mickeon/documentation-EditorExportPlatform-misc
Add miscellaneous documentation to some classes
2024-04-08 11:19:33 +02:00
K. S. Ernest (iFire) Lee 761ee753bf Avoid compiler error with RenderingContextDriverVulkanWindows. 2024-04-06 15:53:10 -07:00
Manpreet Singh 329d04d331 Windows: Add alt+space menu and fix window modes 2024-04-06 16:26:19 +05:30
DmitriySalnikov b73e740786 Add renaming of PDB files to avoid blocking them 2024-04-05 00:14:23 +03:00
Pedro J. Estébanez 9240034d3c Robustify handling of activation & focus on Windows 2024-04-03 15:52:11 +02:00
Rémi Verschelde 7092230df6
Merge pull request #89907 from bruvzg/nat_dlg_ftr_flags
[DisplayServer] Add separate feature flags for different native dialog types.
2024-03-28 10:47:15 +01:00
bruvzg 082b420c0a
Implement `OS.execute_with_pipe` method to run process with redirected stdio.
Implement `pipe://*` path handling for creation of named pipes.
2024-03-27 11:41:16 +02:00
bruvzg dc01658ee9
[DisplayServer] Add separate feature flags for different native dialog types. 2024-03-26 15:18:06 +02:00
bruvzg 399899a095
[NativeMenu] Move files to the `display` subfolder. 2024-03-26 10:18:08 +02:00
Aitor Guevara 159f0af92f [Windows] Fix NVIDIA app profile creation
When adding an executable to the NVIDIA profile created to disable
threaded optimization, wrong values were passed to `launcher` and
`fileInFolder` params, which resulted in 1) the NVIDIA driver not
applying the profile and 2) the app being repeatedly added to the
profile.
This patch fixes the faulty app creation params and deletes the
potentially corrupted profile if found.
2024-03-25 12:43:04 +01:00
Rémi Verschelde f49efbe0e5
Merge pull request #89229 from akien-mga/main-refactor-os-exit-code
Refactor OS exit code to be `EXIT_SUCCESS` by default
2024-03-24 01:15:06 +01:00
A Thousand Ships 79ba22a73f
Use `Vector*` component-wise `min/max/clamp` functions where applicable 2024-03-20 13:47:42 +01:00
bruvzg 0587a1d217
[StatusIndicator] Switch API to use Texture2D instead of Image, improve handling on macOS, add method to set native popup menu directly. 2024-03-20 11:56:07 +02:00
bruvzg ebb19c4198 [NativeMenu] Fix changes lost due to incorrect rebase (menu goes under task bar, dark mode, item text get, docs) and check to ensure help menu is not using native menu on Windows. 2024-03-15 22:46:47 +02:00
bruvzg 016107fba0
[NativeMenu] Fix MinGW build. 2024-03-15 13:59:47 +02:00
Rémi Verschelde c9c17d6ca6
Merge pull request #89511 from bruvzg/win_emb_x
[Windows] Fix exporting as ZIP when console wrapper and/or embedded PCK is enabled.
2024-03-15 11:07:39 +01:00
bruvzg aac31feda6
[Windows] Fix exporting as ZIP when console wrapper and/or embedded PCK is enabled. 2024-03-15 11:41:48 +02:00
bruvzg 3459aaa9d1 Fix NativeMenu layout direction on macOS, add extra check for Windows menu. 2024-03-15 09:48:54 +02:00
Rémi Verschelde 4ca6cd054f
Merge pull request #89273 from bruvzg/win_native_menu
[NativeMenu] Implement native popup menu support on Windows.
2024-03-14 22:34:42 +01:00
Rémi Verschelde 453485aede
Merge pull request #89270 from Repiteo/enforce-typename-in-templates
Enforce template syntax `typename` over `class`
2024-03-14 22:34:37 +01:00
bruvzg ac7583e449
[NativeMenu] Implement native popup menu support on Windows. 2024-03-13 10:51:38 +02:00
Thaddeus Crews 3b3e2374c9
clang-tidy: Enforce `modernize-use-nullptr` 2024-03-12 10:59:53 -05:00
Thaddeus Crews 5a6e3cbcb0
SCons: Remove `run_in_subprocess` dependency 2024-03-11 13:20:09 -05:00
Rémi Verschelde 810f127022
Merge pull request #89365 from Repiteo/scons/run_in_subprocess-to-env.Run
SCons: Convert remaining `run_in_subprocess` to `env.Run`
2024-03-10 21:13:22 +01:00
Thaddeus Crews 8116d70d4b
SCons: Convert remaining `run_in_subprocess` to `env.Run` 2024-03-10 14:01:23 -05:00
bruvzg 620e194727
[Windows] Disable fallback to ANGLE logic when compiled w/o ANGLE support. 2024-03-10 13:18:03 +02:00
Rémi Verschelde 023dcd44c1
Refactor OS exit code to be `EXIT_SUCCESS` by default
- `Main::setup` early exits (failure or `--help`/`--version`) now
  consistently return `EXIT_FAILURE` or `EXIT_SUCCESS` on all platforms,
  instead of 255 on some and a Godot Error code on others.
- `Main::start` now returns the exit code, simplifying the handling of early
  failures.
- `Main::iteration` needs to explicit set the exit code in OS if it errors
  out.
- Web and iOS now properly return `OS::get_exit_code()` instead of 0.
2024-03-08 23:31:24 +01:00
Thaddeus Crews 9903e6779b
Enforce template syntax `typename` over `class` 2024-03-07 22:39:09 -06:00
K. S. Ernest (iFire) Lee 0a47f4ebd2 Avoid scale_with_dpi constexpr compiler error. 2024-03-06 15:15:01 -08:00
Rémi Verschelde 13954fc33e
Merge pull request #87452 from bruvzg/native_menu
Move `global_menu_*` methods to a separate `NativeMenu` class.
2024-03-06 13:16:52 +01:00
398utubzyt 1c10f577cb Windows: Fix `FreeLibrary` not always being called in `dialog_show` 2024-03-05 10:31:32 -08:00
Rémi Verschelde 0eee7345ee
Merge pull request #89159 from Repiteo/suppress-msvc-false-default
SCons: Set `silence_msvc` to false by default
2024-03-05 09:56:15 +01:00
Rémi Verschelde 2862cb19a8
Merge pull request #88957 from 398utubzyt/windows/native-dialogs
Windows: Implement `dialog_show` and `dialog_input_text` for `DisplayServer`
2024-03-05 09:56:00 +01:00
Rémi Verschelde 5d20628c31
Merge pull request #88496 from bruvzg/d3d12_dyn_load
[Windows] Make D3D12 loading dynamic to support pre-Windows 10 versions.
2024-03-05 09:55:41 +01:00
Thaddeus Crews 581315a975
Set `silence_msvc` default to false, amend description 2024-03-04 16:06:19 -06:00
bruvzg c65a667924
Move `global_menu_*` methods to a separate `NativeMenu` class. 2024-03-04 23:41:41 +02:00
398utubzyt 99500611b2 Windows: Implement `DisplayServer::dialog_show` and `DisplayServer::dialog_input_text` 2024-03-04 12:53:22 -08:00
Rémi Verschelde 3655973e0e
Merge pull request #87154 from Repiteo/scons/cl-quiet
SCons: Silence redundant MSVC output
2024-03-04 13:33:01 +01:00
Rémi Verschelde 6d9a529c87
Merge pull request #88970 from KoBeWi/ImageCursor2D
Improve `cursor_set_custom_image()` method
2024-02-29 13:54:53 +01:00
kobewi 3aeb4a5542 Improve cursor_set_custom_image() method 2024-02-28 20:32:25 +01:00
Rémi Verschelde 3a08c646ee
Pre-commit: Update to clang-format 17.0.6 and black 24.2.0 2024-02-28 14:25:35 +01:00
bruvzg a0084803b4
[macOS/Windows] Fix application indicator destruction. 2024-02-27 22:19:47 +02:00
bruvzg e939341a0b
[Windows] Set application user model ID to prevent editor / running project and different versions of editor taskbar icon stacking. 2024-02-23 13:16:58 +02:00
bruvzg f4ca6a856a
[Windows] Make D3D12 loading dynamic to support pre Windows 10 versions. 2024-02-19 15:08:04 +02:00
Rémi Verschelde 033821c595
Merge pull request #88245 from shana/simplify-mono-support-detection
C#: Let platforms signal if they support the mono module or not
2024-02-19 00:08:07 +01:00
Rémi Verschelde b2fa20922f
Merge pull request #88405 from bruvzg/fix_non_bgra_dib
[Windows] Fix reading non-BGRA8 DIBs from clipboard.
2024-02-17 00:27:23 +01:00
Rémi Verschelde 59643bdb86
Merge pull request #88325 from akien-mga/texture-formats
Export: Unify settings for PC texture formats, removed obsoleted ETC feature
2024-02-17 00:23:45 +01:00
bruvzg 9777a0132e [Windows] Fix reading non-BGRA8 DIBs from clipboard. 2024-02-16 17:10:16 +02:00
Rémi Verschelde 31ab2ca028
Merge pull request #86093 from bruvzg/d3d12_export
[D3D12] Automatically copy runtime DLLs during export.
2024-02-15 17:35:32 +01:00
Rémi Verschelde ef5d6ccfb7
Merge pull request #86966 from Muller-Castro/value2ref-core
Add const lvalue ref to `core/*` container parameters
2024-02-15 15:44:43 +01:00
Rémi Verschelde 83215bd58a
Merge pull request #85322 from Repiteo/scons-Environment-to-SConsEnvironment
SCons: Change `Environment` type hints to `SConsEnvironment`
2024-02-15 15:44:33 +01:00
Rémi Verschelde 92e9bcb633
Merge pull request #80548 from garychia/keyboard_focus
Ensure the active window gains the keyboard focus
2024-02-15 15:44:16 +01:00
Rémi Verschelde a10b4bdb81
Export: Unify settings for PC texture formats
S3TC and BPTC should always be used together, and likewise for ETC2 and ASTC.
2024-02-14 17:16:43 +01:00
Rémi Verschelde e457f41f9b
Remove code relative to obsoleted ETC texture format
Co-authored-by: BlueCube3310 <53150244+BlueCube3310@users.noreply.github.com>
2024-02-14 17:16:41 +01:00
Thaddeus Crews 633dcf6dfd
SCons: "Environment" to "SConsEnvironment" 2024-02-14 09:26:47 -06:00
Muller-Castro a8bc9f3e78 Add const lvalue ref to core/* container parameters 2024-02-14 11:20:36 -03:00
Andreia Gaita 21e524a798 C#: Let platforms signal if they support it or not
Instead of hardcoding platform names that support C#, let platforms
set a flag indicating if they support it. All public platforms
except web already support it, and it's a pain to maintain a patch
for this list just to add additional names of proprietary console
platforms.

This makes adding new platforms or variants or existing platforms
much easier, as the platform can signal what it supports/doesn't
support directly, and we can avoid harcoding platform names.
2024-02-13 22:48:43 +01:00
bruvzg ee53ae28df
Add method to get "base" system UI color (macOS/Windows) and system theme change callback. 2024-02-13 18:38:53 +02:00
Rémi Verschelde c8b5290119
Merge pull request #87013 from bruvzg/intel_angle_with_ids
[Windows] Add support for hex vendor/device IDs in the Angle blocklist. Add Intel Gen5/Gen6/Gen7 GPUs to Angle blocklist.
2024-02-13 17:23:41 +01:00
Rémi Verschelde 7069b3d351
Merge pull request #80211 from bruvzg/status_ind
Implement support for application status indicators (tray icons).
2024-02-13 17:22:55 +01:00
Rémi Verschelde 00403671e4
Merge pull request #79875 from bruvzg/mingw_force_sep_ds
[MinGW] Force separate debug symbols if executable size is larger than 1.9 GB.
2024-02-13 17:22:46 +01:00
bruvzg 8da36031e4
Implement support for application status indicators (tray icons). 2024-02-13 15:59:35 +02:00
Dario 73eff10c76 Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver. 2024-02-12 10:02:18 -03:00
Faycal ElOuariachi c1ec0360e9 Fix the fetching of images in CF_DIB format in DisplayServerWindows::clipboard_get_image
Fix the fetching of images from windows clipboard, if they're in CF_DIB format (e. g. by taking screenshots).

Image::create_from_data was used with an instance of Image, but it's a static function, returning a new instance.
2024-02-12 13:14:11 +01:00
Rémi Verschelde 74b03edf1e
Merge pull request #82800 from Sauermann/fix-screen-mousemotion
Add screen-related attributes to mouse input events
2024-02-09 18:08:58 +01:00
Rémi Verschelde 11964fb569
Merge pull request #87464 from bruvzg/pck_section
[Linux] Add support for PCK embedding section with non GNU-ld linkers.
2024-02-08 10:53:36 +01:00
Rémi Verschelde 4f478a55cc
Merge pull request #86843 from RandomShaper/fix_null_ptr
Avoid several null-dereferences of ApiContextRD
2024-02-07 10:58:01 +01:00