mirror of https://github.com/axmolengine/axmol.git
parent
9e477303f1
commit
bbfc33dfd2
|
@ -199,7 +199,7 @@ THE SOFTWARE.
|
||||||
#include "platform/android/CCGL-android.h"
|
#include "platform/android/CCGL-android.h"
|
||||||
#include "platform/android/CCStdC-android.h"
|
#include "platform/android/CCStdC-android.h"
|
||||||
//Enhance modification begin
|
//Enhance modification begin
|
||||||
#include "platform/android/CCEnhanceAPI-android.h"
|
#include "platform/android/CCEnhanceAPI-android.h"
|
||||||
//Enhance modification end
|
//Enhance modification end
|
||||||
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
|
||||||
|
|
||||||
|
|
|
@ -451,71 +451,61 @@ public class Cocos2dxHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
//Enhance API modification begin
|
//Enhance API modification begin
|
||||||
public static int setResolutionPercent(int per)
|
public static int setResolutionPercent(int per) {
|
||||||
{
|
try {
|
||||||
try{
|
if (mGameServiceBinder != null) {
|
||||||
if(mGameServiceBinder != null)
|
return mGameServiceBinder.setPreferredResolution(per);
|
||||||
{
|
}
|
||||||
return mGameServiceBinder.setPreferredResolution(per);
|
return -1;
|
||||||
}
|
} catch (Exception e) {
|
||||||
return -1;
|
|
||||||
}catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int setFPS(int fps)
|
public static int setFPS(int fps) {
|
||||||
{
|
try {
|
||||||
try{
|
if (mGameServiceBinder != null) {
|
||||||
if(mGameServiceBinder != null)
|
return mGameServiceBinder.setFramePerSecond(fps);
|
||||||
{
|
}
|
||||||
return mGameServiceBinder.setFramePerSecond(fps);
|
return -1;
|
||||||
}
|
} catch (Exception e) {
|
||||||
return -1;
|
|
||||||
}catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int fastLoading(int sec)
|
public static int fastLoading(int sec) {
|
||||||
{
|
try {
|
||||||
try{
|
if (mGameServiceBinder != null) {
|
||||||
if(mGameServiceBinder != null)
|
return mGameServiceBinder.boostUp(sec);
|
||||||
{
|
}
|
||||||
return mGameServiceBinder.boostUp(sec);
|
return -1;
|
||||||
}
|
} catch (Exception e) {
|
||||||
return -1;
|
|
||||||
}catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getTemperature()
|
public static int getTemperature() {
|
||||||
{
|
try {
|
||||||
try{
|
if (mGameServiceBinder != null) {
|
||||||
if(mGameServiceBinder != null)
|
return mGameServiceBinder.getAbstractTemperature();
|
||||||
{
|
}
|
||||||
return mGameServiceBinder.getAbstractTemperature();
|
return -1;
|
||||||
}
|
} catch (Exception e) {
|
||||||
return -1;
|
|
||||||
}catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int setLowPowerMode(boolean enable)
|
public static int setLowPowerMode(boolean enable) {
|
||||||
{
|
try {
|
||||||
try{
|
if (mGameServiceBinder != null) {
|
||||||
if(mGameServiceBinder != null)
|
return mGameServiceBinder.setGamePowerSaving(enable);
|
||||||
{
|
}
|
||||||
return mGameServiceBinder.setGamePowerSaving(enable);
|
return -1;
|
||||||
}
|
} catch (Exception e) {
|
||||||
return -1;
|
|
||||||
}catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue