mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-02 23:00:05 -04:00
@@ -528,9 +528,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
|
||||||
#[unsafe(link_section = ".CRT$XCU")]
|
#[unsafe(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