Skip to content

Commit

Permalink
Don't use option
Browse files Browse the repository at this point in the history
  • Loading branch information
E1int committed Oct 20, 2024
1 parent 8ef30b9 commit 74ae4ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions alvr/client_core/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,10 @@ fn connection_pipeline(
}
}

let stream_protocol = match negotiated_config.wired.is_some_and(|w| w) {
false => settings.connection.stream_protocol,
true => SocketProtocol::Tcp,
let stream_protocol = if negotiated_config.wired {
SocketProtocol::Tcp
} else {
settings.connection.stream_protocol
};

dbg_connection!("connection_pipeline: create StreamSocket");
Expand Down
2 changes: 1 addition & 1 deletion alvr/packets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub struct NegotiatedStreamingConfig {
// This is needed to detect when to use SteamVR hand trackers. This does NOT imply if multimodal
// input is supported
pub use_multimodal_protocol: bool,
pub wired: Option<bool>,
pub wired: bool,
}

#[derive(Serialize, Deserialize)]
Expand Down
2 changes: 1 addition & 1 deletion alvr/server_core/src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ fn connection_pipeline(
0
};

let wired = Some(client_ip.is_loopback());
let wired = client_ip.is_loopback();

dbg_connection!("connection_pipeline: send streaming config");
let stream_config_packet = alvr_packets::encode_stream_config(
Expand Down

0 comments on commit 74ae4ca

Please sign in to comment.