diff --git a/src/platform/emscripten/interface.cpp b/src/platform/emscripten/interface.cpp index 76b8309f4..5e284407c 100644 --- a/src/platform/emscripten/interface.cpp +++ b/src/platform/emscripten/interface.cpp @@ -158,6 +158,14 @@ bool Emscripten_Interface::ResetCanvas() { return DisplayUi != nullptr; } +void Emscripten_Interface::PreloadFile(std::string dir, std::string path, bool graphic) { + auto* request = AsyncHandler::RequestFile(dir, path); + if (!request->IsReady()) { + request->SetGraphicFile(graphic); + request->Start(); + } +} + // Binding code EMSCRIPTEN_BINDINGS(player_interface) { emscripten::class_("api")