Chinaunix首页 | 论坛 | 博客
  • 博客访问: 135339
  • 博文数量: 52
  • 博客积分: 863
  • 博客等级: 准尉
  • 技术积分: 510
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-24 17:54
个人简介

没有人生,没有爱情!

文章分类

全部博文(52)

文章存档

2014年(9)

2013年(20)

2012年(17)

2011年(6)

我的朋友

分类: C/C++

2011-11-28 10:51:32


I recently started seeing this error in my Cocos 2d iPhone application running on iOS 4.1:

sgx error (background gpu access not permitted):
Program received signal: “SIGABRT”.

After searching around, I found this thread on the cocos2d forum.

I modified my code in the ApplicationDelegate to look like:

- (void)applicationDidEnterBackground:(UIApplication *)application
{
    [[CCDirector sharedDirector] stopAnimation];
}
 
- (void)applicationWillEnterForeground:(UIApplication *)application
{
    [[CCDirector sharedDirector] startAnimation];
}
 
- (void)applicationWillResignActive:(UIApplication *)application
{
    [[CCDirector sharedDirector] pause];
}
 
- (void)applicationDidBecomeActive:(UIApplication *)application
{
    [[CCDirector sharedDirector] resume];
}
阅读(1288) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~