Add touchscreen support with onscreen keyboard #1
@@ -132,9 +132,9 @@ pub fn init(framebuffer: Framebuffer, framebuffer_info: FramebufferInfo) {
|
|||||||
}
|
}
|
||||||
if x.is_some() && y.is_some() {
|
if x.is_some() && y.is_some() {
|
||||||
if rotate {
|
if rotate {
|
||||||
tx1.send(ThreadMessage::Touch(y.unwrap(), x.unwrap())).unwrap();
|
tx1.send(ThreadMessage::Touch(y.unwrap(), dimensions[1] - x.unwrap())).unwrap();
|
||||||
} else {
|
} else {
|
||||||
tx1.send(ThreadMessage::Touch(dimensions[0] - x.unwrap(), y.unwrap())).unwrap();
|
tx1.send(ThreadMessage::Touch(x.unwrap(), y.unwrap())).unwrap();
|
||||||
}
|
}
|
||||||
x = None;
|
x = None;
|
||||||
y = None;
|
y = None;
|
||||||
|
|||||||
Reference in New Issue
Block a user