Ver código fonte

Fix warning when closing while connected

Thomas Buck 9 anos atrás
pai
commit
6c1ae8b8c7

BIN
SerialGamepad.xcodeproj/project.xcworkspace/xcuserdata/thomas.xcuserdatad/UserInterfaceState.xcuserstate Ver arquivo


+ 1
- 1
SerialGamepad/Info.plist Ver arquivo

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

+ 2
- 2
SerialGamepad/MainWindow.m Ver arquivo

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

Carregando…
Cancelar
Salvar