add watchdog thread to detect lockups
[pcsx_rearmed.git] / frontend / plugin_lib.h
1
2 extern int keystate;
3 enum {
4         DKEY_SELECT = 0,
5         DKEY_L3,
6         DKEY_R3,
7         DKEY_START,
8         DKEY_UP,
9         DKEY_RIGHT,
10         DKEY_DOWN,
11         DKEY_LEFT,
12         DKEY_L2,
13         DKEY_R2,
14         DKEY_L1,
15         DKEY_R1,
16         DKEY_TRIANGLE,
17         DKEY_CIRCLE,
18         DKEY_CROSS,
19         DKEY_SQUARE,
20 };
21
22 extern void *pl_fbdev_buf;
23
24 int   pl_fbdev_open(void);
25 void *pl_fbdev_set_mode(int w, int h, int bpp);
26 void *pl_fbdev_flip(void);
27 void  pl_fbdev_close(void);
28
29 void pl_text_out16(int x, int y, const char *texto, ...);
30 void pl_start_watchdog(void);
31
32 struct rearmed_cbs {
33         void  (*pl_get_layer_pos)(int *x, int *y, int *w, int *h);
34         int   (*pl_fbdev_open)(void);
35         void *(*pl_fbdev_set_mode)(int w, int h, int bpp);
36         void *(*pl_fbdev_flip)(void);
37         void  (*pl_fbdev_close)(void);
38         int  *fskip_option;
39 };
40
41 extern const struct rearmed_cbs pl_rearmed_cbs;
42
43 extern int pl_frame_interval;
44
45 #ifndef ARRAY_SIZE
46 #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
47 #endif