mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Re-used POSITION_* tokens for monitor position.
This commit is contained in:
parent
2cea6e37cf
commit
ac5fee4d20
@ -541,8 +541,8 @@ extern "C" {
|
|||||||
|
|
||||||
#define GLFW_MONITOR_WIDTH_MM 0x00060001
|
#define GLFW_MONITOR_WIDTH_MM 0x00060001
|
||||||
#define GLFW_MONITOR_HEIGHT_MM 0x00060002
|
#define GLFW_MONITOR_HEIGHT_MM 0x00060002
|
||||||
#define GLFW_MONITOR_POS_X 0x00060003
|
/* reuse GLFW_POSITION_X */
|
||||||
#define GLFW_MONITOR_POS_Y 0x00060004
|
/* reuse GLFW_POSITION_Y */
|
||||||
|
|
||||||
#define GLFW_CONNECTED 0x00061000
|
#define GLFW_CONNECTED 0x00061000
|
||||||
#define GLFW_DISCONNECTED 0x00061001
|
#define GLFW_DISCONNECTED 0x00061001
|
||||||
|
@ -323,9 +323,9 @@ GLFWAPI int glfwGetMonitorParam(GLFWmonitor* handle, int param)
|
|||||||
return monitor->widthMM;
|
return monitor->widthMM;
|
||||||
case GLFW_MONITOR_HEIGHT_MM:
|
case GLFW_MONITOR_HEIGHT_MM:
|
||||||
return monitor->heightMM;
|
return monitor->heightMM;
|
||||||
case GLFW_MONITOR_POS_X:
|
case GLFW_POSITION_X:
|
||||||
return monitor->positionX;
|
return monitor->positionX;
|
||||||
case GLFW_MONITOR_POS_Y:
|
case GLFW_POSITION_Y:
|
||||||
return monitor->positionY;
|
return monitor->positionY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,8 +351,8 @@ void monitor_callback(GLFWmonitor* monitor, int event)
|
|||||||
glfwGetTime(),
|
glfwGetTime(),
|
||||||
glfwGetMonitorName(monitor),
|
glfwGetMonitorName(monitor),
|
||||||
mode.width, mode.height,
|
mode.width, mode.height,
|
||||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_X),
|
glfwGetMonitorParam(monitor, GLFW_POSITION_X),
|
||||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_Y),
|
glfwGetMonitorParam(monitor, GLFW_POSITION_Y),
|
||||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_WIDTH_MM),
|
glfwGetMonitorParam(monitor, GLFW_MONITOR_WIDTH_MM),
|
||||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_HEIGHT_MM));
|
glfwGetMonitorParam(monitor, GLFW_MONITOR_HEIGHT_MM));
|
||||||
}
|
}
|
||||||
|
@ -101,8 +101,8 @@ static void list_modes(GLFWmonitor* monitor)
|
|||||||
glfwGetPrimaryMonitor() == monitor ? "primary" : "secondary");
|
glfwGetPrimaryMonitor() == monitor ? "primary" : "secondary");
|
||||||
printf("Current mode: %s\n", format_mode(&mode));
|
printf("Current mode: %s\n", format_mode(&mode));
|
||||||
printf("Virtual position: %i %i\n",
|
printf("Virtual position: %i %i\n",
|
||||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_X),
|
glfwGetMonitorParam(monitor, GLFW_POSITION_X),
|
||||||
glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_Y));
|
glfwGetMonitorParam(monitor, GLFW_POSITION_Y));
|
||||||
|
|
||||||
widthMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_WIDTH_MM);
|
widthMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_WIDTH_MM);
|
||||||
heightMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_HEIGHT_MM);
|
heightMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_HEIGHT_MM);
|
||||||
|
Loading…
Reference in New Issue
Block a user