compression support

This commit is contained in:
Vinzenz Schroeter 2024-05-11 21:16:12 +02:00
parent f4c78f9257
commit c7c136ea30
3 changed files with 9 additions and 8 deletions

7
Cargo.lock generated
View file

@ -2151,8 +2151,9 @@ dependencies = [
[[package]]
name = "servicepoint2"
version = "0.1.0"
source = "git+https://github.com/kaesaecracker/servicepoint.git#35ae1f20ce52e36c6fbb94c74d183dda0cc1a0af"
source = "git+https://github.com/kaesaecracker/servicepoint.git#5c61d027496b3d27a7bfea438dc11453e18f566a"
dependencies = [
"flate2",
"log",
"num",
"num-derive",
@ -2271,9 +2272,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.62"
version = "2.0.63"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f660c3bfcefb88c538776b6685a0c472e3128b51e74d48793dc2a488196e8eb"
checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704"
dependencies = [
"proc-macro2",
"quote",

View file

@ -18,4 +18,5 @@ num-traits = "0.2"
font-kit = { version = "0.13.0", features = ["loader-freetype-default", "loader-freetype"], default-features = false }
pathfinder_geometry = "0.5.1"
yeslogic-fontconfig-sys = { version = "5.0", features = ["dlopen"] }
# servicepoint2 = { path = "../servicepoint2" }
servicepoint2 = { git = "https://github.com/kaesaecracker/servicepoint.git" }

View file

@ -90,7 +90,6 @@ fn main() {
event_proxy
.send_event(AppEvents::UdpPacketHandled)
.expect("could not send packet handled event");
std::thread::sleep(Duration::from_millis(1)); // give ui a change to get lock
}
});
@ -139,7 +138,7 @@ fn handle_package(
warn!("ignoring deprecated command {:?}", command);
}
// TODO: how to deduplicate this code in a rusty way?
Command::BitmapLinear(offset, vec) => {
Command::BitmapLinear(offset, vec, _) => {
if !check_bitmap_valid(offset, vec.len()) {
return true;
}
@ -149,7 +148,7 @@ fn handle_package(
display.set(x, y, vec.get(bitmap_index));
}
}
Command::BitmapLinearAnd(offset, vec) => {
Command::BitmapLinearAnd(offset, vec, _) => {
if !check_bitmap_valid(offset, vec.len()) {
return true;
}
@ -160,7 +159,7 @@ fn handle_package(
display.set(x, y, old_value && vec.get(bitmap_index));
}
}
Command::BitmapLinearOr(offset, vec) => {
Command::BitmapLinearOr(offset, vec, _) => {
if !check_bitmap_valid(offset, vec.len()) {
return true;
}
@ -171,7 +170,7 @@ fn handle_package(
display.set(x, y, old_value || vec.get(bitmap_index));
}
}
Command::BitmapLinearXor(offset, vec) => {
Command::BitmapLinearXor(offset, vec, _) => {
if !check_bitmap_valid(offset, vec.len()) {
return true;
}