Commit graph

807 commits

Author SHA1 Message Date
bruvzg
c8978f58af [Windows, 3.x] Remove cached icon earlier, to prevent double free crash on exit. 2022-05-23 10:33:42 +03:00
Haoyu Qiu
ddb7774099 Try to convert OS::execute() output to Unicode on Windows
(cherry picked from commit a71e808112)
2022-05-16 16:47:16 +02:00
bruvzg
2d3f5855c6 [Windows] Save and re-apply window icon when changing window style.
(cherry picked from commit b268c4b4bc)
2022-05-16 16:42:25 +02:00
Rémi Verschelde
4dfc44ecc3
Merge pull request #60788 from akien-mga/3.x-cherrypicks 2022-05-05 15:54:33 +02:00
mdavisprog
53fb0440d3 Add OS::is_process_running function.
Adds the is_process_running function to the native OS class and exposes it to script.

This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function.

Documentation is updated to reflect new API function.

(cherry picked from commit f3c1232c59)
2022-05-05 15:02:46 +02:00
Rémi Verschelde
3b8818e5c4 Crash handler: Use print_error to include backtrace in logs 2022-05-05 12:13:04 +02:00
bruvzg
0be7de6e11 [3.x] Fix export plugins after embedded PCK loading changes. 2022-05-04 12:56:00 +03:00
bruvzg
bea7c9be5d [3.x] Improve embedded PCK loading and exporting. 2022-04-28 11:11:48 +03:00
Lyuma
f28309aa86 Keep editor at normal priority on windows.
The multithreaded importer often causes system-wide hangs when importing more than 20 files at a time.
Running the editor at normal priority allows other applications on the system to be responsive during long imports.

(cherry picked from commit ee02a7f785)
2022-04-13 11:43:48 +02:00
C.Even
cfe0991b20 Retrieve primary monitor size in fullscreen mode
* Fixes #21674
2022-04-07 18:51:16 +08:00
pkowal
5e5154e5b9 Change godot.ico to uncompressed/fixed size
(cherry picked from commit d469cfb2ab)
2022-03-28 23:43:46 +02:00
ztco224
658877c350 Fix DST Error on Windows
(cherry picked from commit 4802f15231)
2022-03-17 15:49:58 +01:00
Hugo Locurcio
cec7c908ca
Add get_screen_refresh_rate() to OS
This method can be used to get the refresh rate of a given screen.
It is supported on Windows, macOS, Linux, Android and iOS (but not
HTML5).
2022-03-10 22:10:48 +01:00
Hugo Locurcio
7f9e974a8b
Add an OS.get_processor_name() method
This method can be used to get the CPU model name.
It can be used in conjunction with
`VisualServer.get_video_adapter_name()` and
`VisualServer.get_video_adapter_vendor()` for annotating benchmarks
and automatic graphics quality configuration.
2022-02-16 18:39:02 +01:00
NeilKleistGao
ef0ec3fcfd
Add warning for Windows export when rcedit is not configured 2022-02-11 09:50:57 +01:00
Rémi Verschelde
f50c7f7415
Core: Move generated VERSION_HASH to a .cpp file
This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.

(cherry picked from commit 90162851a7)
2022-02-10 13:06:56 +01:00
Rémi Verschelde
fdbcd002f6
Merge pull request #57512 from bruvzg/console_build 2022-02-02 23:06:36 +01:00
Rémi Verschelde
58edf04240
Windows: Fix GCC -fpermissive error with 'pck' section workaround
Follow-up to #57450.

(cherry picked from commit 5a1f42b322)
2022-02-01 12:20:19 +01:00
bruvzg
3095dcef19
[3.x] Backport Windows subsystem build option. 2022-02-01 13:03:15 +02:00
bruvzg
ba2e891ec8
[Windows] Disable console I/O redirection, if it's already redirected to the pipe or file.
(cherry picked from commit 99a1e552ac)
2022-01-31 22:54:24 +01:00
Bartłomiej T. Listwon
423a90043d
Prevent LTCG (MSVC LTO) from removing "pck" section
(cherry picked from commit e4bde938a1)
2022-01-31 22:54:22 +01:00
bruvzg
eb975b7cea
[Export, 3.x] Instead of removing unsupported options, hide it. 2022-01-25 21:18:22 +02:00
Rémi Verschelde
ed869729ae
Merge pull request #56755 from madmiraal/fix-45592-3.x 2022-01-24 10:06:24 +01:00
Rémi Verschelde
1ee44b2366
ImageLoader: Remove references to unsupported svgz extension
I don't see any reference to gzip/svgz supported in the nanosvg library,
and the handful of test gzip compressed svgz files I tried failed loading.

Also cleaning a couple missing includes in platform export code.
2022-01-17 10:52:32 +01:00
Rémi Verschelde
879244c54e
Merge pull request #56015 from bruvzg/phy_code_conv 2022-01-16 11:36:26 +01:00
Marcel Admiraal
949ea2b326 Simplify InputDefault::joy_axis code by using float instead of struct JoyAxis 2022-01-14 15:36:35 +00:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Marcel Admiraal
b7545631de Use mouse event relative motion to calculate mouse speed 2022-01-13 10:29:57 +00:00
Bartłomiej T. Listwon
e1429dd80f
Windows: Simplify QueryPerformanceCounter usage
(cherry picked from commit 5ba38fb208)
2022-01-12 17:32:50 +01:00
Rémi Verschelde
8a192cd0ab
Merge pull request #55987 from bruvzg/wt🤎3 2022-01-10 16:43:56 +01:00
Max Hilbrunner
36af1abbe0 Windows input: fix bracket -> brace for US input 2022-01-07 12:14:21 +01:00
bruvzg
59085d5051
[Windows] Improve console handling and execute.
Always build with the GUI subsystem.
Redirect stdout and stderr output to the parent process console.
Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with non-blocking calls).
Add `open_console` argument to the `execute` to open a new console window (for both blocking and non-blocking calls).
Remove `interface/editor/hide_console_window` editor setting.
Remove `Toggle System Console` menu option.
Remove `set_console_visible` and `is_console_visible` functions.
2021-12-18 10:13:27 +02:00
bruvzg
b4ec1c5817
Backport: Allow for mapping scancodes to current layout
Co-authored-by: Frixuu <kontakt@lukasz.xyz>
2021-12-17 13:04:47 +02:00
Sam Lantinga
9efdac2761
Fixed detecting the Valve Streaming Gamepad
Fixed the GUID, and compare the contents of the GUID, not just the pointers

(cherry picked from commit 8df0baf6f5)
2021-12-17 00:14:50 +01:00
bruvzg
9aef3a93dd
[Windows] Detect new Windows Terminal and disable unsupported set_console_visible code. 2021-12-15 20:00:35 +02:00
bruvzg
38c1706a7d
[Windows] Open a new console window for the editor instances. 2021-12-14 14:38:42 +02:00
kobewi
a58736f129
Fix data directory of unnamed projects
(cherry picked from commit f6d16d55c6)
2021-11-18 13:47:52 +01:00
Rémi Verschelde
2da3f80128
Windows: Use /bigobj only for debug builds, breaks GCC LTO
Building `target=release` and `target=release_debug` builds with MinGW-GCC
errors when linking with LTO.

Since it's only needed for `target=debug` builds anyway (bigger objects), which
we don't build with LTO, this works around the issue.

(cherry picked from commit 64d7df1e5f)
2021-11-18 12:15:05 +01:00
Rémi Verschelde
26e582b170
Windows: Enable /bigobj to increase max size for obj files
Equivalent `-Wa,-mbig-obj` for GCC/Clang.

This started being needed to compile harfbuzz in `target=debug` with MinGW/GCC,
but there doesn't seem to be any drawback to enabling `/bigobj` (aside from
losing support for pre-VS 2005 linkers, which we don't support).

(cherry picked from commit 11d1319afd)
2021-11-15 17:22:47 +01:00
Pedro J. Estébanez
abdf931832 Add off-screen GL context 2021-11-09 12:19:12 +01:00
Pedro J. Estébanez
25f01cb09d Implement get_cache_path() for iOS, and improve it for Android and Windows 2021-11-08 22:33:54 +01:00
Rémi Verschelde
1b65550ec7
clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
Rémi Verschelde
42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Rémi Verschelde
9657559b66
SCons: Set DEBUG_ENABLED and DEV_ENABLED in SConstruct
They're the same for all platforms so they don't need to be repeated in all
platform definitions.

(cherry picked from commit cd21cc683a)
2021-10-15 12:54:16 +02:00
Rémi Verschelde
d01c660954
Merge pull request #52964 from Pineapple/WIN32_LEAN_AND_MEAN 2021-10-05 12:03:52 +02:00
Jordan Schidlowsky
db44406082
revert 0d7409a so additional error information prints in release builds
(cherry picked from commit b78d399f91)
2021-10-05 10:56:53 +02:00
Rémi Verschelde
e292d79fb3
SCons: Add DEV_ENABLED defines for target=debug builds
This will allow adding developer checks which will be fully compiled out in
user builds, unlike `DEBUG_ENABLED` which is included in debug tempates and
the editor builds.

This define is not used yet, but we'll soon add code that uses it, and change
some existing `DEBUG_ENABLED` checks to be performed only in dev builds.

Related to https://github.com/godotengine/godot-proposals/issues/3371.
2021-10-04 11:25:02 +02:00
Bartłomiej T. Listwon
f463e612a1 Add missing WIN32_LEAN_AND_MEAN 2021-09-23 10:36:31 +02:00
bruvzg
131f913747
Improve OS::get_locale() on macOS and Windows, replace "-" with "_" and use system macros instead of bitwise AND. Add locale format info to the documentation.
(cherry picked from commit f797e1c078)
2021-09-21 20:33:11 +02:00
Ricardo Subtil
5167a0281a
Fix shell_open not returning errors on Windows
(cherry picked from commit c4787a8e6d)
2021-09-21 20:33:11 +02:00