mirror of
https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-03-20 15:03:32 +00:00
the whole game
This commit is contained in:
12
src/AppPlatform_glfw.cpp
Executable file
12
src/AppPlatform_glfw.cpp
Executable file
@@ -0,0 +1,12 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user