Move GetMonitorPhysicalWidth from rcore to submodule
This commit is contained in:
parent
ed5a68e6fb
commit
c89d178e8d
18
src/rcore.c
18
src/rcore.c
|
|
@ -410,24 +410,6 @@ int GetRenderHeight(void)
|
||||||
return CORE.Window.render.height;
|
return CORE.Window.render.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get selected monitor physical width in millimetres
|
|
||||||
int GetMonitorPhysicalWidth(int monitor)
|
|
||||||
{
|
|
||||||
#if defined(PLATFORM_DESKTOP)
|
|
||||||
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");
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Enable waiting for events on EndDrawing(), no automatic event polling
|
// Enable waiting for events on EndDrawing(), no automatic event polling
|
||||||
void EnableEventWaiting(void)
|
void EnableEventWaiting(void)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1633,3 +1633,10 @@ const char *GetGamepadName(int gamepad)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get selected monitor physical width in millimetres
|
||||||
|
int GetMonitorPhysicalWidth(int monitor)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1507,3 +1507,20 @@ const char *GetGamepadName(int gamepad)
|
||||||
|
|
||||||
return name;
|
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;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -955,3 +955,10 @@ const char *GetGamepadName(int gamepad)
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get selected monitor physical width in millimetres
|
||||||
|
int GetMonitorPhysicalWidth(int monitor)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1555,3 +1555,10 @@ const char *GetGamepadName(int gamepad)
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Get selected monitor physical width in millimetres
|
||||||
|
int GetMonitorPhysicalWidth(int monitor)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user