Skip to content

Commit

Permalink
Add comment for duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
MolotovCherry committed Dec 5, 2023
1 parent 71ce596 commit 334470c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virtual-display-driver/src/ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ fn has_duplicates(monitors: &[Monitor]) -> bool {
/// Only adds/detaches, if required in order to update monitor state in the OS.
/// e.g. only a name update would not detach/arrive a monitor
fn notify(monitors: Vec<Monitor>) {
// Duplicated id's will not cause any issue, however duplicated resolutions/refresh rates are possible
// They should all be unique anyways. So warn + noop if the sender sent incorrect data
if has_duplicates(&monitors) {
warn!(
"notify(): Duplicate data was detected; nothing was changed; please fix your program"
Expand Down

0 comments on commit 334470c

Please sign in to comment.