Skip to content

Commit 30a69a4

Browse files
committed
update to windows v0.18.0
1 parent 233a1ae commit 30a69a4

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Robert Mikhayelyan <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8-
windows = "0.17.2"
8+
windows = "0.18.0"
99
bindings = { path = "bindings" }
1010
winit = "0.24.0"
1111
raw-window-handle = "0.3.3"

bindings/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
edition = "2018"
55

66
[dependencies]
7-
windows = "0.17.2"
7+
windows = "0.18.0"
88

99
[build-dependencies]
10-
windows = "0.17.2"
10+
windows = "0.18.0"

bindings/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fn main() {
22
windows::build! {
33
Windows::Graphics::SizeInt32,
44
Windows::Win32::System::WinRT::{
5-
CreateDispatcherQueueController, ICompositorDesktopInterop,
5+
CreateDispatcherQueueController, ICompositorDesktopInterop, RoInitialize,
66
},
77
Windows::UI::Colors,
88
Windows::UI::Composition::Desktop::DesktopWindowTarget,

src/main.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ use winit::{
1717
window::WindowBuilder,
1818
};
1919

20-
use bindings::Windows::{Foundation::Numerics::Vector2, UI::Composition::Compositor};
20+
use bindings::Windows::{
21+
Foundation::Numerics::Vector2,
22+
Win32::System::WinRT::{RoInitialize, RO_INIT_SINGLETHREADED},
23+
UI::Composition::Compositor,
24+
};
2125

2226
fn run() -> windows::Result<()> {
23-
windows::initialize_sta()?;
27+
unsafe { RoInitialize(RO_INIT_SINGLETHREADED)? };
2428
let _controller = create_dispatcher_queue_controller_for_current_thread()?;
2529

2630
let event_loop = EventLoop::new();

0 commit comments

Comments
 (0)