touch coords fix?

This commit is contained in:
stjet
2025-02-08 18:25:31 +00:00
parent 130df4168a
commit bcda14399c

View File

@@ -131,7 +131,11 @@ pub fn init(framebuffer: Framebuffer, framebuffer_info: FramebufferInfo) {
y = Some(value); y = Some(value);
} }
if x.is_some() && y.is_some() { if x.is_some() && y.is_some() {
tx1.send(ThreadMessage::Touch(x.unwrap(), y.unwrap())).unwrap(); if rotate {
tx1.send(ThreadMessage::Touch(y.unwrap(), x.unwrap())).unwrap();
} else {
tx1.send(ThreadMessage::Touch(dimensions[0] - x.unwrap(), y.unwrap())).unwrap();
}
x = None; x = None;
y = None; y = None;
} }