java - Timer not resuming after game loosing focus -


i have recurring task. schedule in standard way (timer libgdx one: com.badlogic.gdx.utils.timer):

timer.schedule(mytask, 2, 2);  

when user wants pause game, call:

timer.instance().stop(); 

to pause execution of task. when user resumes game call:

timer.instance().start(); 

this works well, if user:

  1. pauses game
  2. makes game loose focus (e.g, focusing on different window)
  3. resumes game

    the task never fired again. ideas how can solved?

update

i've opened issue possible bug in libgdx: https://github.com/libgdx/libgdx/issues/3181

turns out indeed bug in libgdx. fixed , issue gone (i'm using libgdx 1.6.2-snapshot version).

thanks go great team of libgdx!


Comments

Popular posts from this blog

angularjs - Redirect to a new template in angular js -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

Desktop Launcher for Python Script Starts Program in Wrong Path (Linux) -