MCPcopy Create free account
hub / github.com/WilliamLCobb/iNDS / RefreshScriptStartedStatus

Function RefreshScriptStartedStatus

desmume/src/lua-engine.cpp:6371–6387  ·  view source on GitHub ↗

sets anything that needs to depend on the total number of scripts running

Source from the content-addressed store, hash-verified

6369
6370// sets anything that needs to depend on the total number of scripts running
6371void RefreshScriptStartedStatus()
6372{
6373 int numScriptsStarted = 0;
6374
6375 std::map<int, LuaContextInfo*>::const_iterator iter = luaContextInfo.begin();
6376 std::map<int, LuaContextInfo*>::const_iterator end = luaContextInfo.end();
6377 while(iter != end)
6378 {
6379 LuaContextInfo& info = *iter->second;
6380 if(info.started)
6381 numScriptsStarted++;
6382 ++iter;
6383 }
6384
6385// frameadvSkipLagForceDisable = (numScriptsStarted != 0); // disable while scripts are running because currently lag skipping makes lua callbacks get called twice per frame advance
6386 g_numScriptsStarted = numScriptsStarted;
6387}
6388
6389// sets anything that needs to depend on speed mode or running status of scripts
6390void RefreshScriptSpeedStatus()

Callers 2

RunLuaScriptFileFunction · 0.85
StopLuaScriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected