2011-10-01 13:42:59 -04:00
|
|
|
//========================================================================
|
2015-06-01 16:55:06 -04:00
|
|
|
// GLFW 3.2 Win32 - www.glfw.org
|
2011-10-01 13:42:59 -04:00
|
|
|
//------------------------------------------------------------------------
|
|
|
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
|
|
|
// Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
|
|
|
|
//
|
|
|
|
// This software is provided 'as-is', without any express or implied
|
|
|
|
// warranty. In no event will the authors be held liable for any damages
|
|
|
|
// arising from the use of this software.
|
|
|
|
//
|
|
|
|
// Permission is granted to anyone to use this software for any purpose,
|
|
|
|
// including commercial applications, and to alter it and redistribute it
|
|
|
|
// freely, subject to the following restrictions:
|
|
|
|
//
|
|
|
|
// 1. The origin of this software must not be misrepresented; you must not
|
|
|
|
// claim that you wrote the original software. If you use this software
|
|
|
|
// in a product, an acknowledgment in the product documentation would
|
|
|
|
// be appreciated but is not required.
|
|
|
|
//
|
|
|
|
// 2. Altered source versions must be plainly marked as such, and must not
|
|
|
|
// be misrepresented as being the original software.
|
|
|
|
//
|
|
|
|
// 3. This notice may not be removed or altered from any source
|
|
|
|
// distribution.
|
|
|
|
//
|
|
|
|
//========================================================================
|
|
|
|
|
|
|
|
#include "internal.h"
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2012-09-12 15:04:24 -04:00
|
|
|
#include <limits.h>
|
|
|
|
#include <malloc.h>
|
2011-10-01 13:42:59 -04:00
|
|
|
|
2012-09-12 14:46:54 -04:00
|
|
|
// These constants are missing on MinGW
|
2011-10-06 17:28:56 -04:00
|
|
|
#ifndef EDS_ROTATEDMODE
|
2012-09-12 14:46:54 -04:00
|
|
|
#define EDS_ROTATEDMODE 0x00000004
|
2011-10-06 17:28:56 -04:00
|
|
|
#endif
|
2012-01-31 17:47:01 -05:00
|
|
|
#ifndef DISPLAY_DEVICE_ACTIVE
|
2012-09-12 14:46:54 -04:00
|
|
|
#define DISPLAY_DEVICE_ACTIVE 0x00000001
|
2012-01-31 17:47:01 -05:00
|
|
|
#endif
|
|
|
|
|
2011-10-01 13:42:59 -04:00
|
|
|
|
2012-09-12 15:04:24 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
////// GLFW internal API //////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
// Change the current video mode
|
2013-02-04 07:22:10 -05:00
|
|
|
//
|
2015-08-23 13:30:04 -04:00
|
|
|
GLFWbool _glfwSetVideoMode(_GLFWmonitor* monitor, const GLFWvidmode* desired)
|
2012-09-12 15:04:24 -04:00
|
|
|
{
|
2013-01-02 11:29:24 -05:00
|
|
|
GLFWvidmode current;
|
|
|
|
const GLFWvidmode* best;
|
2014-03-06 12:30:14 -05:00
|
|
|
DEVMODEW dm;
|
2012-09-12 15:04:24 -04:00
|
|
|
|
2013-04-21 15:28:07 -04:00
|
|
|
best = _glfwChooseVideoMode(monitor, desired);
|
2013-01-02 11:29:24 -05:00
|
|
|
_glfwPlatformGetVideoMode(monitor, ¤t);
|
|
|
|
if (_glfwCompareVideoModes(¤t, best) == 0)
|
2015-08-23 13:30:04 -04:00
|
|
|
return GLFW_TRUE;
|
2012-09-12 15:04:24 -04:00
|
|
|
|
2013-06-09 05:45:51 -04:00
|
|
|
ZeroMemory(&dm, sizeof(dm));
|
2014-03-06 12:30:14 -05:00
|
|
|
dm.dmSize = sizeof(DEVMODEW);
|
2013-05-30 09:52:42 -04:00
|
|
|
dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL |
|
|
|
|
DM_DISPLAYFREQUENCY;
|
|
|
|
dm.dmPelsWidth = best->width;
|
|
|
|
dm.dmPelsHeight = best->height;
|
|
|
|
dm.dmBitsPerPel = best->redBits + best->greenBits + best->blueBits;
|
|
|
|
dm.dmDisplayFrequency = best->refreshRate;
|
2013-01-02 11:29:24 -05:00
|
|
|
|
|
|
|
if (dm.dmBitsPerPel < 15 || dm.dmBitsPerPel >= 24)
|
|
|
|
dm.dmBitsPerPel = 32;
|
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
if (ChangeDisplaySettingsExW(monitor->win32.adapterName,
|
2014-03-06 12:30:14 -05:00
|
|
|
&dm,
|
|
|
|
NULL,
|
|
|
|
CDS_FULLSCREEN,
|
|
|
|
NULL) != DISP_CHANGE_SUCCESSFUL)
|
2012-09-12 15:04:24 -04:00
|
|
|
{
|
2013-01-02 11:29:24 -05:00
|
|
|
_glfwInputError(GLFW_PLATFORM_ERROR, "Win32: Failed to set video mode");
|
2015-08-23 13:30:04 -04:00
|
|
|
return GLFW_FALSE;
|
2012-09-12 15:04:24 -04:00
|
|
|
}
|
2013-01-02 11:29:24 -05:00
|
|
|
|
2015-08-23 13:30:04 -04:00
|
|
|
monitor->win32.modeChanged = GLFW_TRUE;
|
|
|
|
return GLFW_TRUE;
|
2012-09-12 15:04:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// Restore the previously saved (original) video mode
|
2013-02-04 07:22:10 -05:00
|
|
|
//
|
2013-01-02 11:29:24 -05:00
|
|
|
void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
|
2012-09-12 15:04:24 -04:00
|
|
|
{
|
2014-02-13 08:23:16 -05:00
|
|
|
if (monitor->win32.modeChanged)
|
|
|
|
{
|
2014-09-12 11:00:05 -04:00
|
|
|
ChangeDisplaySettingsExW(monitor->win32.adapterName,
|
2014-03-06 12:30:14 -05:00
|
|
|
NULL, NULL, CDS_FULLSCREEN, NULL);
|
2015-08-23 13:30:04 -04:00
|
|
|
monitor->win32.modeChanged = GLFW_FALSE;
|
2014-02-13 08:23:16 -05:00
|
|
|
}
|
2012-09-12 15:04:24 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-10-01 13:42:59 -04:00
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
////// GLFW platform API //////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2012-09-12 13:35:52 -04:00
|
|
|
_GLFWmonitor** _glfwPlatformGetMonitors(int* count)
|
2011-10-01 13:42:59 -04:00
|
|
|
{
|
2015-03-22 19:08:28 -04:00
|
|
|
int found = 0;
|
2012-09-12 13:35:52 -04:00
|
|
|
_GLFWmonitor** monitors = NULL;
|
2014-09-12 11:00:05 -04:00
|
|
|
DWORD adapterIndex, displayIndex;
|
2011-10-01 13:42:59 -04:00
|
|
|
|
2013-06-09 07:07:23 -04:00
|
|
|
*count = 0;
|
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
for (adapterIndex = 0; ; adapterIndex++)
|
2012-09-12 13:35:52 -04:00
|
|
|
{
|
2014-09-12 11:00:05 -04:00
|
|
|
DISPLAY_DEVICEW adapter;
|
2015-10-28 15:40:45 -04:00
|
|
|
int widthMM, heightMM;
|
|
|
|
HDC dc;
|
2011-10-01 13:42:59 -04:00
|
|
|
|
2014-03-06 12:30:14 -05:00
|
|
|
ZeroMemory(&adapter, sizeof(DISPLAY_DEVICEW));
|
|
|
|
adapter.cb = sizeof(DISPLAY_DEVICEW);
|
2011-10-01 13:42:59 -04:00
|
|
|
|
2014-03-06 12:30:14 -05:00
|
|
|
if (!EnumDisplayDevicesW(NULL, adapterIndex, &adapter, 0))
|
2012-09-12 13:35:52 -04:00
|
|
|
break;
|
2011-10-01 13:42:59 -04:00
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
if (!(adapter.StateFlags & DISPLAY_DEVICE_ACTIVE))
|
2012-09-12 13:35:52 -04:00
|
|
|
continue;
|
|
|
|
|
2015-10-28 15:40:45 -04:00
|
|
|
dc = CreateDCW(L"DISPLAY", adapter.DeviceName, NULL, NULL);
|
|
|
|
widthMM = GetDeviceCaps(dc, HORZSIZE);
|
|
|
|
heightMM = GetDeviceCaps(dc, VERTSIZE);
|
|
|
|
DeleteDC(dc);
|
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
for (displayIndex = 0; ; displayIndex++)
|
2012-09-12 16:51:55 -04:00
|
|
|
{
|
2014-09-12 11:00:05 -04:00
|
|
|
DISPLAY_DEVICEW display;
|
2015-03-22 19:08:28 -04:00
|
|
|
_GLFWmonitor* monitor;
|
2014-09-12 11:00:05 -04:00
|
|
|
char* name;
|
2012-09-12 13:35:52 -04:00
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
ZeroMemory(&display, sizeof(DISPLAY_DEVICEW));
|
|
|
|
display.cb = sizeof(DISPLAY_DEVICEW);
|
2012-09-12 13:35:52 -04:00
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
if (!EnumDisplayDevicesW(adapter.DeviceName, displayIndex, &display, 0))
|
|
|
|
break;
|
2012-09-12 13:35:52 -04:00
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
name = _glfwCreateUTF8FromWideString(display.DeviceString);
|
|
|
|
if (!name)
|
|
|
|
{
|
|
|
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
2015-03-10 14:51:14 -04:00
|
|
|
"Win32: Failed to convert string to UTF-8");
|
2014-09-12 11:00:05 -04:00
|
|
|
continue;
|
|
|
|
}
|
2012-09-13 11:46:40 -04:00
|
|
|
|
2015-10-28 15:40:45 -04:00
|
|
|
monitor = _glfwAllocMonitor(name, widthMM, heightMM);
|
2014-09-12 11:00:05 -04:00
|
|
|
free(name);
|
2012-09-12 13:35:52 -04:00
|
|
|
|
2015-09-20 10:25:00 -04:00
|
|
|
if (adapter.StateFlags & DISPLAY_DEVICE_MODESPRUNED)
|
2015-08-23 13:30:04 -04:00
|
|
|
monitor->win32.modesPruned = GLFW_TRUE;
|
2015-09-20 10:25:00 -04:00
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
wcscpy(monitor->win32.adapterName, adapter.DeviceName);
|
|
|
|
wcscpy(monitor->win32.displayName, display.DeviceName);
|
2012-09-12 13:35:52 -04:00
|
|
|
|
2014-10-28 10:35:03 -04:00
|
|
|
WideCharToMultiByte(CP_UTF8, 0,
|
|
|
|
adapter.DeviceName, -1,
|
2015-03-22 19:08:28 -04:00
|
|
|
monitor->win32.publicAdapterName,
|
|
|
|
sizeof(monitor->win32.publicAdapterName),
|
2014-10-28 10:35:03 -04:00
|
|
|
NULL, NULL);
|
|
|
|
|
2014-09-12 11:03:44 -04:00
|
|
|
WideCharToMultiByte(CP_UTF8, 0,
|
|
|
|
display.DeviceName, -1,
|
2015-03-22 19:08:28 -04:00
|
|
|
monitor->win32.publicDisplayName,
|
|
|
|
sizeof(monitor->win32.publicDisplayName),
|
2014-09-12 11:03:44 -04:00
|
|
|
NULL, NULL);
|
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
found++;
|
|
|
|
monitors = realloc(monitors, sizeof(_GLFWmonitor*) * found);
|
|
|
|
monitors[found - 1] = monitor;
|
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
if (adapter.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE &&
|
|
|
|
displayIndex == 0)
|
|
|
|
{
|
2015-03-22 19:08:28 -04:00
|
|
|
_GLFW_SWAP_POINTERS(monitors[0], monitors[found - 1]);
|
2014-09-12 11:00:05 -04:00
|
|
|
}
|
|
|
|
}
|
2013-02-17 13:09:22 -05:00
|
|
|
}
|
|
|
|
|
2012-09-12 13:35:52 -04:00
|
|
|
*count = found;
|
|
|
|
return monitors;
|
2011-10-01 13:42:59 -04:00
|
|
|
}
|
2013-02-20 10:00:53 -05:00
|
|
|
|
2015-08-23 13:30:04 -04:00
|
|
|
GLFWbool _glfwPlatformIsSameMonitor(_GLFWmonitor* first, _GLFWmonitor* second)
|
2013-04-22 08:43:13 -04:00
|
|
|
{
|
2014-09-12 11:00:05 -04:00
|
|
|
return wcscmp(first->win32.displayName, second->win32.displayName) == 0;
|
2013-04-22 08:43:13 -04:00
|
|
|
}
|
|
|
|
|
2013-02-20 10:00:53 -05:00
|
|
|
void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)
|
|
|
|
{
|
2014-03-06 12:30:14 -05:00
|
|
|
DEVMODEW settings;
|
|
|
|
ZeroMemory(&settings, sizeof(DEVMODEW));
|
|
|
|
settings.dmSize = sizeof(DEVMODEW);
|
2013-02-20 10:00:53 -05:00
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
EnumDisplaySettingsExW(monitor->win32.adapterName,
|
2014-03-06 12:30:14 -05:00
|
|
|
ENUM_CURRENT_SETTINGS,
|
|
|
|
&settings,
|
|
|
|
EDS_ROTATEDMODE);
|
2013-02-20 10:00:53 -05:00
|
|
|
|
|
|
|
if (xpos)
|
|
|
|
*xpos = settings.dmPosition.x;
|
|
|
|
if (ypos)
|
|
|
|
*ypos = settings.dmPosition.y;
|
|
|
|
}
|
2011-10-01 13:42:59 -04:00
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count)
|
2012-09-12 15:04:24 -04:00
|
|
|
{
|
2015-03-22 19:08:28 -04:00
|
|
|
int modeIndex = 0, size = 0;
|
2012-09-12 15:04:24 -04:00
|
|
|
GLFWvidmode* result = NULL;
|
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
*count = 0;
|
2012-09-12 15:04:24 -04:00
|
|
|
|
|
|
|
for (;;)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
GLFWvidmode mode;
|
2014-03-06 12:30:14 -05:00
|
|
|
DEVMODEW dm;
|
2012-09-12 15:04:24 -04:00
|
|
|
|
2014-03-06 12:30:14 -05:00
|
|
|
ZeroMemory(&dm, sizeof(DEVMODEW));
|
|
|
|
dm.dmSize = sizeof(DEVMODEW);
|
2012-09-12 15:04:24 -04:00
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
if (!EnumDisplaySettingsW(monitor->win32.adapterName, modeIndex, &dm))
|
2012-09-12 15:04:24 -04:00
|
|
|
break;
|
|
|
|
|
|
|
|
modeIndex++;
|
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
// Skip modes with less than 15 BPP
|
2012-09-12 15:04:24 -04:00
|
|
|
if (dm.dmBitsPerPel < 15)
|
|
|
|
continue;
|
|
|
|
|
2013-05-30 09:52:42 -04:00
|
|
|
mode.width = dm.dmPelsWidth;
|
2012-09-12 15:04:24 -04:00
|
|
|
mode.height = dm.dmPelsHeight;
|
2013-05-30 09:52:42 -04:00
|
|
|
mode.refreshRate = dm.dmDisplayFrequency;
|
2012-09-12 15:04:24 -04:00
|
|
|
_glfwSplitBPP(dm.dmBitsPerPel,
|
2012-09-12 17:03:15 -04:00
|
|
|
&mode.redBits,
|
|
|
|
&mode.greenBits,
|
|
|
|
&mode.blueBits);
|
2012-09-12 15:04:24 -04:00
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
for (i = 0; i < *count; i++)
|
2012-09-12 15:04:24 -04:00
|
|
|
{
|
|
|
|
if (_glfwCompareVideoModes(result + i, &mode) == 0)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
// Skip duplicate modes
|
|
|
|
if (i < *count)
|
2012-09-12 15:04:24 -04:00
|
|
|
continue;
|
|
|
|
|
2015-09-20 10:25:00 -04:00
|
|
|
if (monitor->win32.modesPruned)
|
|
|
|
{
|
|
|
|
// Skip modes not supported by the connected displays
|
|
|
|
if (ChangeDisplaySettingsExW(monitor->win32.adapterName,
|
|
|
|
&dm,
|
|
|
|
NULL,
|
|
|
|
CDS_TEST,
|
|
|
|
NULL) != DISP_CHANGE_SUCCESSFUL)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
if (*count == size)
|
2012-09-12 15:04:24 -04:00
|
|
|
{
|
2015-03-22 19:08:28 -04:00
|
|
|
if (*count)
|
|
|
|
size *= 2;
|
2012-09-12 15:04:24 -04:00
|
|
|
else
|
2015-03-22 19:08:28 -04:00
|
|
|
size = 128;
|
2012-09-12 15:04:24 -04:00
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
result = (GLFWvidmode*) realloc(result, size * sizeof(GLFWvidmode));
|
2012-09-12 15:04:24 -04:00
|
|
|
}
|
|
|
|
|
2015-03-22 19:08:28 -04:00
|
|
|
(*count)++;
|
|
|
|
result[*count - 1] = mode;
|
2012-09-12 15:04:24 -04:00
|
|
|
}
|
|
|
|
|
2015-12-06 08:55:57 -05:00
|
|
|
if (!*count)
|
|
|
|
{
|
|
|
|
// HACK: Report the current mode if no valid modes were found
|
|
|
|
result = calloc(1, sizeof(GLFWvidmode));
|
|
|
|
_glfwPlatformVideoMode(monitor, result);
|
|
|
|
*count = 1;
|
|
|
|
}
|
|
|
|
|
2012-09-12 15:04:24 -04:00
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)
|
|
|
|
{
|
2014-03-06 12:30:14 -05:00
|
|
|
DEVMODEW dm;
|
2012-09-12 15:04:24 -04:00
|
|
|
|
2014-03-06 12:30:14 -05:00
|
|
|
ZeroMemory(&dm, sizeof(DEVMODEW));
|
|
|
|
dm.dmSize = sizeof(DEVMODEW);
|
2012-09-12 15:04:24 -04:00
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
EnumDisplaySettingsW(monitor->win32.adapterName, ENUM_CURRENT_SETTINGS, &dm);
|
2012-09-12 15:04:24 -04:00
|
|
|
|
|
|
|
mode->width = dm.dmPelsWidth;
|
|
|
|
mode->height = dm.dmPelsHeight;
|
2013-05-30 09:52:42 -04:00
|
|
|
mode->refreshRate = dm.dmDisplayFrequency;
|
2012-09-12 15:04:24 -04:00
|
|
|
_glfwSplitBPP(dm.dmBitsPerPel,
|
|
|
|
&mode->redBits,
|
|
|
|
&mode->greenBits,
|
|
|
|
&mode->blueBits);
|
|
|
|
}
|
|
|
|
|
2014-08-18 06:31:48 -04:00
|
|
|
void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
|
|
|
|
{
|
|
|
|
HDC dc;
|
|
|
|
WORD values[768];
|
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
dc = CreateDCW(L"DISPLAY", monitor->win32.adapterName, NULL, NULL);
|
2014-08-18 06:31:48 -04:00
|
|
|
GetDeviceGammaRamp(dc, values);
|
|
|
|
DeleteDC(dc);
|
|
|
|
|
|
|
|
_glfwAllocGammaArrays(ramp, 256);
|
|
|
|
|
|
|
|
memcpy(ramp->red, values + 0, 256 * sizeof(unsigned short));
|
|
|
|
memcpy(ramp->green, values + 256, 256 * sizeof(unsigned short));
|
|
|
|
memcpy(ramp->blue, values + 512, 256 * sizeof(unsigned short));
|
|
|
|
}
|
|
|
|
|
|
|
|
void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
|
|
|
|
{
|
|
|
|
HDC dc;
|
|
|
|
WORD values[768];
|
|
|
|
|
|
|
|
if (ramp->size != 256)
|
|
|
|
{
|
|
|
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
|
|
"Win32: Gamma ramp size must be 256");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
memcpy(values + 0, ramp->red, 256 * sizeof(unsigned short));
|
|
|
|
memcpy(values + 256, ramp->green, 256 * sizeof(unsigned short));
|
|
|
|
memcpy(values + 512, ramp->blue, 256 * sizeof(unsigned short));
|
|
|
|
|
2014-09-12 11:00:05 -04:00
|
|
|
dc = CreateDCW(L"DISPLAY", monitor->win32.adapterName, NULL, NULL);
|
2014-08-18 06:31:48 -04:00
|
|
|
SetDeviceGammaRamp(dc, values);
|
|
|
|
DeleteDC(dc);
|
|
|
|
}
|
|
|
|
|
2014-01-13 14:02:43 -05:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
////// GLFW native API //////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2014-10-28 10:35:03 -04:00
|
|
|
GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* handle)
|
|
|
|
{
|
|
|
|
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
|
|
|
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
|
|
|
return monitor->win32.publicAdapterName;
|
|
|
|
}
|
|
|
|
|
2014-09-12 11:03:44 -04:00
|
|
|
GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* handle)
|
2014-01-13 14:02:43 -05:00
|
|
|
{
|
|
|
|
_GLFWmonitor* monitor = (_GLFWmonitor*) handle;
|
|
|
|
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
2014-10-28 10:35:03 -04:00
|
|
|
return monitor->win32.publicDisplayName;
|
2014-01-13 14:02:43 -05:00
|
|
|
}
|
|
|
|
|