test/testdrawchessboard.c
changeset 9607 7746ab058d12
parent 9605 be71aef6c347
child 9609 897b25f560d0
equal deleted inserted replaced
9606:ec24a5add229 9607:7746ab058d12
    60 {
    60 {
    61     SDL_Event e;
    61     SDL_Event e;
    62     while (SDL_PollEvent(&e)) {
    62     while (SDL_PollEvent(&e)) {
    63 		if (e.type == SDL_QUIT) {
    63 		if (e.type == SDL_QUIT) {
    64 			done = 1;
    64 			done = 1;
       
    65 #ifdef __EMSCRIPTEN__
       
    66 			emscripten_cancel_main_loop();
       
    67 #endif
    65 			return;
    68 			return;
    66 		}
    69 		}
    67 
    70 
    68 		if(e.key.keysym.sym == SDLK_ESCAPE) {
    71 		if(e.key.keysym.sym == SDLK_ESCAPE) {
    69 			done = 1;
    72 			done = 1;
       
    73 #ifdef __EMSCRIPTEN__
       
    74 			emscripten_cancel_main_loop();
       
    75 #endif
    70 			return;
    76 			return;
    71 		}
    77 		}
    72 	}
    78 	}
    73 	
    79 	
    74 	DrawChessBoard(renderer);
    80 	DrawChessBoard(renderer);