Commit 6930af33 authored by Florian Blasius's avatar Florian Blasius 🤘

reset redox syscall to 0.1

parent 43e5a265
Pipeline #8495 passed with stage
in 5 minutes and 32 seconds
......@@ -24,7 +24,7 @@ libc = { version = "0.2", optional = true }
raw-window-handle = { version = "0.3", optional = true }
[target.'cfg(target_os="redox")'.dependencies]
redox_syscall = { version = "0.2", optional = true }
redox_syscall = { version = "0.1", optional = true }
[features]
default = ["sdl2", "sdl2-sys", "libc", "raw-window-handle", "redox_syscall"]
......
......@@ -143,7 +143,6 @@ impl Window {
offset: 0,
size: (w * h * 4) as usize,
flags: syscall::PROT_READ | syscall::PROT_WRITE,
address: 0
},
)
} {
......@@ -256,7 +255,7 @@ impl Window {
pub fn set_size(&mut self, width: u32, height: u32) {
//TODO: Improve safety and reliability
unsafe {
syscall::funmap(self.data.as_ptr() as usize, self.data.len())
syscall::funmap(self.data.as_ptr() as usize)
.expect("orbclient: failed to unmap memory in resize");
}
let _ = self
......@@ -270,7 +269,6 @@ impl Window {
offset: 0,
size: (self.w * self.h * 4) as usize,
flags: syscall::PROT_READ | syscall::PROT_WRITE,
address: 0
},
)
.expect("orbclient: failed to map memory in resize");
......@@ -348,7 +346,7 @@ impl Window {
impl Drop for Window {
fn drop(&mut self) {
let _ = unsafe { syscall::funmap(self.data.as_ptr() as usize, self.data.len()) };
let _ = unsafe { syscall::funmap(self.data.as_ptr() as usize) };
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment