diff options
| author | Andre Weissflog <floooh@gmail.com> | 2019-05-30 22:44:49 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2019-05-30 22:44:49 +0200 |
| commit | dba02a49fb25c24189a0f87487dabd42ee4ef59c (patch) | |
| tree | 83ca597247d8f68a4dde26cf9fbb394aaa51e000 /sokol_time.h | |
| parent | 703b92078b152938f57fe3c02a1bcd73031159de (diff) | |
emscripten: remove leading underscore in EM_JS function names, causes problems with LLVM upstream
Diffstat (limited to 'sokol_time.h')
| -rw-r--r-- | sokol_time.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sokol_time.h b/sokol_time.h index 1c42bab1..68132c5d 100644 --- a/sokol_time.h +++ b/sokol_time.h @@ -170,7 +170,7 @@ _SOKOL_PRIVATE int64_t int64_muldiv(int64_t value, int64_t numer, int64_t denom) #endif #if defined(__EMSCRIPTEN__) -EM_JS(double, _stm_js_perfnow, (void), { +EM_JS(double, stm_js_perfnow, (void), { return performance.now(); }); #endif @@ -185,7 +185,7 @@ SOKOL_API_IMPL void stm_setup(void) { mach_timebase_info(&_stm.timebase); _stm.start = mach_absolute_time(); #elif defined(__EMSCRIPTEN__) - _stm.start = _stm_js_perfnow(); + _stm.start = stm_js_perfnow(); #else struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); @@ -204,7 +204,7 @@ SOKOL_API_IMPL uint64_t stm_now(void) { const uint64_t mach_now = mach_absolute_time() - _stm.start; now = int64_muldiv(mach_now, _stm.timebase.numer, _stm.timebase.denom); #elif defined(__EMSCRIPTEN__) - double js_now = _stm_js_perfnow() - _stm.start; + double js_now = stm_js_perfnow() - _stm.start; SOKOL_ASSERT(js_now >= 0.0); now = (uint64_t) (js_now * 1000000.0); #else |