Skip to content

Commit

Permalink
Merge pull request #142 from Code52/skip-invalid-screens
Browse files Browse the repository at this point in the history
handle invalid screens being reported by the OS
  • Loading branch information
hnrkndrssn authored Apr 22, 2017
2 parents d69a237 + fb459d5 commit bcbfb40
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Carnac.Logic/ScreenManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ public IEnumerable<DetailedScreen> GetScreens()
screen.Left = mode.dmPosition.x;
}

// skip this value if it doesn't appear to be a valid screen
if (screen.Width == 0 || screen.Height == 0)
{
continue;
}

screens.Add(screen);
}
}
Expand Down

0 comments on commit bcbfb40

Please sign in to comment.