In glutMainLoop, the checking of ExecState, and wether it's equal to
authorJohn Tsiombikas <nuclear@member.fsf.org>
Thu, 25 May 2017 06:34:57 +0000 (06:34 +0000)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Thu, 25 May 2017 06:34:57 +0000 (06:34 +0000)
commitb304f6f9002f17cc263e06641a92f19ffbfaf062
tree4ac21905683bf3a2d8e27373fdbba959229148a0
parentef2a902d5e7c706dad5a0e39fc8863b0e9eb2876
In glutMainLoop, the checking of ExecState, and wether it's equal to
GLUT_EXEC_STATE_RUNNING should not have been at the top of the loop, but rather
right after glutMainLoopEvent returns, after it processes a single event. As it
was, we would be sleeping, waiting for further events even if the user just
called glutLeaveMainLoop (which sets ExecState to GLUT_EXEC_STATE_STOP).

Also fixed a couple cases if inconsistent use of tabs/spaces for indentation
which was causing gcc to emit bogus warnings about misleading indentation
around braceless ifs.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1803 7f0cb862-5218-0410-a997-914c9d46530a
src/fg_joystick.c
src/fg_main.c