Skip to content

Commit

Permalink
add: enables same machine client test
Browse files Browse the repository at this point in the history
  • Loading branch information
luftaquila committed May 16, 2024
1 parent 58943b7 commit ab742f5
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,20 @@ impl Client {

let cid = load_or_generate_cid()?;

let mut displays: Vec<Display> = DisplayInfo::all()
.expect("[ERR] failed to get system displays")
.into_iter()
.map(|x| Display::from(x, cid, display_scale))
.collect();

for disp in displays.iter_mut() {
disp.id += 1;
}

Ok(Client {
tcp: TcpStream::connect(server)?,
cid,
displays: DisplayInfo::all()
.expect("[ERR] failed to get system displays")
.into_iter()
.map(|x| Display::from(x, cid, display_scale))
.collect(),
displays,
})
}

Expand Down

0 comments on commit ab742f5

Please sign in to comment.