Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
add missing monitor check
Browse files Browse the repository at this point in the history
  • Loading branch information
mq1n committed Jun 27, 2021
1 parent 505fa9e commit dcfc9f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,13 @@ int main(int, char* argv[])
return EXIT_FAILURE;
}

if (!bHasAvailableMonitor)
{
std::cerr << "Any available display device could not detected!" << std::endl;
std::system("PAUSE");
return EXIT_FAILURE;
}

ReleaseDC(nullptr, hDC);
std::cout << "Resolution check passed!" << std::endl;
}
Expand Down

0 comments on commit dcfc9f0

Please sign in to comment.