Added missing loop cancel for Emscripten in test programs.
This commit is contained in:
parent
b359854af7
commit
566df69b69
18 changed files with 97 additions and 0 deletions
|
@ -62,11 +62,17 @@ loop()
|
|||
while (SDL_PollEvent(&e)) {
|
||||
if (e.type == SDL_QUIT) {
|
||||
done = 1;
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_cancel_main_loop();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if(e.key.keysym.sym == SDLK_ESCAPE) {
|
||||
done = 1;
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_cancel_main_loop();
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue