change to asset read

This commit is contained in:
王劲鹏
2021-06-10 11:05:31 +08:00
committed by osborn
parent 0b4b9c2ed6
commit e6cff004d0
7 changed files with 30 additions and 7 deletions

View File

@@ -12,8 +12,12 @@ std::shared_ptr<DoricAsyncResult> DoricAssetJSLoader::request(QString source) {
QString protocol = "assets://";
QString assetPath = source.mid(protocol.length());
QString script = DoricUtils::readAssetFile("/" + assetPath);
std::shared_ptr<DoricAsyncResult> asyncResult =
std::make_shared<DoricAsyncResult>();
asyncResult->setResult(script);
return asyncResult;
}