Bug in perWindowKeyRepeat

Yann Morvan <[email protected]>
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <[email protected]>
Hello,
in DeviceControl.hs of the GLUT library,
the marshalling of PerWindowKeyRepeat is doing the opposite of what it
should do, the functions should read:

marshalPerWindowKeyRepeat :: PerWindowKeyRepeat -> CInt
marshalPerWindowKeyRepeat PerWindowKeyRepeatOff = 1
marshalPerWindowKeyRepeat PerWindowKeyRepeatOn  = 0

unmarshalPerWindowKeyRepeat :: CInt -> PerWindowKeyRepeat
unmarshalPerWindowKeyRepeat _ = PerWindowKeyRepeatOff
unmarshalPerWindowKeyRepeat 0 = PerWindowKeyRepeatOn

this is because the actual function being called with this parameter is
glutIgnoreKeyRepeat, which disables key repeating if given a non zero
value.

	Yann
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.