Move GetMonitorPhysicalWidth from rcore to submodule
This commit is contained in:
parent
ed5a68e6fb
commit
c89d178e8d
1 changed files with 38 additions and 18 deletions
|
|
@ -1507,3 +1507,20 @@ const char *GetGamepadName(int gamepad)
|
|||
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
// Get selected monitor physical width in millimetres
|
||||
int GetMonitorPhysicalWidth(int monitor)
|
||||
{
|
||||
int monitorCount;
|
||||
GLFWmonitor **monitors = glfwGetMonitors(&monitorCount);
|
||||
|
||||
if ((monitor >= 0) && (monitor < monitorCount))
|
||||
{
|
||||
int physicalWidth;
|
||||
glfwGetMonitorPhysicalSize(monitors[monitor], &physicalWidth, NULL);
|
||||
return physicalWidth;
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor");
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue