| | |
| | | /* |
| | | Simple DirectMedia Layer |
| | | Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org> |
| | | Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org> |
| | | |
| | | This software is provided 'as-is', without any express or implied |
| | | warranty. In no event will the authors be held liable for any damages |
| | |
| | | |
| | | #include "SDL_emscriptenvideo.h" |
| | | #include "SDL_emscriptenframebuffer.h" |
| | | #include "SDL_hints.h" |
| | | |
| | | |
| | | int Emscripten_CreateWindowFramebuffer(_THIS, SDL_Window * window, Uint32 * format, void ** pixels, int *pitch) |
| | |
| | | SDL_GetWindowID(window), ++frame_number); |
| | | SDL_SaveBMP(surface, file); |
| | | }*/ |
| | | |
| | | if (emscripten_has_asyncify() && SDL_GetHintBoolean(SDL_HINT_EMSCRIPTEN_ASYNCIFY, SDL_TRUE)) { |
| | | /* give back control to browser for screen refresh */ |
| | | emscripten_sleep(0); |
| | | } |
| | | |
| | | return 0; |
| | | } |
| | | |