MCPcopy Index your code
hub / github.com/EmulatorJS/EmulatorJS / loadState

Method loadState

data/src/GameManager.js:198–210  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

196 return new Uint8Array(data);
197 }
198 loadState(state) {
199 try {
200 this.FS.unlink("game.state");
201 } catch(e) {}
202 this.FS.writeFile("/game.state", state);
203 this.clearEJSResetTimer();
204 this.functions.loadState("game.state", 0);
205 setTimeout(() => {
206 try {
207 this.FS.unlink("game.state");
208 } catch(e) {}
209 }, 5000)
210 }
211 screenshot() {
212 try {
213 this.FS.unlink("screenshot.png");

Callers 5

quickLoadMethod · 0.80
downloadStartStateMethod · 0.80
bindListenersMethod · 0.80
createBottomMenuBarMethod · 0.80

Calls 2

clearEJSResetTimerMethod · 0.95
writeFileMethod · 0.80

Tested by

no test coverage detected