MCPcopy Create free account
hub / github.com/EasyRPG/Player / DownloadDone

Method DownloadDone

src/async_handler.cpp:431–456  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

429}
430
431void FileRequestAsync::DownloadDone(bool success) {
432 if (IsReady()) {
433 // Change to real success state when already finished before
434 success = state == State_DoneSuccess;
435 }
436
437 if (success) {
438#ifdef EMSCRIPTEN
439 if (state == State_Pending) {
440 // Update directory structure (new file was added)
441 if (FileFinder::Game()) {
442 FileFinder::Game().ClearCache();
443 }
444 }
445#endif
446
447 state = State_DoneSuccess;
448
449 CallListeners(true);
450 }
451 else {
452 state = State_DoneFailure;
453
454 CallListeners(false);
455 }
456}

Callers 2

download_success_retryFunction · 0.80
download_failure_retryFunction · 0.80

Calls 2

GameClass · 0.85
ClearCacheMethod · 0.45

Tested by

no test coverage detected