LunarLander - IllegalThreadStateException

Ever wondered why LunarLander sample crushes on loosing focus (for example, when receiving a phone call)?
That "feature" bugged me for few hours, until I gave up and googled similar questions on stackoverflow.com.

It turned out that fix was very small, here is the code I've used in Gomoku Master:

  public void surfaceCreatedSurfaceHolder holder ) {
    if fThread.getState() == Thread.State.TERMINATED ) {
      fThread = new DrawThreadgetHolder(), FiveInARow.getContext() );
    fThread.setRunningtrue );

No comments:

Post a Comment