diff --git a/binding-mri/binding-mri.cpp b/binding-mri/binding-mri.cpp index 84536d3..c8b3b02 100644 --- a/binding-mri/binding-mri.cpp +++ b/binding-mri/binding-mri.cpp @@ -277,8 +277,8 @@ RB_METHOD(mriRgssMain) { VALUE exc = Qnil; - rb_rescue2((VALUE(*)(ANYARGS)) rgssMainCb, rb_block_proc(), - (VALUE(*)(ANYARGS)) rgssMainRescue, (VALUE) &exc, + rb_rescue2((VALUE(*)(VALUE *)) rgssMainCb, rb_block_proc(), + (VALUE(*)(VALUE, VALUE)) rgssMainRescue, (VALUE) &exc, rb_eException, (VALUE) 0); if (NIL_P(exc)) @@ -385,7 +385,7 @@ struct BacktraceData #define SCRIPT_SECTION_FMT (rgssVer >= 3 ? "{%04ld}" : "Section%03ld") -static void runRMXPScripts(BacktraceData &btData) +static void __attribute__ ((optnone)) runRMXPScripts(BacktraceData &btData) { const Config &conf = shState->rtData().config; const std::string &scriptPack = conf.game.scripts; @@ -487,10 +487,6 @@ static void runRMXPScripts(BacktraceData &btData) while (true) { -#ifdef __EMSCRIPTEN - emscripten_sleep(10); -#endif - for (long i = 0; i < scriptCount; ++i) { VALUE script = rb_ary_entry(scriptArray, i); diff --git a/src/eventthread.cpp b/src/eventthread.cpp index beec9b7..89704d0 100644 --- a/src/eventthread.cpp +++ b/src/eventthread.cpp @@ -139,15 +139,6 @@ void EventThread::process(RGSSThreadData &rtData) } while (SDL_PollEvent(&event)) { -#ifdef __EMSCRIPTEN__ - emscripten_sleep(10); -#endif -// if (!SDL_WaitEvent(&event)) -// { -// Debug() << "EventThread: Event error"; -// break; -// } - if (sMenu && sMenu->onEvent(event)) { if (sMenu->destroyReq())