Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blackscreen on resume in Android #10

Open
Metin-Ljapo opened this issue Jan 30, 2016 · 4 comments
Open

Blackscreen on resume in Android #10

Metin-Ljapo opened this issue Jan 30, 2016 · 4 comments

Comments

@Metin-Ljapo
Copy link

When the menu button is pressed the app goes to the background. Then if the app is resumed, map and bob textures will not be rendered. This is caused by a NaN value in Bobs pos. When the app is resumed the first delta received is 0.0 and since there is a division by delta this will produce a NaN.

@jmimohsin
Copy link

Hi, I am facing same issue. Please provide any solution to fix this. I just want a clue to fix it and rest I will do myself. I am waiting for reply.

@Metin-Ljapo
Copy link
Author

Hi,

just make a 0 check where you have division by delta.
ex:

public void render(delta){

  if(delta > 0){
      drawStuff(delta);
  }

}

Br Metin

On Mon, Apr 18, 2016 at 9:22 AM, Md Mohsin [email protected] wrote:

Hi, I am facing same issue. Please provide any solution to fix this. I
just want a clue to fix it and rest I will do myself. I am waiting for
reply.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#10 (comment)

@jmimohsin
Copy link

But every time delta will be greater than 0. when game resume than it start from 0 or previous delta value? and how we can resume all previous state. Thanks for your reply.

@Metin-Ljapo
Copy link
Author

the game keeps its state, it will try to resume and instead of asking me
you can check the value of delta when you resume, if its 0 print something
out.

On Mon, Apr 18, 2016 at 10:20 AM, Md Mohsin [email protected]
wrote:

But every time delta will be greater than 0. when game resume than it
start from 0 or previous delta value? and how we can resume all previous
state. Thanks for your reply.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#10 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants