mirror of
https://github.com/italicsjenga/rust_minifb.git
synced 2024-12-23 11:21:30 +11:00
Call XInitThreads on X11
This allows using minifb on multiple threads under x11 Closes #309
This commit is contained in:
parent
5afc416681
commit
1b58e0e7cc
|
@ -124,6 +124,10 @@ impl DisplayInfo {
|
|||
let lib = xlib::Xlib::open()
|
||||
.map_err(|e| Error::WindowCreate(format!("failed to load Xlib: {:?}", e)))?;
|
||||
|
||||
if (lib.XInitThreads)() == 0 {
|
||||
panic!("failed to init X11 threads");
|
||||
}
|
||||
|
||||
let cursor_lib = xcursor::Xcursor::open()
|
||||
.map_err(|e| Error::WindowCreate(format!("failed to load XCursor: {:?}", e)))?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue