Ticket #1753: mythmediamonitor.cpp.2.patch
File mythmediamonitor.cpp.2.patch, 1.1 KB (added by , 19 years ago) |
---|
-
mythmediamonitor.cpp
25 25 #include <qdir.h> 26 26 #include <qfile.h> 27 27 28 #ifdef Q_OS_MACX 29 #include "mythmediamonitor-darwin.h" 30 #endif // Q_OS_MACX 31 28 32 // MythTV headers 29 33 #include "mythmediamonitor.h" 30 34 #include "mythcontext.h" … … 69 73 // loop and check it's devices. 70 74 void MonitorThread::run(void) 71 75 { 76 #ifdef Q_OS_MACX 77 registerDiskArbitrationCallbacks(); 78 #endif // Q_OS_MACX 72 79 while (m_Monitor && m_Monitor->IsActive()) 73 80 { 74 81 m_Monitor->CheckDevices(); 82 #ifdef Q_OS_MACX 83 // Run the run loop for interval (milliseconds) - this will handle any disk arbitration 84 // appeared/dissappeared events 85 CFRunLoopRunInMode(kCFRunLoopDefaultMode, (float) m_Interval / 1000.0f, false ); 86 #else 75 87 msleep(m_Interval); 88 #endif // Q_OS_MACX 76 89 } 90 #ifdef Q_OS_MACX 91 unregisterDiskArbitrationCallbacks(); 92 #endif // Q_OS_MACX 77 93 } 78 94 79 95 ////////////////////////////////////////////////////////////////////////