Skip to content

Commit e7dd2c5

Browse files
xianyinchenminggo
authored andcommitted
add setOptimise function for c++ (#19882)
1 parent 4107942 commit e7dd2c5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

cocos/platform/CCDataManager.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,10 @@ void DataManager::onShaderLoaderEnd(){
6464
JniHelper::callStaticVoidMethod(DataManagerClassName, "onShaderLoaderEnd");
6565
#endif
6666
}
67+
void DataManager::setOptimise(const std::string& thing, const std::string& value){
68+
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
69+
JniHelper::callStaticVoidMethod(DataManagerClassName, "setOptimise", thing.c_str(), value.c_str());
70+
#endif
71+
}
6772

6873
NS_CC_END

cocos/platform/CCDataManager.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ THE SOFTWARE.
2828
#ifndef __CC_DataManager_H__
2929
#define __CC_DataManager_H__
3030

31+
#include <string>
3132
#include "platform/CCPlatformMacros.h"
3233
#include "base/ccTypes.h"
3334

@@ -47,6 +48,7 @@ class CC_DLL DataManager
4748
static void onSceneLoaderEnd();
4849
static void onShaderLoaderBegin();
4950
static void onShaderLoaderEnd();
51+
static void setOptimise(const std::string& thing, const std::string& value);
5052
};
5153

5254
// end of platform group

0 commit comments

Comments
 (0)