void mouseWaitButtonRelease() { while (1) { SDL_PollEvent(&events); if (events.type == SDL_MOUSEBUTTONUP) break; } }