Renamed glfwGetMonitorString to glfwGetMonitorName.
This commit is contained in:
Родитель
c1bb1d8a6e
Коммит
da31167193
|
@ -458,7 +458,6 @@ extern "C" {
|
|||
#define GLFW_GAMMA_RAMP_SIZE 256
|
||||
|
||||
/* Monitor constants */
|
||||
#define GLFW_MONITOR_NAME 0x00060000
|
||||
#define GLFW_MONITOR_PHYSICAL_WIDTH 0x00060001
|
||||
#define GLFW_MONITOR_PHYSICAL_HEIGHT 0x00060002
|
||||
#define GLFW_MONITOR_SCREEN_POS_X 0x00060003
|
||||
|
@ -532,7 +531,7 @@ GLFWAPI void glfwSetErrorCallback(GLFWerrorfun cbfun);
|
|||
GLFWAPI GLFWmonitor* glfwGetMonitors(int* count);
|
||||
GLFWAPI GLFWmonitor glfwGetPrimaryMonitor(void);
|
||||
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* glfwGetMonitorUserPointer(GLFWmonitor monitor);
|
||||
GLFWAPI void glfwSetMonitorCallback(GLFWmonitorfun cbfun);
|
||||
|
|
|
@ -269,7 +269,7 @@ version of GLFW.</p>
|
|||
<ul>
|
||||
<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>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>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>
|
||||
|
|
|
@ -334,7 +334,7 @@ GLFWAPI int glfwGetMonitorParam(GLFWmonitor handle, int param)
|
|||
// Get monitor string
|
||||
//========================================================================
|
||||
|
||||
GLFWAPI const char* glfwGetMonitorString(GLFWmonitor handle, int param)
|
||||
GLFWAPI const char* glfwGetMonitorName(GLFWmonitor handle)
|
||||
{
|
||||
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
||||
|
||||
|
@ -351,15 +351,7 @@ GLFWAPI const char* glfwGetMonitorString(GLFWmonitor handle, int param)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
switch (param)
|
||||
{
|
||||
case GLFW_MONITOR_NAME:
|
||||
return monitor->name;
|
||||
}
|
||||
|
||||
_glfwSetError(GLFW_INVALID_ENUM,
|
||||
"glfwGetMonitorString: Invalid enum value for 'param' parameter");
|
||||
return NULL;
|
||||
return monitor->name;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ void monitor_callback(GLFWmonitor monitor, int event)
|
|||
printf("%08x at %0.3f: Monitor %s %s\n",
|
||||
counter++,
|
||||
glfwGetTime(),
|
||||
glfwGetMonitorString(monitor, GLFW_MONITOR_NAME),
|
||||
glfwGetMonitorName(monitor),
|
||||
get_monitor_event_name(event));
|
||||
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ static void list_modes(GLFWmonitor monitor)
|
|||
|
||||
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("Virtual position: %i %i\n",
|
||||
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",
|
||||
(unsigned int) i,
|
||||
glfwGetMonitorString(monitor, GLFW_MONITOR_NAME),
|
||||
glfwGetMonitorName(monitor),
|
||||
format_mode(mode));
|
||||
|
||||
window_handle = glfwCreateWindow(mode->width, mode->height,
|
||||
|
|
Загрузка…
Ссылка в новой задаче