aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Carroll <thecarrolls@jiminger.com>2012-09-17 23:19:19 -0400
committerJim Carroll <thecarrolls@jiminger.com>2012-09-17 23:37:35 -0400
commit14441208adf1485c646077f909f39c6d81fb92c7 (patch)
treee2779187a1156965549bc859a7a0b7848a3b2be4
parentcd36870992ffb6c08c35453ae666523336341319 (diff)
Use the newly separated MakePendingCalls and delayed call correctly in the sleep call.
-rw-r--r--xbmc/interfaces/legacy/ModuleXbmc.cpp16
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();
}
}