File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -1158,7 +1158,7 @@ elseif(Haiku)
11581158        src/detection/gamepad/gamepad_nosupport.c
11591159        src/detection/media/media_linux.c
11601160        src/detection/memory/memory_haiku.c
1161-         src/detection/mouse/mouse_nosupport.c 
1161+         src/detection/mouse/mouse_haiku.cpp 
11621162        src/detection/netio/netio_nosupport.c
11631163        src/detection/opengl/opengl_linux.c
11641164        src/detection/os/os_haiku.c
Original file line number Diff line number Diff line change 1+ extern  " C"   {
2+ #include  " mouse.h" 
3+ #include  " common/io/io.h" 
4+ }
5+ 
6+ #include  < interface/Input.h> 
7+ #include  < support/List.h> 
8+ 
9+ const  char * ffDetectMouse (FFlist* devices /*  List of FFMouseDevice */  )
10+ {
11+     BList list;
12+     BInputDevice *device;
13+ 
14+     if  (get_input_devices (&list) != B_OK)
15+     {
16+         return  " get_input_devices() failed"  ;
17+     }
18+ 
19+     int32 i, n = list.CountItems ();
20+     for  (i = 0 ; i < n; i++)
21+     {
22+         device = (BInputDevice *) list.ItemAt (i);
23+         if  (device->Type () != B_POINTING_DEVICE)
24+             continue ;
25+ 
26+         FF_STRBUF_AUTO_DESTROY name = ffStrbufCreateS (device->Name ());
27+         if  (!device->IsRunning ())
28+             ffStrbufAppendS (&name, "  (stopped)"  );
29+ 
30+         FFMouseDevice* device = (FFMouseDevice*) ffListAdd (devices);
31+         ffStrbufInit (&device->serial );
32+         ffStrbufInitMove (&device->name , &name);
33+     }
34+ 
35+     return  NULL ;
36+ }
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments