Search
lxdream.org :: lxdream/src/drivers/osx_iokit.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/osx_iokit.c
changeset 758:99ae000d4e09
prev736:a02d1475ccfd
next759:f16975739abc
author nkeynes
date Mon Jul 21 00:37:13 2008 +0000 (13 years ago)
permissions -rw-r--r--
last change Fix compiler warnings
file annotate diff log raw
1.1 --- a/src/drivers/osx_iokit.c Mon Jul 14 07:44:42 2008 +0000
1.2 +++ b/src/drivers/osx_iokit.c Mon Jul 21 00:37:13 2008 +0000
1.3 @@ -19,15 +19,19 @@
1.4 * GNU General Public License for more details.
1.5 */
1.6
1.7 +#include <glib/gmem.h>
1.8 #include <sys/param.h>
1.9 #include <paths.h>
1.10 #include <string.h>
1.11 #include <stdio.h>
1.12 #include <fcntl.h>
1.13 +#include <CoreFoundation/CFRunLoop.h>
1.14 #include <IOKit/IOMessage.h>
1.15 #include <IOKit/hid/IOHIDLib.h>
1.16 #include "osx_iokit.h"
1.17
1.18 +
1.19 +
1.20 static IONotificationPortRef notify_port = 0;
1.21 static io_iterator_t iokit_iterators[4] = {0,0,0,0};
1.22
1.23 @@ -315,7 +319,7 @@
1.24 {
1.25 notify_port = IONotificationPortCreate( kIOMasterPortDefault );
1.26 CFRunLoopSourceRef runloop_source = IONotificationPortGetRunLoopSource( notify_port );
1.27 - CFRunLoopAddSource( CFRunLoopGetMain(), runloop_source, kCFRunLoopCommonModes );
1.28 + CFRunLoopAddSource( CFRunLoopGetCurrent(), runloop_source, kCFRunLoopCommonModes );
1.29
1.30 // Drive notifications
1.31 if( IOServiceAddMatchingNotification( notify_port, kIOFirstPublishNotification,
1.32 @@ -342,7 +346,7 @@
1.33 void osx_unregister_iokit_notifications()
1.34 {
1.35 CFRunLoopSourceRef runloop_source = IONotificationPortGetRunLoopSource( notify_port );
1.36 - CFRunLoopRemoveSource( CFRunLoopGetMain(), runloop_source, kCFRunLoopCommonModes );
1.37 + CFRunLoopRemoveSource( CFRunLoopGetCurrent(), runloop_source, kCFRunLoopCommonModes );
1.38 IONotificationPortDestroy( notify_port );
1.39 notify_port = 0;
1.40 }
.