Fix compilation with optimization for fixed MRI

This commit is contained in:
Varun Patil 2018-05-03 05:25:29 +05:30
parent 35c19792f8
commit 01cf9243cf
2 changed files with 3 additions and 16 deletions

View File

@ -277,8 +277,8 @@ RB_METHOD(mriRgssMain)
{ {
VALUE exc = Qnil; VALUE exc = Qnil;
rb_rescue2((VALUE(*)(ANYARGS)) rgssMainCb, rb_block_proc(), rb_rescue2((VALUE(*)(VALUE *)) rgssMainCb, rb_block_proc(),
(VALUE(*)(ANYARGS)) rgssMainRescue, (VALUE) &exc, (VALUE(*)(VALUE, VALUE)) rgssMainRescue, (VALUE) &exc,
rb_eException, (VALUE) 0); rb_eException, (VALUE) 0);
if (NIL_P(exc)) if (NIL_P(exc))
@ -385,7 +385,7 @@ struct BacktraceData
#define SCRIPT_SECTION_FMT (rgssVer >= 3 ? "{%04ld}" : "Section%03ld") #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 Config &conf = shState->rtData().config;
const std::string &scriptPack = conf.game.scripts; const std::string &scriptPack = conf.game.scripts;
@ -487,10 +487,6 @@ static void runRMXPScripts(BacktraceData &btData)
while (true) while (true)
{ {
#ifdef __EMSCRIPTEN
emscripten_sleep(10);
#endif
for (long i = 0; i < scriptCount; ++i) for (long i = 0; i < scriptCount; ++i)
{ {
VALUE script = rb_ary_entry(scriptArray, i); VALUE script = rb_ary_entry(scriptArray, i);

View File

@ -139,15 +139,6 @@ void EventThread::process(RGSSThreadData &rtData)
} }
while (SDL_PollEvent(&event)) 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 && sMenu->onEvent(event))
{ {
if (sMenu->destroyReq()) if (sMenu->destroyReq())