From 7eb18e4a10bd8fff46eb472347c3f3b07a83ad70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Fri, 21 Aug 2015 23:11:51 -0700 Subject: [PATCH] asmjs: Fixed context resize. --- src/glcontext_egl.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/glcontext_egl.cpp b/src/glcontext_egl.cpp index 38ce7b28..8e901486 100644 --- a/src/glcontext_egl.cpp +++ b/src/glcontext_egl.cpp @@ -310,10 +310,6 @@ EGL_IMPORT eglSwapInterval(m_display, 0); } -# if BX_PLATFORM_EMSCRIPTEN - emscripten_set_canvas_size(_width, _height); -# endif // BX_PLATFORM_EMSCRIPTEN - import(); } @@ -337,8 +333,6 @@ EGL_IMPORT void GlContext::resize(uint32_t _width, uint32_t _height, uint32_t _flags) { - BX_UNUSED(_width, _height); - # if BX_PLATFORM_ANDROID if (NULL != m_display) { @@ -346,7 +340,11 @@ EGL_IMPORT eglGetConfigAttrib(m_display, m_config, EGL_NATIVE_VISUAL_ID, &format); ANativeWindow_setBuffersGeometry( (ANativeWindow*)g_platformData.nwh, _width, _height, format); } -# endif // BX_PLATFORM_ANDROID +# elif BX_PLATFORM_EMSCRIPTEN + emscripten_set_canvas_size(_width, _height); +# else + BX_UNUSED(_width, _height); +# endif // BX_PLATFORM_* if (NULL != m_display) {