add more docs for samsung enhanced API

This commit is contained in:
andyque 2015-06-19 18:09:42 +08:00
parent f75809f913
commit 55b86b2e14
1 changed files with 50 additions and 30 deletions

View File

@ -24,6 +24,11 @@
NS_CC_BEGIN
/**
* The purpose of Enhance API is to optimize Cocos2D-X game engine special for Samsung products.
* Note: The minimum required Android version is 5.0.
*
*/
class CC_DLL EnhanceAPI
{
public:
@ -38,42 +43,57 @@ public:
virtual ~EnhanceAPI();
/**
@brief call gameservice setResolutionSize API.
@param the optimized percent value.
@return success: 0, fail: -1.
*/
static int setResolutionPercent(int n);
* @brief The function is used to set screen buffer size ratio.
* The purpose of the API is to modify off screen buffer size for the game app.
* It will reduce the off screen buffer according to the given ration.
* The ration value varies from 50 to 100. 100 means using 100% size of the on screen buffer
* as off screen buffer and 50 means 50% size of the on screen buffer will be used as off screen buffer.
*
* @param percent The optimized percent value, value varies from 50 to 100.
* @return success: 0, fail: -1.
*/
static int setResolutionPercent(int percent);
/**
@brief call gameservice setFPS API.
@param the fps value.
@return success: 0, fail: -1.
*/
*@brief The function is used to set FPS level.
*@Warn The input fps level(0-99) corresponds to game fps value(0-60).
* FPS level 99 means game FPS value 60.
* The purpose of the API is reducing power consumption when we set dynamic fps in some situations.
*@param fps the fps value.
*@return success: 0, fail: -1.
*/
static int setFPS(int fps);
/**
@brief call gameservice fastLoading API.
@param the fast loading seconds.
@return success: 0, fail: -1.
*/
*@brief The function is used to set Boost Up seconds.
* The input parameter means the loading seconds. The maximum settings seconds is 7.
* The purpose of the API is reducing the application's loading time.
*@param sec The fast loading seconds.
*@return success: 0, fail: -1.
*/
static int fastLoading(int sec);
/**
@brief call gameservice getTemperature API.
@return -1: fail to get temperature
0: normal temperature
1: high
2,3: very high
*/
*@brief The function is used to get temperature level(0-3).
* The purpose of the API is get temperature status of the device.
* Temperature 0 means normal temperature and 1-3 means different temperature level.
* 1 is the minimum high temperature level and 3 is the maximum high temperature level.
*@return -1: fail to get temperature.
* - 0: normal temperature
* - 1: high
* - 2,3: very high
*/
static int getTemperature();
/**
@brief call gameservice setLowPowerMode API.
@return -1: fail to get temperature
0: normal temperature
1: high
2,3: very high
*/
/**
*@brief The function is used to set power saving mode for true or false.
* The purpose of the API is reducing Power consumption when set power saving mode for true.
*
*@return -1: fail to get temperature
* - 0: normal temperature
* - 1: high
* - 2,3: very high
*/
static int setLowPowerMode(bool enable);
};
@ -81,4 +101,4 @@ NS_CC_END
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
#endif // __CC_ENHANCEAPI_ANDROID_H__
#endif // __CC_ENHANCEAPI_ANDROID_H__