mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
committed by
Kirill Chibisov
parent
ab4c6bfc82
commit
7035dd554f
@@ -574,9 +574,11 @@ fn main_thread_id() -> u32 {
|
|||||||
//
|
//
|
||||||
// See: https://doc.rust-lang.org/stable/reference/abi.html#the-link_section-attribute
|
// See: https://doc.rust-lang.org/stable/reference/abi.html#the-link_section-attribute
|
||||||
#[link_section = ".CRT$XCU"]
|
#[link_section = ".CRT$XCU"]
|
||||||
static INIT_MAIN_THREAD_ID: unsafe fn() = {
|
static INIT_MAIN_THREAD_ID: unsafe extern "C" fn() = {
|
||||||
unsafe fn initer() {
|
unsafe extern "C" fn initer() {
|
||||||
unsafe { MAIN_THREAD_ID = GetCurrentThreadId() };
|
unsafe {
|
||||||
|
MAIN_THREAD_ID = GetCurrentThreadId();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
initer
|
initer
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user