public Cocos2dxGLSurfaceView onCreateView() {
Cocos2dxGLSurfaceView glSurfaceView = new Cocos2dxGLSurfaceView(this);
//this line is need on some device if we specify an alpha bits
if(this.mGLContextAttrs[3] > 0) glSurfaceView.getHolder().setFormat(PixelFormat.TRANSLUCENT);
Cocos2dxEGLConfigChooser chooser = new Cocos2dxEGLConfigChooser(this.mGLContextAttrs);
glSurfaceView.setEGLConfigChooser(chooser);
if(Cocos2dxHelper.getDeviceModel().indexOf("HTC One X") != -1){
glSurfaceView.setEGLConfigChooser(5, 6, 5, 0, 16, 8);
}
return glSurfaceView;
}
在Cocos2dxActivity文件代码加入上面对htc one x的判断