mirror of https://github.com/axmolengine/axmol.git
commit
ac0aecb394
|
@ -386,7 +386,8 @@ void GLView::end()
|
||||||
glfwSetWindowShouldClose(_mainWindow,1);
|
glfwSetWindowShouldClose(_mainWindow,1);
|
||||||
_mainWindow = nullptr;
|
_mainWindow = nullptr;
|
||||||
}
|
}
|
||||||
|
// Release self. Otherwise, GLView could not be freed.
|
||||||
|
release();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLView::swapBuffers()
|
void GLView::swapBuffers()
|
||||||
|
|
|
@ -41,9 +41,9 @@
|
||||||
|
|
||||||
using namespace cocos2d;
|
using namespace cocos2d;
|
||||||
|
|
||||||
bool g_landscape=false;
|
bool g_landscape = false;
|
||||||
CCSize g_screenSize;
|
cocos2d::Size g_screenSize;
|
||||||
GLView* g_eglView=NULL;
|
GLView* g_eglView = nullptr;
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace cocos2d;
|
using namespace cocos2d;
|
||||||
|
@ -54,7 +54,7 @@ using namespace cocos2d;
|
||||||
|
|
||||||
-(void) dealloc
|
-(void) dealloc
|
||||||
{
|
{
|
||||||
CCDirector::sharedDirector()->end();
|
Director::getInstance()->end();
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,11 +63,11 @@ using namespace cocos2d;
|
||||||
|
|
||||||
- (void) applicationDidFinishLaunching:(NSNotification *)aNotification
|
- (void) applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||||
{
|
{
|
||||||
|
|
||||||
AppDelegate app;
|
AppDelegate app;
|
||||||
[self createSimulator:[NSString stringWithUTF8String:"HelloLua"] viewWidth:960 viewHeight:640 factor:1.0];
|
[self createSimulator:[NSString stringWithUTF8String:"HelloLua"] viewWidth:960 viewHeight:640 factor:1.0];
|
||||||
int ret = Application::getInstance()->run();
|
Application::getInstance()->run();
|
||||||
|
// After run, application needs to be terminated immediately.
|
||||||
|
[NSApp terminate: self];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue