mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
parent
5ca875a7ff
commit
5bbb837635
|
@ -97,6 +97,8 @@ GLFW bundles a number of dependencies in the `deps/` directory.
|
||||||
- [Win32] Bugfix: Context re-creation was not triggered by sRGB hint
|
- [Win32] Bugfix: Context re-creation was not triggered by sRGB hint
|
||||||
- [Win32] Bugfix: Full screen windows were incorrectly sized and placed on some
|
- [Win32] Bugfix: Full screen windows were incorrectly sized and placed on some
|
||||||
systems
|
systems
|
||||||
|
- [Win32] Bugfix: Gamma ramp functions acted on entire desktop instead of the
|
||||||
|
specified monitor
|
||||||
- [X11] Added run-time support for systems lacking the XKB extension
|
- [X11] Added run-time support for systems lacking the XKB extension
|
||||||
- [X11] Made GLX 1.3 the minimum supported version
|
- [X11] Made GLX 1.3 the minimum supported version
|
||||||
- [X11] Replaced `XRRGetScreenResources` with `XRRGetScreenResourcesCurrent`
|
- [X11] Replaced `XRRGetScreenResources` with `XRRGetScreenResourcesCurrent`
|
||||||
|
|
|
@ -290,13 +290,8 @@ void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
|
||||||
{
|
{
|
||||||
HDC dc;
|
HDC dc;
|
||||||
WORD values[768];
|
WORD values[768];
|
||||||
DISPLAY_DEVICEW display;
|
|
||||||
|
|
||||||
ZeroMemory(&display, sizeof(DISPLAY_DEVICEW));
|
dc = CreateDCW(L"DISPLAY", monitor->win32.name, NULL, NULL);
|
||||||
display.cb = sizeof(DISPLAY_DEVICEW);
|
|
||||||
EnumDisplayDevicesW(monitor->win32.name, 0, &display, 0);
|
|
||||||
|
|
||||||
dc = CreateDCW(L"DISPLAY", display.DeviceString, NULL, NULL);
|
|
||||||
GetDeviceGammaRamp(dc, values);
|
GetDeviceGammaRamp(dc, values);
|
||||||
DeleteDC(dc);
|
DeleteDC(dc);
|
||||||
|
|
||||||
|
@ -311,7 +306,6 @@ void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
|
||||||
{
|
{
|
||||||
HDC dc;
|
HDC dc;
|
||||||
WORD values[768];
|
WORD values[768];
|
||||||
DISPLAY_DEVICE display;
|
|
||||||
|
|
||||||
if (ramp->size != 256)
|
if (ramp->size != 256)
|
||||||
{
|
{
|
||||||
|
@ -324,11 +318,7 @@ void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
|
||||||
memcpy(values + 256, ramp->green, 256 * sizeof(unsigned short));
|
memcpy(values + 256, ramp->green, 256 * sizeof(unsigned short));
|
||||||
memcpy(values + 512, ramp->blue, 256 * sizeof(unsigned short));
|
memcpy(values + 512, ramp->blue, 256 * sizeof(unsigned short));
|
||||||
|
|
||||||
ZeroMemory(&display, sizeof(DISPLAY_DEVICEW));
|
dc = CreateDCW(L"DISPLAY", monitor->win32.name, NULL, NULL);
|
||||||
display.cb = sizeof(DISPLAY_DEVICEW);
|
|
||||||
EnumDisplayDevicesW(monitor->win32.name, 0, &display, 0);
|
|
||||||
|
|
||||||
dc = CreateDCW(L"DISPLAY", display.DeviceString, NULL, NULL);
|
|
||||||
SetDeviceGammaRamp(dc, values);
|
SetDeviceGammaRamp(dc, values);
|
||||||
DeleteDC(dc);
|
DeleteDC(dc);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user