fixed GLViewImpl::getMonitorSize() for desktop platforms (#18141)

This commit is contained in:
Dmitry 2017-08-22 13:06:53 +07:00 committed by minggo
parent b274322961
commit 6e013b5a8a
1 changed files with 3 additions and 0 deletions

View File

@ -546,6 +546,9 @@ Size GLViewImpl::getMonitorSize() const {
GLFWwindow* window = this->getWindow();
monitor = glfwGetWindowMonitor(window);
}
if (nullptr == monitor) {
monitor = glfwGetPrimaryMonitor();
}
if (nullptr != monitor) {
const GLFWvidmode* videoMode = glfwGetVideoMode(monitor);
Size size = Size(videoMode->width, videoMode->height);