The gracePeriod variable only decreases in the main loop while it is
looping. But the shouldClose = true causes the main loop to stop
looping. So the gracePeriod only had time to decrement once (to 59),
at which point the while loop here in the close() function gets stuck.
It may be the case that this looping was only necessary for the OpenGL
renderer anyway, which is no longer an issue, so we can simplify now.
The gracePeriod variable only decreases in the main loop while it is looping. But the
shouldClose = true
causes the main loop to stop looping. So the gracePeriod only had time to decrement once (to 59), at which point the while loop here in theclose()
function gets stuck.It may be the case that this looping was only necessary for the OpenGL renderer anyway, which is no longer an issue, so we can simplify now.