infinite wisdom, they decided to build with -fno-common as default from now on,
breaking every piece of C code which used to declare common symbols in header
files, as was the convention since the dawn of time. We now have to duplicate
all declarations to an arbitrary source file, and change the header-file ones
to prefix them with extern.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1863 7f0cb862-5218-0410-a997-914c9d46530a
<machine/joystick.h> is a compatibility header that only includes
<sys/joystick.h>, and wasn't added to newer architectures.
This helps the build on netbsd/aarch64.
(cherry picked from commit bcfbede38a)
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1860 7f0cb862-5218-0410-a997-914c9d46530a
<machine/joystick.h> is a compatibility header that only includes
<sys/joystick.h>, and wasn't added to newer architectures.
This helps the build on netbsd/aarch64.
function pipeline, and therefore we must make sure the context created for them
is not a core profile context. Previously if the user requested a core profile
context, this would apply to menu windows too, and they would appear black.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1855 7f0cb862-5218-0410-a997-914c9d46530a
- The correct way to set the O_NONBLOCK flag, is to OR that flag with existing
flags. Previously we were overriding everything else and setting the flags
value to O_NONBLOCK directly. Unlikely to cause a problem because we probably
don't have any other flags in the newly opened file descriptor, but strictly
spaking it was incorrect.
- If ioctl JSIOCGAXES and JSIOCGBUTTONS could fail, as it stands, it would
clobber the value of joy->num_axes/joy->num_buttons. It can't fail, but maybe
in the future who knows. Let's be safe.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1848 7f0cb862-5218-0410-a997-914c9d46530a
don't actually use, by asking cmake to link with X11_X11_LIB instead of the
catch-all X11_LIBRARIES.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1845 7f0cb862-5218-0410-a997-914c9d46530a
The code had the incorrect assumption that button numbers mapped to the wheel
follow after the last "real" button as returned by the GLUT_NUM_MOUSE_BUTTONS
query, which in turn resolves to a call to XGetPointerMapping. In reality the
X server always sends button presses for 4 and 5 when a wheel is turned down/up
respectively, and the rest of the mouse buttons (if any) follow afterwards.
Also XGetPointerMapping doesn't seem to reliably return the number of actual
buttons, and in any case the wheel "buttons" are certainly included in the
count as they can be remapped.
Since we can't know if buttons after 5 are further wheels or regular buttons
this modification only ever invokes the wheel callback for wheel 0.
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1844 7f0cb862-5218-0410-a997-914c9d46530a