Преглед изворни кода

Merge pull request #462 from a3f/develop

InitWindow: return false if no monitor found
pull/463/head
Ray пре 7 година
committed by GitHub
родитељ
комит
2ace360230
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 измењених фајлова са 7 додато и 1 уклоњено
  1. +7
    -1
      src/core.c

+ 7
- 1
src/core.c Прегледај датотеку

@ -1733,7 +1733,13 @@ static bool InitGraphicsDevice(int width, int height)
// NOTE: Getting video modes is not implemented in emscripten GLFW3 version
#if defined(PLATFORM_DESKTOP)
// Find monitor resolution
const GLFWvidmode *mode = glfwGetVideoMode(glfwGetPrimaryMonitor());
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
if (!monitor)
{
TraceLog(LOG_WARNING, "Failed to get monitor");
return false;
}
const GLFWvidmode *mode = glfwGetVideoMode(monitor);
displayWidth = mode->width;
displayHeight = mode->height;

Loading…
Откажи
Сачувај