I tracked this down to an autowrap feature which detects 'suffixes' on enumerations and removes them (just as it detects prefixes), done by the function autowrap::parse-enum-fields in parse.lisp. It sees the common 'E' at the end of both SDL_TRUE and SDL_FALSE, so considers this a suffix.
This causes sdl2::sdl-true-p to call (autowrap:enum-value 'sdl2-ffi:sdl-bool :true) and receive NIL back (since autowrap only knows about :tru), causing a type error when calling = on it.
This causes the example code to fail if any controllers are plugged in, but you can easily replicate it by calling sdl2::sdl-true-p directly.
No clue what the right thing to do here. Could make sdl2 expect this and look for :TRU instead of :TRUE, or somehow find a way to make autowrap not treat these as suffixes which it strips.
If you look at the macroexpansion of src/autowrap.lisp you'll find this:
Notice the :FALS and :TRU symbols defined there.
I tracked this down to an autowrap feature which detects 'suffixes' on enumerations and removes them (just as it detects prefixes), done by the function autowrap::parse-enum-fields in parse.lisp. It sees the common 'E' at the end of both SDL_TRUE and SDL_FALSE, so considers this a suffix.
This causes sdl2::sdl-true-p to call (autowrap:enum-value 'sdl2-ffi:sdl-bool :true) and receive NIL back (since autowrap only knows about :tru), causing a type error when calling = on it.
This causes the example code to fail if any controllers are plugged in, but you can easily replicate it by calling sdl2::sdl-true-p directly.
No clue what the right thing to do here. Could make sdl2 expect this and look for :TRU instead of :TRUE, or somehow find a way to make autowrap not treat these as suffixes which it strips.