3
#include <SDL/SDL_ttf.h>
5
#include <emscripten.h>
11
while (SDL_PollEvent(&event)) {
14
if (!result) { // prevent infinite recursion since REPORT_RESULT does window.close too.
16
REPORT_RESULT_INTERNAL(1);
26
SDL_Init(SDL_INIT_VIDEO);
27
SDL_Surface *screen = SDL_SetVideoMode(600, 450, 32, SDL_HWSURFACE);
29
emscripten_set_main_loop(one, 0, 0);
31
emscripten_run_script("setTimeout(function() { window.close() }, 2000)");