James Chen wrote:
> I mean you have to checkout a new branch based on the cocos2d-x/master branch.
> Then,
> […]
>
Dear James…
>
I tried, The bug was gone on my HTC New One, We will try another devices later.
Thanks for you help!
>
Still expecting new version!
>
BR.
>
Atwood
Dear James…
I tried the new 2.1.5, Black pictures bug is fix, But the background music can’t be resume.
I add these code in AppDelegate.cpp already.
>
void AppDelegate::applicationDidEnterBackground()
{
:
CocosDenshion::SimpleAudioEngine::shareEngine()->pauseBackgroundMusic();
}
>
void AppDelegate::applicationWillEnterForeground()
{
:
CocosDenshion::SimpleAudioEngine::shareEngine()->resumeBackgroundMusic();
}
>
But the background music did not resume, and I try target platform 2.3 , 3.1 & 4.03, all not work!
Was this issue reported ? Could you provide the issue URL or the thread in the forum? Did the issue appear from v2.1.4 ?
I’m having a similar issue where i only get a black screen when the app went to the background on the Kindle Fire. (However sounds/music/touch still work)
The app is build with Cocos2dx 2.1.5 and on a samsung tablet i can enter/leave the app without problems.
Also when trying to build an app with cocos2dx 2.0.4, the issue doesn’t appear on the kindle.
The huge list of constant errors i get while debugging are basically these two:
D/cocos2d-x debug info(9687): OpenGL error 0x0501 in …/…/…/cocos2dx/sprite_nodes/CCSprite.cpp draw 584
D/cocos2d-x debug info(9687): OpenGL error 0x0502 in …/…/…/cocos2dx/sprite_nodes/CCSprite.cpp draw 584
I have tried quite a few solutions mentioned in this thread but it doesn’t seem like any of them help.
Thank you for your help!
I try your code, but still not work for my HTC new One.
This problem didn’t happen when I use 1.0.1-x-0.13.0-beta (Same HTC new One),
But I already convert all my source code to 2.1.4 or 2.1.5,
So, someone help me, please !
Same problem with Kindle Fire HD and 2.1.4 & 2.1.5 . Screen goes black when the app comes back from the background.
With these errors
D/cocos2d-x debug info(9687): OpenGL error 0x0501 in …/…/…/cocos2dx/sprite_nodes/CCSprite.cpp draw 584
Seems like it is not as easy problem to be solved, because the patch in 2.1.5 didn’t work (at least for the Kindle Fire HD).
I was looking if there was a workaround,
something along these lines:
I’m having a similar issue where i only get a black screen when the app went to the background on the Kindle Fire. (However sounds/music/touch still work)
The app is build with Cocos2dx 2.1.5 and on a samsung tablet i can enter/leave the app without problems.
Also when trying to build an app with cocos2dx 2.0.4, the issue doesn’t appear on the kindle.
>
The huge list of constant errors i get while debugging are basically these two:
D/cocos2d-x debug info(9687): OpenGL error 0x0501 in …/…/…/cocos2dx/sprite_nodes/CCSprite.cpp draw 584
D/cocos2d-x debug info(9687): OpenGL error 0x0502 in …/…/…/cocos2dx/sprite_nodes/CCSprite.cpp draw 584
>
I have tried quite a few solutions mentioned in this thread but it doesn’t seem like any of them help.
I was experiencing this on both the Kindle Fire and 7" Fire HD, but after upgrading to 2.1.5 they all seem to be resolved.
Was this for a new project or an updated one? If an updated one, did you also update ~/proj.android/jni/hellocpp/main.cpp? I found that when I commented out the else stuff like it was in 2.1.4 I got these repeated errors.
Remco dd wrote:
> I’m having a similar issue where i only get a black screen when the app went to the background on the Kindle Fire. (However sounds/music/touch still work)
> The app is build with Cocos2dx 2.1.5 and on a samsung tablet i can enter/leave the app without problems.
> Also when trying to build an app with cocos2dx 2.0.4, the issue doesn’t appear on the kindle.
>
> The huge list of constant errors i get while debugging are basically these two:
> D/cocos2d-x debug info(9687): OpenGL error 0x0501 in …/…/…/cocos2dx/sprite_nodes/CCSprite.cpp draw 584
> D/cocos2d-x debug info(9687): OpenGL error 0x0502 in …/…/…/cocos2dx/sprite_nodes/CCSprite.cpp draw 584
>
> I have tried quite a few solutions mentioned in this thread but it doesn’t seem like any of them help.
>
I was experiencing this on both the Kindle Fire and 7" Fire HD, but after upgrading to 2.1.5 they all seem to be resolved.
>
Was this for a new project or an updated one? If an updated one, did you also update ~/proj.android/jni/hellocpp/main.cpp? I found that when I commented out the else stuff like it was in 2.1.4 I got these repeated errors.
>
replacement code:
[…]
Thanks! I was indeed upgrading and this totally fixed my issue I guess upgrading cocos2dx involves a bit more than i thought.
@Jesus Bosch
What happened? Did you update to v2.1.5 and forgot to update corresponding main.cpp?
And did you rebuild cocos2d-x java lib, which is in cocos2dx/platform/android/?
@Jesus Bosch
What happened? Did you update to v2.1.5 and forgot to update corresponding main.cpp?
And did you rebuild cocos2d-x java lib, which is in cocos2dx/platform/android/?
I had the v2.1.3 now I downloaded v2.1.5 I updated project with the new lib and the method of main.cpp as here follows, is that all I have to do ?
If you copy cocos2dx java lib to your project, you need to maintain these files at all your project.
one day, if you make a change or add a new function in cocos2dx’s java file, you will know the reason.
And I upgrade to 2.2.1 now, The new situation on my HTC new one is my game will crash directly when I try to test my game via eclipse ADB,
But work fine if I run directly (not via Eclipse & ADB). and another device (Like Motorola MZ604 and ASUS pad…) will run normal via eclipse ADB.
I don’t know what’s the reason, But HTC new one is Android 4.3 and resolution is 1920 * 1080.