forked from Kolyah35/minecraft-pe-0.6.1
12 lines
348 B
C++
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;
|
|
} |