SDL_RegisterEvents() now returns 0 if it couldn't allocate any user events.

This commit is contained in:
Sam Lantinga
2024-03-06 09:51:05 -08:00
parent 4d20b82850
commit 860155680d
4 changed files with 5 additions and 12 deletions

View File

@@ -182,7 +182,7 @@ int main(int argc, char *argv[])
{
int status = 0;
SDL_Event event;
intptr_t eventNumber = SDL_RegisterEvents(1);
Uint32 eventNumber = SDL_RegisterEvents(1);
SDL_Thread *thread = SDL_CreateThread(&button_messagebox, "MessageBox", (void *)eventNumber);
while (SDL_WaitEvent(&event)) {