79132542

Date: 2024-10-28 08:24:16
Score: 1
Natty:
Report link

With SDL3:

_Bool event_watch(void *userdata, SDL_Event *event) {
    if (event->type == SDL_EVENT_WINDOW_PIXEL_SIZE_CHANGED) {
        do_something();
    }
    return true;
}

int main() {

    SDL_AddEventWatch(event_watch, NULL);

    ...
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jo Mager