diff options
author | Jim Carroll <thecarrolls@jiminger.com> | 2012-09-17 23:19:19 -0400 |
---|---|---|
committer | Jim Carroll <thecarrolls@jiminger.com> | 2012-09-17 23:37:35 -0400 |
commit | 14441208adf1485c646077f909f39c6d81fb92c7 (patch) | |
tree | e2779187a1156965549bc859a7a0b7848a3b2be4 | |
parent | cd36870992ffb6c08c35453ae666523336341319 (diff) |
Use the newly separated MakePendingCalls and delayed call correctly in the sleep call.
-rw-r--r-- | xbmc/interfaces/legacy/ModuleXbmc.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/xbmc/interfaces/legacy/ModuleXbmc.cpp b/xbmc/interfaces/legacy/ModuleXbmc.cpp index e3bffe1a7a..de666591db 100644 --- a/xbmc/interfaces/legacy/ModuleXbmc.cpp +++ b/xbmc/interfaces/legacy/ModuleXbmc.cpp @@ -181,11 +181,17 @@ namespace XBMCAddon XbmcThreads::EndTime endTime(timemillis); while (!endTime.IsTimePast()) { - DelayedCallGuard dcguard; - long nextSleep = endTime.MillisLeft(); - if (nextSleep > 100) - nextSleep = 100; // only sleep for 100 millis - ::Sleep(nextSleep); + LanguageHook* lh = NULL; + { + DelayedCallGuard dcguard; + lh = dcguard.getLanguageHook(); // borrow this + long nextSleep = endTime.MillisLeft(); + if (nextSleep > 100) + nextSleep = 100; // only sleep for 100 millis + ::Sleep(nextSleep); + } + if (lh != NULL) + lh->makePendingCalls(); } } |