Ticket #1753: mythmediamonitor.cpp.2.patch

File mythmediamonitor.cpp.2.patch, 1.1 KB (added by awk@…, 14 years ago)

mythmediamonitor.cpp.patch V2 - 'cleanup' removes some Mac OS X header dependancies

  • mythmediamonitor.cpp

     
    2525#include <qdir.h>
    2626#include <qfile.h>
    2727
     28#ifdef Q_OS_MACX
     29#include "mythmediamonitor-darwin.h"
     30#endif // Q_OS_MACX
     31
    2832// MythTV headers
    2933#include "mythmediamonitor.h"
    3034#include "mythcontext.h"
     
    6973// loop and check it's devices.
    7074void MonitorThread::run(void)
    7175{
     76#ifdef Q_OS_MACX
     77    registerDiskArbitrationCallbacks();
     78#endif // Q_OS_MACX
    7279    while (m_Monitor && m_Monitor->IsActive())       
    7380    {
    7481        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
    7587        msleep(m_Interval);
     88#endif // Q_OS_MACX
    7689    }
     90#ifdef Q_OS_MACX
     91    unregisterDiskArbitrationCallbacks();
     92#endif // Q_OS_MACX
    7793}
    7894
    7995////////////////////////////////////////////////////////////////////////