Skip to content

Commit

Permalink
[ios] fixed, do not call stop directly, send a message to quit so the…
Browse files Browse the repository at this point in the history
… quit happens in a controlled way and in the right thread context
  • Loading branch information
davilla committed Nov 26, 2011
1 parent 8649a2d commit 010b6d6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions xbmc/osx/atv2/XBMCEAGLView.mm
Expand Up @@ -238,7 +238,10 @@ - (void) stopAnimation
[self deinitDisplayLink];
animating = FALSE;
if (!g_application.m_bStop)
g_application.Stop(0);
{
ThreadMessage tMsg = {TMSG_QUIT};
g_application.getApplicationMessenger().SendMessage(tMsg);
}
// wait for animation thread to die
if ([animationThread isFinished] == NO)
[animationThreadLock lockWhenCondition:TRUE];
Expand Down Expand Up @@ -301,8 +304,8 @@ - (void) runAnimation:(id) arg
// reload Lowtide/AppleTV, boo.
[g_xbmcController enableScreenSaver];
[g_xbmcController enableSystemSleep];
exit(0);
//[g_xbmcController applicationDidExit];
exit(0);
}

//--------------------------------------------------------------
Expand Down
7 changes: 5 additions & 2 deletions xbmc/osx/ios/XBMCEAGLView.mm
Expand Up @@ -262,7 +262,10 @@ - (void) stopAnimation
[self deinitDisplayLink];
animating = FALSE;
if (!g_application.m_bStop)
g_application.Stop(0);
{
ThreadMessage tMsg = {TMSG_QUIT};
g_application.getApplicationMessenger().SendMessage(tMsg);
}
// wait for animation thread to die
if ([animationThread isFinished] == NO)
[animationThreadLock lockWhenCondition:TRUE];
Expand Down Expand Up @@ -326,8 +329,8 @@ - (void) runAnimation:(id) arg
// reload Lowtide/AppleTV, boo.
[g_xbmcController enableScreenSaver];
[g_xbmcController enableSystemSleep];
exit(0);
//[g_xbmcController applicationDidExit];
exit(0);
}

//--------------------------------------------------------------
Expand Down

0 comments on commit 010b6d6

Please sign in to comment.