1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #105430 from bruvzg/fix_llvm20_mingw_crash

Fix crash in release build with llvm-mingw.
This commit is contained in:
Thaddeus Crews
2025-04-16 10:45:16 -05:00
2 changed files with 7 additions and 5 deletions

View File

@@ -405,7 +405,7 @@ def configure_msvc(env: "SConsEnvironment"):
if env["accesskit"]: if env["accesskit"]:
if int(env["target_win_version"], 16) < 0x0602: if int(env["target_win_version"], 16) < 0x0602:
print_info("AcceeKit enabled, targeted Windows version changed to Windows 8 (0x602).") print_info("AccessKit enabled, targeted Windows version changed to Windows 8 (0x602).")
env["target_win_version"] = "0x0602" # Accessibility API require Windows 8+ env["target_win_version"] = "0x0602" # Accessibility API require Windows 8+
env.AppendUnique( env.AppendUnique(
@@ -771,7 +771,7 @@ def configure_mingw(env: "SConsEnvironment"):
if env["accesskit"]: if env["accesskit"]:
if int(env["target_win_version"], 16) < 0x0602: if int(env["target_win_version"], 16) < 0x0602:
print_info("AcceeKit enabled, targeted Windows version changed to Windows 8 (0x602).") print_info("AccessKit enabled, targeted Windows version changed to Windows 8 (0x602).")
env["target_win_version"] = "0x0602" # Accessibility API require Windows 8+ env["target_win_version"] = "0x0602" # Accessibility API require Windows 8+
if not env["use_llvm"]: if not env["use_llvm"]:

View File

@@ -2790,7 +2790,7 @@ int DisplayServerWindows::accessibility_should_increase_contrast() const {
} }
int DisplayServerWindows::accessibility_should_reduce_animation() const { int DisplayServerWindows::accessibility_should_reduce_animation() const {
bool anim_enabled = false; BOOL anim_enabled = false; // Note: this should be BOOL (WinAPI), not bool (C++), since SystemParametersInfoA expect variable with specific size.
if (!SystemParametersInfoA(SPI_GETCLIENTAREAANIMATION, 0, &anim_enabled, 0)) { if (!SystemParametersInfoA(SPI_GETCLIENTAREAANIMATION, 0, &anim_enabled, 0)) {
return -1; return -1;
} }
@@ -2798,7 +2798,7 @@ int DisplayServerWindows::accessibility_should_reduce_animation() const {
} }
int DisplayServerWindows::accessibility_should_reduce_transparency() const { int DisplayServerWindows::accessibility_should_reduce_transparency() const {
bool tr_enabled = false; BOOL tr_enabled = false; // Note: this should be BOOL (WinAPI), not bool (C++), since SystemParametersInfoA expect variable with specific size.
if (!SystemParametersInfoA(SPI_GETDISABLEOVERLAPPEDCONTENT, 0, &tr_enabled, 0)) { if (!SystemParametersInfoA(SPI_GETDISABLEOVERLAPPEDCONTENT, 0, &tr_enabled, 0)) {
return -1; return -1;
} }
@@ -2806,7 +2806,7 @@ int DisplayServerWindows::accessibility_should_reduce_transparency() const {
} }
int DisplayServerWindows::accessibility_screen_reader_active() const { int DisplayServerWindows::accessibility_screen_reader_active() const {
bool sr_enabled = false; BOOL sr_enabled = false; // Note: this should be BOOL (WinAPI), not bool (C++), since SystemParametersInfoA expect variable with specific size.
if (SystemParametersInfoA(SPI_GETSCREENREADER, 0, &sr_enabled, 0) && sr_enabled) { if (SystemParametersInfoA(SPI_GETSCREENREADER, 0, &sr_enabled, 0) && sr_enabled) {
return true; return true;
} }
@@ -7208,6 +7208,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
windows[MAIN_WINDOW_ID].initialized = true; windows[MAIN_WINDOW_ID].initialized = true;
#ifdef ACCESSKIT_ENABLED
if (accessibility_screen_reader_active()) { if (accessibility_screen_reader_active()) {
_THREAD_SAFE_LOCK_ _THREAD_SAFE_LOCK_
uint64_t time_wait = OS::get_singleton()->get_ticks_msec(); uint64_t time_wait = OS::get_singleton()->get_ticks_msec();
@@ -7225,6 +7226,7 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
} }
_THREAD_SAFE_UNLOCK_ _THREAD_SAFE_UNLOCK_
} }
#endif
#if defined(RD_ENABLED) #if defined(RD_ENABLED)
if (rendering_context) { if (rendering_context) {