Mac and Linux SDL2 binary snapshots
Edward Rudd
2021-06-15 dec7875a6e23212021e4d9080330a42832dfe02a
source/src/video/emscripten/SDL_emscriptenopengles.c
@@ -27,6 +27,7 @@
#include "SDL_emscriptenvideo.h"
#include "SDL_emscriptenopengles.h"
#include "SDL_hints.h"
#define LOAD_FUNC(NAME) _this->egl_data->NAME = NAME;
@@ -82,9 +83,19 @@
}
SDL_EGL_CreateContext_impl(Emscripten)
SDL_EGL_SwapWindow_impl(Emscripten)
SDL_EGL_MakeCurrent_impl(Emscripten)
int
Emscripten_GLES_SwapWindow(_THIS, SDL_Window * window)
{
    EGLBoolean ret = SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *) window->driverdata)->egl_surface);
    if (emscripten_has_asyncify() && SDL_GetHintBoolean(SDL_HINT_EMSCRIPTEN_ASYNCIFY, SDL_TRUE)) {
        /* give back control to browser for screen refresh */
        emscripten_sleep(0);
    }
    return ret;
}
void
Emscripten_GLES_GetDrawableSize(_THIS, SDL_Window * window, int * w, int * h)
{