diff options
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 4 | ||||
-rw-r--r-- | platform/windows/display_server_windows.h | 4 | ||||
-rw-r--r-- | platform/windows/os_windows.cpp | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 8f27889382..8a0402a7eb 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -2169,6 +2169,10 @@ void DisplayServerWindows::_get_window_style(bool p_main_window, bool p_initiali r_style |= WS_CLIPCHILDREN | WS_CLIPSIBLINGS; r_style_ex |= WS_EX_ACCEPTFILES; + + if (OS::get_singleton()->get_current_rendering_driver_name() == "d3d12") { + r_style_ex |= WS_EX_NOREDIRECTIONBITMAP; + } } void DisplayServerWindows::_update_window_style(WindowID p_window, bool p_repaint) { diff --git a/platform/windows/display_server_windows.h b/platform/windows/display_server_windows.h index 020b0a7636..df8ed3412a 100644 --- a/platform/windows/display_server_windows.h +++ b/platform/windows/display_server_windows.h @@ -358,6 +358,10 @@ typedef enum _SHC_PROCESS_DPI_AWARENESS { SHC_PROCESS_PER_MONITOR_DPI_AWARE = 2, } SHC_PROCESS_DPI_AWARENESS; +#ifndef WS_EX_NOREDIRECTIONBITMAP +#define WS_EX_NOREDIRECTIONBITMAP 0x00200000L +#endif + class DropTargetWindows; class DisplayServerWindows : public DisplayServer { diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp index dbd68e56ec..43625b5726 100644 --- a/platform/windows/os_windows.cpp +++ b/platform/windows/os_windows.cpp @@ -1530,7 +1530,8 @@ DWRITE_FONT_STRETCH OS_Windows::_stretch_to_dw(int p_stretch) const { } Vector<String> OS_Windows::get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale, const String &p_script, int p_weight, int p_stretch, bool p_italic) const { - if (!dwrite2_init) { + // This may be called before TextServerManager has been created, which would cause a crash downstream if we do not check here + if (!dwrite2_init || !TextServerManager::get_singleton()) { return Vector<String>(); } |