mirror of https://github.com/axmolengine/axmol.git
Changes the order of inheritance for GLView. Reason:
``` bool ok = true; JSObject *obj = JS_THIS_OBJECT(cx, vp); js_proxy_t *proxy = jsb_get_js_proxy(obj); cocos2d::GLViewProtocol* cobj = (cocos2d::GLViewProtocol *)(proxy ? proxy->ptr : NULL); // This line will cause the 'cobj' to be an invalid object, since the instance is a 'GLView', but we force cast it to 'GLViewProtocol*'. JSB_PRECONDITION2( cobj, cx, false, "js_cocos2dx_GLViewProtocol_setDesignResolutionSize : Invalid Native Object"); if (argc == 3) { double arg0; ``` After changing the order, the result could be fixed. But I don't know whether it's the best way to fix it. Anyway, it wouldn't break anything right now.
This commit is contained in:
parent
a393eded58
commit
42c724a59d
|
@ -58,8 +58,6 @@ enum class ResolutionPolicy
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class EGLTouchDelegate;
|
||||
|
||||
/**
|
||||
* @addtogroup platform
|
||||
* @{
|
||||
|
|
|
@ -35,7 +35,7 @@ THE SOFTWARE.
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class CC_DLL GLView : public Ref, public GLViewProtocol
|
||||
class CC_DLL GLView : public GLViewProtocol, public Ref
|
||||
{
|
||||
public:
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ THE SOFTWARE.
|
|||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class CC_DLL GLView : public Ref, public GLViewProtocol
|
||||
class CC_DLL GLView : public GLViewProtocol, public Ref
|
||||
{
|
||||
public:
|
||||
static GLView* create(const std::string& viewName);
|
||||
|
|
|
@ -38,7 +38,7 @@ NS_CC_BEGIN
|
|||
|
||||
/** Class that represent the OpenGL View
|
||||
*/
|
||||
class CC_DLL GLView : public Ref, public GLViewProtocol
|
||||
class CC_DLL GLView : public GLViewProtocol, public Ref
|
||||
{
|
||||
public:
|
||||
/** creates a GLView with a objective-c CCEAGLView instance */
|
||||
|
|
Loading…
Reference in New Issue