diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-09-20 14:13:43 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-09-20 14:13:43 -0700 |
commit | d9e13a5a3ceeaa500e9c75e52547c8b67950c441 (patch) | |
tree | 986b6af442e8c503bedab9912e8913dbd129d2e1 /system/include | |
parent | afa818a5cbc78bb862f0cae8b305c8033a5b0fc3 (diff) | |
parent | 83c6675368ce14ee34b52147792b1073a074ed24 (diff) |
Merge branch 'incoming'
Diffstat (limited to 'system/include')
-rw-r--r-- | system/include/EGL/eglplatform.h | 6 | ||||
-rw-r--r-- | system/include/emscripten/emscripten.h | 26 |
2 files changed, 19 insertions, 13 deletions
diff --git a/system/include/EGL/eglplatform.h b/system/include/EGL/eglplatform.h index 4512fd84..2db2cc47 100644 --- a/system/include/EGL/eglplatform.h +++ b/system/include/EGL/eglplatform.h @@ -75,6 +75,12 @@ typedef HDC EGLNativeDisplayType; typedef HBITMAP EGLNativePixmapType; typedef HWND EGLNativeWindowType; +#elif defined(EMSCRIPTEN) + +typedef int EGLNativeDisplayType; +typedef int EGLNativeWindowType; +typedef int EGLNativePixmapType; + #elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ typedef int EGLNativeDisplayType; diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h index 4d489142..8c42a18a 100644 --- a/system/include/emscripten/emscripten.h +++ b/system/include/emscripten/emscripten.h @@ -62,20 +62,20 @@ extern void emscripten_cancel_main_loop(); * at specific time in the future. */ #if EMSCRIPTEN -extern void _emscripten_push_main_loop_blocker(void (*func)(), const char *name); -extern void _emscripten_push_uncounted_main_loop_blocker(void (*func)(), const char *name); +extern void _emscripten_push_main_loop_blocker(void (*func)(void *), void *arg, const char *name); +extern void _emscripten_push_uncounted_main_loop_blocker(void (*func)(void *), void *arg, const char *name); #else -inline void _emscripten_push_main_loop_blocker(void (*func)(), const char *name) { - func(); +inline void _emscripten_push_main_loop_blocker(void (*func)(void *), void *arg, const char *name) { + func(arg); } -inline void _emscripten_push_uncounted_main_loop_blocker(void (*func)(), const char *name) { - func(); +inline void _emscripten_push_uncounted_main_loop_blocker(void (*func)(void *), void *arg, const char *name) { + func(arg); } #endif -#define emscripten_push_main_loop_blocker(func) \ - _emscripten_push_main_loop_blocker(func, #func) -#define emscripten_push_uncounted_main_loop_blocker(func) \ - _emscripten_push_uncounted_main_loop_blocker(func, #func) +#define emscripten_push_main_loop_blocker(func, arg) \ + _emscripten_push_main_loop_blocker(func, arg, #func) +#define emscripten_push_uncounted_main_loop_blocker(func, arg) \ + _emscripten_push_uncounted_main_loop_blocker(func, arg, #func) /* * Sets the number of blockers remaining until some user-relevant @@ -99,11 +99,11 @@ inline void emscripten_set_main_loop_expected_blockers(int num) {} * mechanism is used. */ #if EMSCRIPTEN -extern void emscripten_async_call(void (*func)(), int millis); +extern void emscripten_async_call(void (*func)(void *), void *arg, int millis); #else -inline void emscripten_async_call(void (*func)(), int millis) { +inline void emscripten_async_call(void (*func)(void *), void *arg, int millis) { if (millis) SDL_Delay(millis); - func(); + func(arg); } #endif |