[fpc-pascal] SDL2 Event Registration (and case statements)

Rafael Picanço cpicanco42 at gmail.com
Wed Jun 21 13:13:15 CEST 2023


Hi,

The SDL2 documentation recommends you to register constants with:

Uint32 SDL_RegisterEvents(int numevents);
   numevents = the number of events to be allocated.
   Returns the beginning event number, or (Uint32)-1 if there are not
enough user-defined events left.
https://wiki.libsdl.org/SDL2/SDL_RegisterEvents

The SDL_RegisterEvents result is not known at compile time, so one can't
use them as case conditions. So, Is there a workaround for building these
constants at compile time?

Best,
R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20230621/631eb40f/attachment.htm>


More information about the fpc-pascal mailing list