Skip to content

Commit

Permalink
Android Flickering Bug Fix
Browse files Browse the repository at this point in the history
When the new Activity is launched the screen starts flickering (Two
nearest frames are replacing each other all the time). This fix stops
flickering. More: http://www.cocos2d-x.org/forums/6/topics/34686
  • Loading branch information
Andriy Chaika committed Feb 10, 2014
1 parent f9f44f2 commit 9b948d9
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ public void setCocos2dxEditText(final Cocos2dxEditText pCocos2dxEditText) {
@Override
public void onResume() {
super.onResume();


this.setRenderMode(RENDERMODE_CONTINUOUSLY);

this.queueEvent(new Runnable() {
@Override
public void run() {
Expand All @@ -175,7 +177,9 @@ public void run() {
Cocos2dxGLSurfaceView.this.mCocos2dxRenderer.handleOnPause();
}
});


this.setRenderMode(RENDERMODE_WHEN_DIRTY);

//super.onPause();
}

Expand Down

3 comments on commit 9b948d9

@yihuang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much, just met this problem a few days ago, then you solved it for me, you are my life saver.

@RajanMaheshwari
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i also experienced the same problem and did the fix as mentioned above..but what if the net is very slow and trying to connect. In my case the net is continuously trying to connect.When I press back key the account screen come and then i click on cancel.But still i cant touch any of my cocos2dx button there and the screen view is still on google.How can i solve that problem. I just want a timeout if net doesnt connect in 10 seconds.

@seagullua
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rajan1990 I think that the problem is in cancel button implementation as it not returns to cocos2d. This fix can not have any influence on the situation you are describing.

Please sign in to comment.