mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 22:14:34 +00:00
Fix icon test destroying window from callback
This commit is contained in:
parent
e37dbd8b8d
commit
fb8a31ba3f
@ -97,7 +97,7 @@ static void key_callback(GLFWwindow* window, int key, int scancode, int action,
|
|||||||
switch (key)
|
switch (key)
|
||||||
{
|
{
|
||||||
case GLFW_KEY_ESCAPE:
|
case GLFW_KEY_ESCAPE:
|
||||||
glfwDestroyWindow(window);
|
glfwSetWindowShouldClose(window, GLFW_TRUE);
|
||||||
break;
|
break;
|
||||||
case GLFW_KEY_SPACE:
|
case GLFW_KEY_SPACE:
|
||||||
cur_icon_color = (cur_icon_color + 1) % 5;
|
cur_icon_color = (cur_icon_color + 1) % 5;
|
||||||
|
Loading…
Reference in New Issue
Block a user