Browse Source

Fix warning when closing while connected

Thomas Buck 9 years ago
parent
commit
6c1ae8b8c7

BIN
SerialGamepad.xcodeproj/project.xcworkspace/xcuserdata/thomas.xcuserdatad/UserInterfaceState.xcuserstate View File


+ 1
- 1
SerialGamepad/Info.plist View File

21
 	<key>CFBundleSignature</key>
21
 	<key>CFBundleSignature</key>
22
 	<string>????</string>
22
 	<string>????</string>
23
 	<key>CFBundleVersion</key>
23
 	<key>CFBundleVersion</key>
24
-	<string>98</string>
24
+	<string>100</string>
25
 	<key>LSApplicationCategoryType</key>
25
 	<key>LSApplicationCategoryType</key>
26
 	<string>public.app-category.utilities</string>
26
 	<string>public.app-category.utilities</string>
27
 	<key>LSMinimumSystemVersion</key>
27
 	<key>LSMinimumSystemVersion</key>

+ 2
- 2
SerialGamepad/MainWindow.m View File

29
 
29
 
30
 - (BOOL)windowShouldClose:(id)sender {
30
 - (BOOL)windowShouldClose:(id)sender {
31
     if (serialThread != nil) {
31
     if (serialThread != nil) {
32
-        [fooHID close];
33
-        
34
         // Stop thread and wait for it to finish
32
         // Stop thread and wait for it to finish
35
         [serialThread setRunning:NO];
33
         [serialThread setRunning:NO];
36
         while ([serialThread isFinished] == NO) {
34
         while ([serialThread isFinished] == NO) {
37
             usleep(1000);
35
             usleep(1000);
38
         }
36
         }
37
+        serialThread = nil;
38
+        [fooHID close];
39
     }
39
     }
40
     
40
     
41
     return YES;
41
     return YES;

Loading…
Cancel
Save