Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 790 Bytes

detect_mice.c

File metadata and controls

36 lines (29 loc) · 790 Bytes
 
Jun 27, 2005
Jun 27, 2005
2
* A test file for ManyMouse that lists all seen mice.
Jul 28, 2008
Jul 28, 2008
4
* Please see the file LICENSE.txt in the source's root directory.
5
6
7
8
9
10
11
12
*
* This file written by Ryan C. Gordon.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Jun 27, 2005
Jun 27, 2005
13
#include "manymouse.h"
14
15
16
int main(int argc, char **argv)
{
Aug 9, 2012
Aug 9, 2012
17
18
19
20
21
const int available_mice = ManyMouse_Init();
if (available_mice < 0)
printf("ManyMouse failed to initialize!\n");
else if (available_mice == 0)
22
23
24
25
printf("No mice detected!\n");
else
{
int i;
Apr 26, 2011
Apr 26, 2011
26
printf("ManyMouse driver: %s\n", ManyMouse_DriverName());
27
for (i = 0; i < available_mice; i++)
Jun 27, 2005
Jun 27, 2005
28
printf("#%d: %s\n", i, ManyMouse_DeviceName(i));
Aug 9, 2012
Aug 9, 2012
30
Jun 27, 2005
Jun 27, 2005
31
ManyMouse_Quit();
Apr 26, 2011
Apr 26, 2011
32
33
return 0;
} /* main */
34
35
/* end of detect_mice.c ... */