mirror of
https://github.com/glfw/glfw.git
synced 2026-08-29 03:04:14 +02:00
Shortened monitor-related tokens.
This commit is contained in:
@@ -339,7 +339,7 @@ static void char_callback(GLFWwindow window, int character)
|
||||
|
||||
void monitor_callback(GLFWmonitor monitor, int event)
|
||||
{
|
||||
if (event == GLFW_MONITOR_CONNECTED)
|
||||
if (event == GLFW_CONNECTED)
|
||||
{
|
||||
GLFWvidmode mode;
|
||||
glfwGetVideoMode(monitor, &mode);
|
||||
@@ -351,8 +351,8 @@ void monitor_callback(GLFWmonitor monitor, int event)
|
||||
mode.width, mode.height,
|
||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_X),
|
||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_Y),
|
||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_PHYSICAL_WIDTH),
|
||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_PHYSICAL_HEIGHT));
|
||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_WIDTH_MM),
|
||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_HEIGHT_MM));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -104,8 +104,8 @@ static void list_modes(GLFWmonitor monitor)
|
||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_X),
|
||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_Y));
|
||||
|
||||
widthMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_PHYSICAL_WIDTH);
|
||||
heightMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_PHYSICAL_HEIGHT);
|
||||
widthMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_WIDTH_MM);
|
||||
heightMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_HEIGHT_MM);
|
||||
dpi = (int) ((float) mode.width * 25.4f / (float) widthMM);
|
||||
printf("Physical size: %i x %i mm (%i dpi)\n", widthMM, heightMM, dpi);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user