PCem
view src/device.h @ 133:24b744b9a632
ViRGE S3D triangle rendering now uses worker thread.
Fixed clipping bug on ViRGE.
Fixed status window crash.
| author | TomW |
|---|---|
| date | Tue Jul 22 21:10:39 2014 +0100 |
| parents | f749363ad763 |
| children |
line source
1 #define CONFIG_STRING 0
2 #define CONFIG_INT 1
3 #define CONFIG_BINARY 2
4 #define CONFIG_SELECTION 3
6 typedef struct device_config_selection_t
7 {
8 char description[256];
9 int value;
10 } device_config_selection_t;
12 typedef struct device_config_t
13 {
14 char name[256];
15 char description[256];
16 int type;
17 char default_string[256];
18 int default_int;
19 device_config_selection_t selection[16];
20 } device_config_t;
22 typedef struct device_t
23 {
24 char name[50];
25 uint32_t flags;
26 void *(*init)();
27 void (*close)(void *p);
28 int (*available)();
29 void (*speed_changed)(void *p);
30 void (*force_redraw)(void *p);
31 void (*add_status_info)(char *s, int max_len, void *p);
32 device_config_t *config;
33 } device_t;
35 void device_init();
36 void device_add(device_t *d);
37 void device_close_all();
38 int device_available(device_t *d);
39 void device_speed_changed();
40 void device_force_redraw();
41 char *device_add_status_info(char *s, int max_len);
43 int device_get_config_int(char *name);
44 char *device_get_config_string(char *name);
46 enum
47 {
48 DEVICE_NOT_WORKING = 1 /*Device does not currently work correctly and will be disabled in a release build*/
49 };
