mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2025-01-24 02:46:33 +11:00
Merge pull request #655 from mitchmindtree/master
Lock objc to 0.1.7. Fix remaining libc pointer errors with casts. Fix warnings in cursor example.
This commit is contained in:
commit
439d25168e
3 changed files with 11 additions and 11 deletions
14
Cargo.toml
14
Cargo.toml
|
@ -27,23 +27,23 @@ clock_ticks = "0.1.0"
|
||||||
version = "0.1"
|
version = "0.1"
|
||||||
|
|
||||||
[target.i386-apple-ios.dependencies]
|
[target.i386-apple-ios.dependencies]
|
||||||
objc = "0.1"
|
objc = ">=0.1.0, <=0.1.7"
|
||||||
|
|
||||||
[target.x86_64-apple-ios.dependencies]
|
[target.x86_64-apple-ios.dependencies]
|
||||||
objc = "0.1"
|
objc = ">=0.1.0, <=0.1.7"
|
||||||
|
|
||||||
[target.aarch64-apple-ios.dependencies]
|
[target.aarch64-apple-ios.dependencies]
|
||||||
objc = "0.1"
|
objc = ">=0.1.0, <=0.1.7"
|
||||||
|
|
||||||
[target.armv7s-apple-ios.dependencies]
|
[target.armv7s-apple-ios.dependencies]
|
||||||
objc = "0.1"
|
objc = ">=0.1.0, <=0.1.7"
|
||||||
|
|
||||||
[target.armv7-apple-ios.dependencies]
|
[target.armv7-apple-ios.dependencies]
|
||||||
objc = "0.1"
|
objc = ">=0.1.0, <=0.1.7"
|
||||||
|
|
||||||
[target.x86_64-apple-darwin.dependencies]
|
[target.x86_64-apple-darwin.dependencies]
|
||||||
objc = "0.1"
|
objc = ">=0.1.0, <=0.1.7"
|
||||||
cgl = "0"
|
cgl = "0.1"
|
||||||
cocoa = "0.1.4"
|
cocoa = "0.1.4"
|
||||||
core-foundation = "0"
|
core-foundation = "0"
|
||||||
core-graphics = "0"
|
core-graphics = "0"
|
||||||
|
|
|
@ -14,7 +14,7 @@ android_start!(main);
|
||||||
fn main() {
|
fn main() {
|
||||||
let window = glutin::WindowBuilder::new().build().unwrap();
|
let window = glutin::WindowBuilder::new().build().unwrap();
|
||||||
window.set_title("A fantastic window!");
|
window.set_title("A fantastic window!");
|
||||||
unsafe { window.make_current() };
|
unsafe { window.make_current().unwrap() };
|
||||||
|
|
||||||
let context = support::load(&window);
|
let context = support::load(&window);
|
||||||
let cursors = [MouseCursor::Default, MouseCursor::Crosshair, MouseCursor::Hand, MouseCursor::Arrow, MouseCursor::Move, MouseCursor::Text, MouseCursor::Wait, MouseCursor::Help, MouseCursor::Progress, MouseCursor::NotAllowed, MouseCursor::ContextMenu, MouseCursor::NoneCursor, MouseCursor::Cell, MouseCursor::VerticalText, MouseCursor::Alias, MouseCursor::Copy, MouseCursor::NoDrop, MouseCursor::Grab, MouseCursor::Grabbing, MouseCursor::AllScroll, MouseCursor::ZoomIn, MouseCursor::ZoomOut, MouseCursor::EResize, MouseCursor::NResize, MouseCursor::NeResize, MouseCursor::NwResize, MouseCursor::SResize, MouseCursor::SeResize, MouseCursor::SwResize, MouseCursor::WResize, MouseCursor::EwResize, MouseCursor::NsResize, MouseCursor::NeswResize, MouseCursor::NwseResize, MouseCursor::ColResize, MouseCursor::RowResize];
|
let cursors = [MouseCursor::Default, MouseCursor::Crosshair, MouseCursor::Hand, MouseCursor::Arrow, MouseCursor::Move, MouseCursor::Text, MouseCursor::Wait, MouseCursor::Help, MouseCursor::Progress, MouseCursor::NotAllowed, MouseCursor::ContextMenu, MouseCursor::NoneCursor, MouseCursor::Cell, MouseCursor::VerticalText, MouseCursor::Alias, MouseCursor::Copy, MouseCursor::NoDrop, MouseCursor::Grab, MouseCursor::Grabbing, MouseCursor::AllScroll, MouseCursor::ZoomIn, MouseCursor::ZoomOut, MouseCursor::EResize, MouseCursor::NResize, MouseCursor::NeResize, MouseCursor::NwResize, MouseCursor::SResize, MouseCursor::SeResize, MouseCursor::SwResize, MouseCursor::WResize, MouseCursor::EwResize, MouseCursor::NsResize, MouseCursor::NeswResize, MouseCursor::NwseResize, MouseCursor::ColResize, MouseCursor::RowResize];
|
||||||
|
@ -36,6 +36,6 @@ fn main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
context.draw_frame((0.0, 1.0, 0.0, 1.0));
|
||||||
window.swap_buffers();
|
window.swap_buffers().unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -310,7 +310,7 @@ impl Window {
|
||||||
let obj = context.CGLContextObj();
|
let obj = context.CGLContextObj();
|
||||||
|
|
||||||
let mut opacity = 0;
|
let mut opacity = 0;
|
||||||
CGLSetParameter(obj, kCGLCPSurfaceOpacity, &mut opacity);
|
CGLSetParameter(obj as *mut _, kCGLCPSurfaceOpacity, &mut opacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
app.activateIgnoringOtherApps_(YES);
|
app.activateIgnoringOtherApps_(YES);
|
||||||
|
@ -558,7 +558,7 @@ impl Window {
|
||||||
let value = if opengl.vsync { 1 } else { 0 };
|
let value = if opengl.vsync { 1 } else { 0 };
|
||||||
cxt.setValues_forParameter_(&value, NSOpenGLContextParameter::NSOpenGLCPSwapInterval);
|
cxt.setValues_forParameter_(&value, NSOpenGLContextParameter::NSOpenGLCPSwapInterval);
|
||||||
|
|
||||||
CGLEnable(cxt.CGLContextObj(), kCGLCECrashOnRemovedFunctions);
|
CGLEnable(cxt.CGLContextObj() as *mut _, kCGLCECrashOnRemovedFunctions);
|
||||||
|
|
||||||
Ok((cxt, pf))
|
Ok((cxt, pf))
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Reference in a new issue