Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
beforeunload: fix callback signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Beuc authored and Daft-Freak committed Aug 19, 2019
1 parent 2ccde99 commit 5b79532
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/video/emscripten/SDL_emscriptenevents.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,14 +652,14 @@ Emscripten_HandleVisibilityChange(int eventType, const EmscriptenVisibilityChang
return 0;
}

static EM_BOOL
Emscripten_HandleBeforeUnload(int eventType, const void* reserved, void *userData)
static const char*
Emscripten_HandleBeforeUnload(int eventType, const void *reserved, void *userData)
{
/* This event will need to be handled synchronously, e.g. using
SDL_AddEventWatch, as the page is being closed *now*. */
/* No need to send a SDL_QUIT, the app won't get control again. */
SDL_SendAppEvent(SDL_APP_TERMINATING);
return 0;
return ""; /* don't trigger confirmation dialog */
}

void
Expand Down

0 comments on commit 5b79532

Please sign in to comment.