Henry's Media Fixes

This commit is contained in:
Siana Gearz
2010-11-11 22:00:01 +01:00
parent 5a49ceab6d
commit c06db583a2
11 changed files with 287 additions and 84 deletions

View File

@@ -203,6 +203,8 @@ int main(int argc, char **argv)
// see the missing heartbeat and log appropriately.
initExceptionHandler();
#elif LL_DARWIN || LL_LINUX
setpriority(PRIO_PROCESS, getpid(), 19);
if(argc < 2)
{
LL_ERRS("slplugin") << "usage: " << argv[0] << " launcher_port" << LL_ENDL;
@@ -236,6 +238,9 @@ int main(int argc, char **argv)
checkExceptionHandler();
#endif
#if LL_DARWIN
EventTargetRef event_target = GetEventDispatcherTarget();
#endif
while(!plugin->isDone())
{
timer.reset();
@@ -243,8 +248,12 @@ int main(int argc, char **argv)
#if LL_DARWIN
{
// Some plugins (webkit at least) will want an event loop. This qualifies.
EventRecord evt;
WaitNextEvent(0, &evt, 0, NULL);
EventRef event;
if(ReceiveNextEvent(0, 0, kEventDurationNoWait, true, &event) == noErr)
{
SendEventToEventTarget (event, event_target);
ReleaseEvent(event);
}
}
#endif
F64 elapsed = timer.getElapsedTimeF64();