Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Call `OleInitialize` to fix `DirectWrite` in `TestPlatform` on windows (#12289)
Jakob Hellermanne54455bcad35
diff --git a/crates/gpui/src/platform/test/platform.rs b/crates/gpui/src/platform/test/platform.rsindex 16898d46361..10c90d8c943 100644--- a/crates/gpui/src/platform/test/platform.rs+++ b/crates/gpui/src/platform/test/platform.rs@@ -38,6 +38,12 @@ pub(crate) struct TestPrompts {impl TestPlatform {pub fn new(executor: BackgroundExecutor, foreground_executor: ForegroundExecutor) -> Rc<Self> {+ #[cfg(target_os = "windows")]+ unsafe {+ windows::Win32::System::Ole::OleInitialize(None)+ .expect("unable to initialize Windows OLE");+ }+Rc::new_cyclic(|weak| TestPlatform {background_executor: executor,foreground_executor,