[engine] [cocos2d-x] [jsb-adapter] 适配引擎 v2.4.13 版本

This commit is contained in:
SmallMain
2024-10-16 16:23:25 +08:00
parent 7f956acda7
commit 887d4a96c9
61 changed files with 1313 additions and 981 deletions

View File

@@ -180,13 +180,13 @@ bool jsb_register_all_modules()
se->addRegisterCallback(register_all_video);
#endif
#if USE_WEBVIEW
#if USE_WEB_VIEW
se->addRegisterCallback(register_all_webview);
#endif
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_OPENHARMONY)
#if USE_WEBVIEW
#if USE_WEB_VIEW
se->addRegisterCallback(register_all_webview);
#endif

View File

@@ -379,6 +379,12 @@ void XMLHttpRequest::getHeader(const std::string& header)
// Transform field name to lower case as they are case-insensitive
std::transform(http_field.begin(), http_field.end(), http_field.begin(), ::tolower);
if (CC_TARGET_PLATFORM == CC_PLATFORM_OPENHARMONY && _httpHeader.find(http_field) != _httpHeader.end()) {
_httpHeader[http_field].insert(strlen(_httpHeader[http_field].c_str()) - 1, ",");
_httpHeader[http_field].insert(strlen(_httpHeader[http_field].c_str()) - 1, http_value);
http_value = _httpHeader[http_field];
}
_httpHeader[http_field] = http_value;
}