Merge commit '26c8cc348eacea01237cd64e1a68d0df8141e848'
This commit is contained in:
8
deps/glfw/tests/gamma.c
vendored
8
deps/glfw/tests/gamma.c
vendored
@@ -28,6 +28,7 @@
|
||||
//
|
||||
//========================================================================
|
||||
|
||||
#define GLAD_GL_IMPLEMENTATION
|
||||
#include <glad/gl.h>
|
||||
#define GLFW_INCLUDE_NONE
|
||||
#include <GLFW/glfw3.h>
|
||||
@@ -101,6 +102,7 @@ int main(int argc, char** argv)
|
||||
monitor = glfwGetPrimaryMonitor();
|
||||
|
||||
glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);
|
||||
glfwWindowHint(GLFW_WIN32_KEYBOARD_MENU, GLFW_TRUE);
|
||||
|
||||
window = glfwCreateWindow(800, 400, "Gamma Test", NULL, NULL);
|
||||
if (!window)
|
||||
@@ -111,6 +113,12 @@ int main(int argc, char** argv)
|
||||
|
||||
{
|
||||
const GLFWgammaramp* ramp = glfwGetGammaRamp(monitor);
|
||||
if (!ramp)
|
||||
{
|
||||
glfwTerminate();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
const size_t array_size = ramp->size * sizeof(short);
|
||||
orig_ramp.size = ramp->size;
|
||||
orig_ramp.red = malloc(array_size);
|
||||
|
Reference in New Issue
Block a user