title: Delphi XE8 TThread Frozen on Android, but works on Windows
body: <p>I use one thread and a synchronized procedure for a simple game loop.
  On my computer, Windows 7, it works as a charm but when I run it on my android device and after I click play and the thread starts the screen goes black or sometimes dim, and sometimes it stays normal but all objects visible on screen either stretch or fail to render properly; at this point the thread seems to be frozen (The music from the main form still continue to play).</p>
  
  <p>Here is the thread itself:</p>
  
  <pre><code>procedure TTheThread.Loop;
  begin
    MainForm.GameLoop;
  end;
  
  procedure TTheThread.Execute;
  begin
  
      while NOT Terminated do 
      begin
        Application.ProcessMessages;
  
        TC:= TStopwatch.GetTimeStamp;
  
        //The Following repeats itself every second:    
        if TC&gt;(TCTime+10000000) then
        begin
          TCTime:= TStopwatch.GetTimeStamp;
          TimeT:= TimeT+1; //Time in seconds
  
          //Increasing game playing speed:
          Gravity:= Gravity + 0.0075 * DEF;
          PJump:= PJump+IncJump
        end;
  
        //...just to have it on screen:
        With MainForm do
        Label1.Text:= IntToStr(TC);
  
        //This seems to make the loop run smooth and without lagging on my PC:    
        if TC&gt;(TCLast) then
        begin
          Synchronize(Loop);
          TCLast:= TC;
        end;
  
      end;
  
  end;
  </code></pre>
  
  <p>This is how it starts:</p>
  
  <pre><code>  TCTime:= TStopwatch.GetTimeStamp;
    TCLast:= TCTime;
  
    GameThread:= TTheThread.Create(True);
    GameThread.FreeOnTerminate:= True;
    GameThread.Start;
  </code></pre>