mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Renamed glfwGetMonitorString to glfwGetMonitorName.
This commit is contained in:
parent
c1bb1d8a6e
commit
da31167193
|
@ -458,7 +458,6 @@ extern "C" {
|
||||||
#define GLFW_GAMMA_RAMP_SIZE 256
|
#define GLFW_GAMMA_RAMP_SIZE 256
|
||||||
|
|
||||||
/* Monitor constants */
|
/* Monitor constants */
|
||||||
#define GLFW_MONITOR_NAME 0x00060000
|
|
||||||
#define GLFW_MONITOR_PHYSICAL_WIDTH 0x00060001
|
#define GLFW_MONITOR_PHYSICAL_WIDTH 0x00060001
|
||||||
#define GLFW_MONITOR_PHYSICAL_HEIGHT 0x00060002
|
#define GLFW_MONITOR_PHYSICAL_HEIGHT 0x00060002
|
||||||
#define GLFW_MONITOR_SCREEN_POS_X 0x00060003
|
#define GLFW_MONITOR_SCREEN_POS_X 0x00060003
|
||||||
|
@ -532,7 +531,7 @@ GLFWAPI void glfwSetErrorCallback(GLFWerrorfun cbfun);
|
||||||
GLFWAPI GLFWmonitor* glfwGetMonitors(int* count);
|
GLFWAPI GLFWmonitor* glfwGetMonitors(int* count);
|
||||||
GLFWAPI GLFWmonitor glfwGetPrimaryMonitor(void);
|
GLFWAPI GLFWmonitor glfwGetPrimaryMonitor(void);
|
||||||
GLFWAPI int glfwGetMonitorParam(GLFWmonitor monitor, int param);
|
GLFWAPI int glfwGetMonitorParam(GLFWmonitor monitor, int param);
|
||||||
GLFWAPI const char* glfwGetMonitorString(GLFWmonitor monitor, int param);
|
GLFWAPI const char* glfwGetMonitorName(GLFWmonitor monitor);
|
||||||
GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor monitor, void* pointer);
|
GLFWAPI void glfwSetMonitorUserPointer(GLFWmonitor monitor, void* pointer);
|
||||||
GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor monitor);
|
GLFWAPI void* glfwGetMonitorUserPointer(GLFWmonitor monitor);
|
||||||
GLFWAPI void glfwSetMonitorCallback(GLFWmonitorfun cbfun);
|
GLFWAPI void glfwSetMonitorCallback(GLFWmonitorfun cbfun);
|
||||||
|
|
|
@ -269,7 +269,7 @@ version of GLFW.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Added <code>GLFWmonitor</code> monitor handle type and updated monitor-related functions to take a monitor handle</li>
|
<li>Added <code>GLFWmonitor</code> monitor handle type and updated monitor-related functions to take a monitor handle</li>
|
||||||
<li>Added <code>glfwGetMonitors</code> and <code>glfwGetPrimaryMonitor</code> for enumerating available monitors</li>
|
<li>Added <code>glfwGetMonitors</code> and <code>glfwGetPrimaryMonitor</code> for enumerating available monitors</li>
|
||||||
<li>Added <code>glfwGetMonitorParam</code> and <code>glfwGetMonitorString</code> for retrieving monitor properties</li>
|
<li>Added <code>glfwGetMonitorParam</code> and <code>glfwGetMonitorName</code> for retrieving monitor properties</li>
|
||||||
<li>Added <code>glfwSetMonitorUserPointer</code> and <code>glfwGetMonitorUserPointer</code> for per-monitor user pointers</li>
|
<li>Added <code>glfwSetMonitorUserPointer</code> and <code>glfwGetMonitorUserPointer</code> for per-monitor user pointers</li>
|
||||||
<li>Added <code>glfwSetMonitorCallback</code> and <code>GLFWmonitorfun</code> for notification of changes in the set of available monitors</li>
|
<li>Added <code>glfwSetMonitorCallback</code> and <code>GLFWmonitorfun</code> for notification of changes in the set of available monitors</li>
|
||||||
<li>Added <code>GLFWwindow</code> window handle type and updated window-related functions and callbacks to take a window handle</li>
|
<li>Added <code>GLFWwindow</code> window handle type and updated window-related functions and callbacks to take a window handle</li>
|
||||||
|
|
|
@ -334,7 +334,7 @@ GLFWAPI int glfwGetMonitorParam(GLFWmonitor handle, int param)
|
||||||
// Get monitor string
|
// Get monitor string
|
||||||
//========================================================================
|
//========================================================================
|
||||||
|
|
||||||
GLFWAPI const char* glfwGetMonitorString(GLFWmonitor handle, int param)
|
GLFWAPI const char* glfwGetMonitorName(GLFWmonitor handle)
|
||||||
{
|
{
|
||||||
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
||||||
|
|
||||||
|
@ -351,15 +351,7 @@ GLFWAPI const char* glfwGetMonitorString(GLFWmonitor handle, int param)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (param)
|
|
||||||
{
|
|
||||||
case GLFW_MONITOR_NAME:
|
|
||||||
return monitor->name;
|
return monitor->name;
|
||||||
}
|
|
||||||
|
|
||||||
_glfwSetError(GLFW_INVALID_ENUM,
|
|
||||||
"glfwGetMonitorString: Invalid enum value for 'param' parameter");
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -366,7 +366,7 @@ void monitor_callback(GLFWmonitor monitor, int event)
|
||||||
printf("%08x at %0.3f: Monitor %s %s\n",
|
printf("%08x at %0.3f: Monitor %s %s\n",
|
||||||
counter++,
|
counter++,
|
||||||
glfwGetTime(),
|
glfwGetTime(),
|
||||||
glfwGetMonitorString(monitor, GLFW_MONITOR_NAME),
|
glfwGetMonitorName(monitor),
|
||||||
get_monitor_event_name(event));
|
get_monitor_event_name(event));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ static void list_modes(GLFWmonitor monitor)
|
||||||
|
|
||||||
glfwGetVideoMode(monitor, &mode);
|
glfwGetVideoMode(monitor, &mode);
|
||||||
|
|
||||||
printf("Name: %s\n", glfwGetMonitorString(monitor, GLFW_MONITOR_NAME));
|
printf("Name: %s\n", glfwGetMonitorName(monitor));
|
||||||
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_SCREEN_POS_X),
|
glfwGetMonitorParam(monitor, GLFW_MONITOR_SCREEN_POS_X),
|
||||||
|
@ -140,7 +140,7 @@ static void test_modes(GLFWmonitor monitor)
|
||||||
|
|
||||||
printf("Testing mode %u on monitor %s: %s\n",
|
printf("Testing mode %u on monitor %s: %s\n",
|
||||||
(unsigned int) i,
|
(unsigned int) i,
|
||||||
glfwGetMonitorString(monitor, GLFW_MONITOR_NAME),
|
glfwGetMonitorName(monitor),
|
||||||
format_mode(mode));
|
format_mode(mode));
|
||||||
|
|
||||||
window_handle = glfwCreateWindow(mode->width, mode->height,
|
window_handle = glfwCreateWindow(mode->width, mode->height,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user