mirror of https://github.com/axmolengine/axmol.git
fixed GLViewImpl::getMonitorSize() for desktop platforms (#18141)
This commit is contained in:
parent
b274322961
commit
6e013b5a8a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue