Files
minecraft-pe-0.6.1/src/AppPlatform_glfw.cpp
2026-03-16 23:16:16 +03:00

12 lines
348 B
C++

#include "AppPlatform_glfw.h"
float AppPlatform_glfw::getPixelsPerMillimeter() {
GLFWmonitor* monitor = glfwGetPrimaryMonitor();
int width_mm, height_mm;
glfwGetMonitorPhysicalSize(monitor, &width_mm, &height_mm);
const GLFWvidmode* mode = glfwGetVideoMode(monitor);
return (float)mode->width / (float)width_mm;
}