From 1177b0d5457146dcbee5ab4be32766f93e482422 Mon Sep 17 00:00:00 2001 From: huangshiwu Date: Mon, 11 Aug 2014 16:15:02 +0800 Subject: [PATCH 1/2] CCGLView modefy --- cocos/platform/CCGLView.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cocos/platform/CCGLView.h b/cocos/platform/CCGLView.h index 8f08b438d4..6850d6bab9 100644 --- a/cocos/platform/CCGLView.h +++ b/cocos/platform/CCGLView.h @@ -117,11 +117,13 @@ public: */ virtual void setFrameSize(float width, float height); + virtual void setFrameZoomFactor(float zoomFactor) {} virtual float getFrameZoomFactor() const { return 1.0; } /** Get retina factor */ virtual int getRetinaFactor() const { return 1; } - + + virtual bool setContentScaleFactor(float scaleFactor) { return false; } virtual float getContentScaleFactor() const { return 1.0; } /** returns whether or not the view is in Retina Display mode */ From 77bc3a0e6017bed78db6895d7db47d2879b8edc2 Mon Sep 17 00:00:00 2001 From: huangshiwu Date: Mon, 11 Aug 2014 16:55:23 +0800 Subject: [PATCH 2/2] GLView modefy additional --- cocos/platform/CCGLView.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cocos/platform/CCGLView.h b/cocos/platform/CCGLView.h index 6850d6bab9..cb0e133702 100644 --- a/cocos/platform/CCGLView.h +++ b/cocos/platform/CCGLView.h @@ -117,12 +117,15 @@ public: */ virtual void setFrameSize(float width, float height); + /** Set and get zoom factor for frame. This two methods are for + debugging big resolution (e.g.new ipad) app on desktop.*/ virtual void setFrameZoomFactor(float zoomFactor) {} virtual float getFrameZoomFactor() const { return 1.0; } /** Get retina factor */ virtual int getRetinaFactor() const { return 1; } + /** only works on ios platform*/ virtual bool setContentScaleFactor(float scaleFactor) { return false; } virtual float getContentScaleFactor() const { return 1.0; }