mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
adjust c++ call java function rename (#1498)
This commit is contained in:
@@ -811,7 +811,7 @@ std::string FileUtils::fullPathForFilename(const std::string &filename) const
|
||||
}
|
||||
|
||||
if(isPopupNotify()){
|
||||
CCLOG("cocos2d: fullPathForFilename: No file found at %s. Possible missing file.", filename.c_str());
|
||||
CCLOG("fullPathForFilename: No file found at %s. Possible missing file.", filename.c_str());
|
||||
}
|
||||
|
||||
// The file wasn't found, return empty string.
|
||||
@@ -983,7 +983,7 @@ void FileUtils::loadFilenameLookupDictionaryFromFile(const std::string &filename
|
||||
int version = metadata["version"].asInt();
|
||||
if (version != 1)
|
||||
{
|
||||
CCLOG("cocos2d: ERROR: Invalid filenameLookup dictionary version: %d. Filename: %s", version, filename.c_str());
|
||||
CCLOG("ERROR: Invalid filenameLookup dictionary version: %d. Filename: %s", version, filename.c_str());
|
||||
return;
|
||||
}
|
||||
setFilenameLookupDictionary( dict["filenames"].asValueMap());
|
||||
|
||||
@@ -314,7 +314,7 @@ std::string FileUtilsAndroid::getWritablePath() const
|
||||
// Fix for Nexus 10 (Android 4.2 multi-user environment)
|
||||
// the path is retrieved through Java Context.getCacheDir() method
|
||||
std::string dir("");
|
||||
std::string tmp = JniHelper::callStaticStringMethod(JCLS_HELPER, "getCocos2dxWritablePath");
|
||||
std::string tmp = JniHelper::callStaticStringMethod(JCLS_HELPER, "getWritablePath");
|
||||
|
||||
if (tmp.length() > 0)
|
||||
{
|
||||
|
||||
@@ -216,7 +216,7 @@ public class Cocos2dxHelper {
|
||||
|
||||
int versionCode = 1;
|
||||
try {
|
||||
versionCode = Cocos2dxActivity.getContext().getPackageManager().getPackageInfo(Cocos2dxHelper.getCocos2dxPackageName(), 0).versionCode;
|
||||
versionCode = Cocos2dxActivity.getContext().getPackageManager().getPackageInfo(Cocos2dxHelper.getPackageName(), 0).versionCode;
|
||||
} catch (NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -291,10 +291,10 @@ public class Cocos2dxHelper {
|
||||
|
||||
private static native void nativeSetAudioDeviceInfo(boolean isSupportLowLatency, int deviceSampleRate, int audioBufferSizeInFames);
|
||||
|
||||
public static String getCocos2dxPackageName() {
|
||||
public static String getPackageName() {
|
||||
return Cocos2dxHelper.sPackageName;
|
||||
}
|
||||
public static String getCocos2dxWritablePath() {
|
||||
public static String getWritablePath() {
|
||||
return Cocos2dxHelper.sFileDirectory;
|
||||
}
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ std::string getApkPathJNI()
|
||||
|
||||
std::string getPackageNameJNI()
|
||||
{
|
||||
return JniHelper::callStaticStringMethod(JCLS_HELPER, "getCocos2dxPackageName");
|
||||
return JniHelper::callStaticStringMethod(JCLS_HELPER, "getPackageName");
|
||||
}
|
||||
|
||||
int getObbAssetFileDescriptorJNI(const std::string& path, long* startOffset, long* size)
|
||||
|
||||
Reference in New Issue
Block a user