Commit Graph

1395 Commits

Author SHA1 Message Date
Yuri Sizov 773b4d7764 Ensure more export errors are reported to users
Also fixes the timing issue when exporting all
presets at the same time, where the error report
would try to appear while the progress dialog
was still visible.
2023-12-06 15:26:07 +01:00
Mikael Klasson 4986d6d317 Fix invalid Python escape sequences 2023-12-06 11:51:41 +09:00
bruvzg b02cf351f3
[DisplayServer] Use screen "usable rect" instead of full rect to calculate initial window rect. 2023-12-04 07:56:33 +02:00
Marius Hanl 40d7320a17 Do not consume (eat) mouse messages with no_focus Window's (Godot PopupMenu)
Window's with the no_focus flag should still process mouse events and not consume them. Otherwise all mouse pressed operations will not work inside Godot's PopupMenu.
This problem is Windows only, all other platforms do process mouse events for PopupMenu's correctly.
2023-11-28 19:43:07 +01:00
Rémi Verschelde fa259a77cd
Codestyle: Fix some comment issues 2023-11-21 15:26:53 +01:00
jsjtxietian a3f44cd67e Check nullptr in `_nvapi_disable_threaded_optimization` to prevent crash
update outdated link
2023-11-20 19:31:14 +08:00
Rémi Verschelde 15b8185c68
Don't use TTR/RTR for ERR/WARN prints
We don't translate those, only editor strings are translated.
2023-11-12 12:00:55 +01:00
bruvzg 173b84127b
[Windows] Add some AMD GPUs to the OpenGL blocklist. 2023-11-09 20:11:04 +02:00
jitspoe 7918e2b6d9 Fix bug where maximized->fullscreen->windowed mode stays maximized. 2023-11-06 02:36:12 -05:00
bruvzg 6bd639f9df
[Windows] Use CCD API to get fractional screen refresh rates. 2023-11-02 13:10:23 +02:00
bruvzg b52826bf55
Add error messages to the native menu and file dialogs callback. 2023-10-14 18:10:39 +03:00
Rémi Verschelde 51f81e1c88
Merge pull request #82957 from bruvzg/fs_case_check
Add method to check if filesystem is case sensitive.
2023-10-13 12:55:35 +02:00
Rémi Verschelde 5a3befd6c9
Merge pull request #82508 from floatingpointer/master
Add XInput device ID for wireless Series 2 Elite controller
2023-10-09 15:32:13 +02:00
bruvzg 97bcd8a631 Add method to check if filesystem is case sensitive. 2023-10-09 11:00:15 +03:00
kobewi 09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +02:00
bruvzg 43e4708dff
[Native File Dialogs] Improve filter list handling, add selected filter to the callback. 2023-10-03 19:26:16 +03:00
Rémi Verschelde 30bc077756
Merge pull request #82364 from bruvzg/angle_lists_and_defaults
[ANGLE] Add fallback control options and defaults.
2023-10-03 17:22:53 +02:00
Rémi Verschelde 31dbbc2c5a
Merge pull request #80952 from bruvzg/nfdlg_refocus
[Native File Dialogs] Refocus last focused window on close.
2023-10-03 17:13:58 +02:00
Rémi Verschelde 530e01b478
Merge pull request #80409 from bruvzg/est_title_size
[DisplayServer] Add method to estimate window title bar size.
2023-10-03 17:12:18 +02:00
Rémi Verschelde 39bf982e65
Merge pull request #79871 from bruvzg/mingw_prefix_fix
[Windows] Try using objcopy and strip with prefix and without prefix.
2023-10-03 17:11:27 +02:00
bruvzg ac3fc2a8a1
[ANGLE] Add fallback control options and defaults.
[macOS] Use ANGLE by default if engine is built with statically linked ANGLE.
[Windows] Add option enable/disable fallback to ANGLE and option force specific GPU to always use ANGLE.
2023-10-03 16:23:43 +03:00
bruvzg 72e2e47059
[DisplayServer] Add method to estimate window title bar size. 2023-10-03 16:13:52 +03:00
floatingpointer 81f9c0345c Update joypad_windows.cpp
Add XInput device for Series 2 Elite controller
2023-09-28 18:24:08 -07:00
A Thousand Ships 517e9f8aef [Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-26 16:44:52 +02:00
Rémi Verschelde 814ab59c37
Windows: Remove `MSVC` define redundant with `_MSC_VER`
Cleanup unused MSVC code in FileAccessUnix.
2023-09-26 11:11:45 +02:00
Aitor Guevara 6263774aec [Windows] Fix not applying NVIDIA profile to new executables
An NVIDIA profile is applied to the current executable to disable
threaded OpenGL optimizations on Windows (see #71472). But because the
application is only added to the profile upon the profile creation,
newer executables won't be added to the profile (e.g. if the profile is
created on first launch of Godot_v4.1-stable_win64.exe, when users
update the editor and launch Godot_v4.2-stable_win64.exe, the profile
will never be applied to this new executable).
This patch fixes that scenario by splitting creating the profile (if it
doesn't exist) and adding the application (if it doesn't have a profile
applied) into two separate steps.
Applications that have been manually added to a different profile aren't
overriden to avoid confusing users who know what they're doing.
2023-09-22 20:51:12 +02:00
Rémi Verschelde cc0a02c75c
Merge pull request #82031 from bruvzg/borderless_fs
[Windows] Use clear color for non exclusive fullscreen border, fix maximize for borderless window switching to exclusive fs.
2023-09-21 14:27:39 +02:00
bruvzg 1887a9df19
[macOS/Windows] Add optional ANGLE backed OpenGL renderer support. Add EGL_ANDROID_blob_cache caching.
Co-authored-by: Riteo <riteo@posteo.net>
2023-09-21 14:21:00 +03:00
bruvzg b826cd5acd [Windows] Use clear color for non exclusive fullscreen border, fix maximize for borderless window switching to exclusive fs. 2023-09-21 11:24:40 +03:00
A Thousand Ships 3565d1bf7e [Drivers,Platform] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-12 20:13:32 +02:00
Rémi Verschelde 8de6405288
UWP: Remove platform port, needs to be redone from scratch for 4.x
The UWP platform port was never ported to the Godot 4.0+ API,
and it's now accumulating bitrot as it doesn't compile, and thus
we no longer propagate platform changes in it.

So we finally remove to acknowledge this state. There's still some
interest in reviving the UWP port eventually, especially as support
for Direct3D 12 will soon be merged, but when that happens it will
be easiest to redo it from scratch.
2023-09-07 15:01:59 +02:00
kobewi 6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
ocean (they/them) bbafe14970 Build system: add option for MSVC incremental linking. 2023-08-29 18:53:45 -04:00
Rémi Verschelde 6584cd88d9
Merge pull request #78963 from bgie/comma_in_filename
Windows: Always double-quote path when launching explorer.exe to browse
2023-08-28 15:01:49 +02:00
Brecht Kuppens 5608b1d411
Windows: Always double-quote path when launching explorer.exe to browse
Code now always double quotes the filename to use as command line
argument when calling explorer.exe. In particular, commas in a filename
would be interpreted by explorer.exe as separators for commands.

Similarly a trim_suffix for "file://" is assumed to be a mistake, this
could potentially be a PREfix that we want to strip, but never a suffix.
Since it didn't seem needed in the end, we removed it.
2023-08-28 12:46:50 +02:00
bruvzg 2e1f48ff6e
[Native File Dialogs] Refocus last focused window on close. 2023-08-24 09:34:58 +03:00
bruvzg f37ace7036 [Windows] Add main executable to the console wrapper dependencies to prevent simultaneous linking. 2023-08-23 09:54:06 +03:00
Rémi Verschelde bc1aef88ee
SCons: Disable misbehaving MSVC incremental linking
Fixes #77968.
2023-08-10 14:04:19 +02:00
Tyler 3cf1e04579 Fix Windows console wrapper and icon being swapped
Fixes #80238.
2023-08-07 12:46:23 -04:00
Rémi Verschelde 048a164083
Merge pull request #79693 from bruvzg/com_ath
[Windows] Initialize COM as apartment-threaded.
2023-08-07 14:48:40 +02:00
bruvzg e26a6c36c8 Fix native popups auto-closing when interacting with non-client area. 2023-08-07 10:01:48 +03:00
Yuri Sizov dc6ea03101
Merge pull request #35555 from Calinou/add-version-project-setting
Add a "version" project setting and use it in new export presets
2023-08-04 21:01:15 +02:00
Haoyu Qiu 097c849395 Fix various typos in classref 2023-08-04 16:29:55 +08:00
Hugo Locurcio ad4480bf2e
Add a "version" project setting and use it in new export presets
This makes it easy to retrieve the project version at runtime
for display purposes, while simplifying the export preset configuration.
You can now leave the version empty unless you need to override it on a per-preset
basis.

Since export presets save the values of default values to the `export_presets.cfg`
file, this change only affects export presets created after this commit was merged.
2023-08-04 10:29:33 +02:00
Yuri Sizov 1610fc2ae7 Merge pull request #78539 from EIREXE/input-info
Add the ability to get per-platform information for joypads
2023-08-03 22:37:45 +02:00
Álex Román Núñez 3aa340d081 Add the ability to get per-platform information for joypads.
This adds the ability for games to obtain platform-specific information about joypads such as their vendor/product ID, their XInput gamepad index or the real name of the device before it gets swapped out by the gamecontrollerdb's name.

This PR also includes a rebased version of #76045, this is because this PR is intended to be mainly to help people implementing Steam Input, as having the gamepad index is essential.
2023-08-02 22:30:30 +02:00
bruvzg b240b5be84 [Windows] Do not force redraw window background on mouse pass-through region change. 2023-08-02 10:40:40 +03:00
Markus Sauermann 8c1ce404d7 Fix crash on Windows when closing `Window`
Send `WINDOW_EVENT_MOUSE_EXIT` when a window is destroyed.

Ensure, that on Windows, the event_callback is still valid during
destroying the `Window`.
2023-08-02 00:17:25 +02:00
Yuri Sizov 0c2399d6ec Merge pull request #63826 from deakcor/dev_clipboard
Add `clipboard_has/get_image` methods to DisplayServer
2023-07-27 15:22:16 +02:00
bruvzg a0c388d4e1 [Windows] Try using objcopy and strip with prefix and without prefix. 2023-07-25 09:52:38 +03:00
Yuri Sizov c8e191b7f4 Merge pull request #79724 from Repiteo/gcc-windows-fixes
Fix gcc builds failing on windows
2023-07-24 19:33:19 +02:00
Yuri Sizov 88c1e0d528 Merge pull request #79350 from kleonc/screen_to_pixel_byte_to_float_conversion_fix
Fix byte to float color conversion in `DisplayServerWindows::screen_get_pixel`
2023-07-21 17:54:21 +02:00
Thaddeus Crews d848c95748
Fix gcc builds failing on windows 2023-07-20 18:01:52 -05:00
bruvzg 4bfb820d32 [Windows] Initialize COM as apartment-threaded. 2023-07-20 12:14:16 +03:00
Yuri Sizov 0c2144da90 Remove excessive include that breaks compilation on Windows 2023-07-18 22:09:48 +02:00
bruvzg d3ca91ad6a [Windows] Implement native file selection dialog support. 2023-07-18 17:23:58 +03:00
Vincent D c13e3a9fb0 add clipboard get image methods for windows and macos
Co-Authored-By: RedworkDE <10944644+RedworkDE@users.noreply.github.com>
Co-Authored-By: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-07-17 23:47:27 +02:00
Hendrik Brucker 7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
kleonc 9d45dd812f Fix byte to float color conversion in DisplayServerWindows::screen_get_pixel 2023-07-12 21:31:02 +02:00
Yuri Sizov 1da09fd477 Merge pull request #79062 from MewPurPur/svg-optimizations
Optimize SVG icons and remove unused Transpose icon
2023-07-12 21:02:53 +02:00
Yuri Sizov ff689003a5 Merge pull request #77993 from bruvzg/key_lbl_from_p
Implement DisplayServer.keyboard_get_label_from_physical method.
2023-07-12 21:02:37 +02:00
Yuri Sizov 2b47f6715e Merge pull request #78437 from bruvzg/set_icon
Add error checks and harmonize behavior of the `set_icon` method.
2023-07-12 15:09:14 +02:00
Yuri Sizov 6960a1d0e8 Merge pull request #78248 from felaugmar/load-svg-adjustable-scale
Added `Image::load_svg_from_(buffer|string)`
2023-07-12 15:09:03 +02:00
Kamil Brzoskowski 3cd865dbe8
Fix formatting of dlopen error message on Windows
And harmonize the format for all platforms.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-07-09 23:39:45 +02:00
Rémi Verschelde 988abb2161
Merge pull request #79016 from bruvzg/fix_win_initial_ne_fs
[Windows] Fix setting initial non-exclusive window mode.
2023-07-08 18:21:04 +02:00
MewPurPur fe194f8db0 Optimize SVG icons and remove unused Transpose icon 2023-07-07 17:58:15 +03:00
Rémi Verschelde 3a3ec4add1
Merge pull request #78263 from bruvzg/fl_all
[Windows] Flash both the window caption and taskbar button on `request_attention`.
2023-07-07 16:02:38 +02:00
Rémi Verschelde 81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde 346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
bruvzg db0109b237 [Windows] Fix setting initial non-exclusive window mode. 2023-07-04 13:09:26 +03:00
bruvzg 9c5a0c6c10
Add error checks and harmonize behavior of the set_icon method. 2023-07-03 13:48:28 +03:00
Felipe Augusto Marques 26eb3db234 Added Image's `load_svg_from_(buffer|string)`
No core dependency to the svg module.
2023-06-23 00:43:43 -03:00
Rémi Verschelde d586096415
Merge pull request #72720 from pkdawson/fix-mouse-capture
DisplayServerWindows: Fix mouse capture when button up message is missed
2023-06-22 18:29:34 +02:00
Rémi Verschelde 90446fe9f3
SCons: Move platform logo/run icon to `export` folder
Follow-up to #75932.
Since these icons are only used by the export plugin, it makes sense to
move them and generate the headers there.

The whole `detect.is_active()` logic seems to be a leftover from before
times, as far back as 1.0-stable it already wasn't used for anything.

So I'm removing it and moving the export icon generation to
`platform_methods`, where it makes more sense.
2023-06-20 13:16:37 +02:00
Rémi Verschelde 356a602186
Merge pull request #74511 from AThousandShips/win_cursor_fix
Fix clearing custom cursor
2023-06-20 00:00:57 +02:00
Michael Alexsander 41a75cfa4f
Allow exporting release Android builds without a debug keystore 2023-06-19 01:00:13 -03:00
bitsawer 3c42496fb0 Fix Clang dev_mode build const string conversion 2023-06-16 14:54:36 +03:00
bruvzg 28db3c7158 [DisplayServer] Add method to check if native window is focused. 2023-06-16 10:27:52 +03:00
bruvzg 49af2582c4 [Windows] Flash both the window caption and taskbar button on `request_attention`. 2023-06-15 11:04:54 +03:00
Álex Román Núñez 938a837056 Disable NVIDIA's threaded optimization on Windows 2023-06-13 11:47:40 +02:00
Rémi Verschelde 9e7349bda3
Merge pull request #78151 from jpcerrone/fix_windowed_move_problems
Fix window resizing problems on Windows
2023-06-13 10:27:14 +02:00
RedworkDE 5c57b3aba4 Fix docs after renaming export option 2023-06-12 23:59:55 +02:00
jpcerrone a80584664c Fix window resizing problems on Windows
Fixes godotengine#76847, Fixes godotengine#74286
Reorders problematic steps from the DisplayServerWindows::window_set_mode function.
These were causing a resize with the dimensions of the previously used mode instead
of the current one.
2023-06-12 15:26:34 -03:00
Rémi Verschelde 26e5a98306
Merge pull request #77770 from jpcerrone/fix_minimize_missing
Fix minimize button missing in non-resizable projects
2023-06-12 11:39:08 +02:00
Dominik 19ce63d875 Added a few additional GUIDs to list of hardcoded IDs in is_xinput_device 2023-06-09 15:02:19 +02:00
Rémi Verschelde 759309ba18
Merge pull request #77977 from zaevi/fix_windows_popup_ime
Fix IME doesn't work under Popup on Windows.
2023-06-09 11:06:02 +02:00
Rémi Verschelde 9e4315bb50
Style: Harmonize header includes in platform ports
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module should be included with relative
paths (relative to the root folder of the modular component, e.g.
`platform/linuxbsd/`), in their own section before Godot's "core" includes.

The `api` and `export` subfolders also need to be handled as self-contained
(and thus use relative paths for their "local" includes) as they are all
compiled for each editor platform, without necessarily having the api/export
matching platform folder in the include path.
E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp`
and those need to use relative includes for it to work.
2023-06-08 15:19:19 +02:00
bruvzg 08e8ff371d
Implement keyboard_get_label_from_physical method. 2023-06-08 10:13:31 +03:00
Zae 1b149b7440 Fix IME doesn't work under Popup on Windows. 2023-06-08 02:40:36 +08:00
MJacred 2c5e2196bd Replace get_rendering_device() call to prevent crashes on OpenGL.
And make OpenGL video adapter info align with Vulkan.
2023-06-06 23:29:36 +02:00
Michael Alexsander 71d8882a02
Enhance icon fallback and their docs for exporters 2023-06-03 19:28:50 -03:00
jpcerrone c819da7fdb Fix minimize button missing in non-resizable projects.
Fixes https://github.com/godotengine/godot/issues/77603.
On Windows, disabling the 'resizable' flag on the project
settings would also remove the minimize button from the window.
2023-06-02 10:31:50 -03:00
Yuri Sizov c670c4334a
Merge pull request #65902 from MJacred/editor/copysysteminfo
Add an editor option to copy system info to clipboard
2023-05-27 20:11:54 +02:00
MJacred 9e5bf3d589 Copy system info to clipboard + Update bug_report.yml
plus minor static-related fixes
* linuxbsd: get_systemd_os_release_info_value() -> static breaks usage if used multiple times
* windows/linuxbsd: get_video_adapter_driver_info() writes info into static
* linuxbsd: get_distribution_name() + get_version() -> write bsd fallback into static variable
* windows/uwp/android: remove unnecessary use of static
2023-05-27 18:21:23 +02:00
Rémi Verschelde 774f4a7261
Merge pull request #73450 from Calinou/windows-vulkan-disable-amd-switchable-graphics
Disable AMD switchable graphics on Windows with Vulkan to fix driver issue
2023-05-24 08:44:46 +02:00
Rémi Verschelde 7ed55c8833
Merge pull request #77258 from RedworkDE/natvis-pdb-embeded
Embed natvis debug views in PDB
2023-05-22 13:49:15 +02:00
RedworkDE efa892b52a Embed natvis debug views in PDB
This means the debugger can load them automatically.
2023-05-20 00:08:35 +02:00
bruvzg 5b9984b5a2
Add `audio/general/text_to_speech` project setting to enable/disable TTS. 2023-05-18 20:16:03 +03:00
bitsawer 68da61e74c Fix for Clang dev_mode Windows build 2023-05-17 19:35:37 +03:00
Rémi Verschelde 265c70a369
Merge pull request #75142 from bruvzg/scr
[DisplayServer] Implement screen_get_image method for LinuxBSD/X11, macOS and Windows.
2023-05-16 10:48:16 +02:00