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

2023-06-27 Thread Guillermo Martínez Jiménez via fpc-pascal
El Sun, 25 Jun 2023 13:42:00 -0300 Rafael Picanço via fpc-pascal escribió: > Thanks Guilhermo, You welcome. :) > > Just to clarify, I do have a limited number of events. Lets say, 2 > events. So, using the SDL_RegisterEvents function, is it possible to > define these two new events as normal co

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

2023-06-25 Thread Rafael Picanço via fpc-pascal
Thanks Guilhermo, Just to clarify, I do have a limited number of events. Lets say, 2 events. So, using the SDL_RegisterEvents function, is it possible to define these two new events as normal constants so they will be known at compile time and will make Free Pascal case statements happy? Best, R

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

2023-06-25 Thread Guillermo Martínez Jiménez via fpc-pascal
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. > > The SDL_Regi

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

2023-06-21 Thread Rafael Picanço via fpc-pascal
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/