rename vout_fb to vout_pl
[pcsx_rearmed.git] / frontend / plugin_lib.h
... / ...
CommitLineData
1
2enum {
3 DKEY_SELECT = 0,
4 DKEY_L3,
5 DKEY_R3,
6 DKEY_START,
7 DKEY_UP,
8 DKEY_RIGHT,
9 DKEY_DOWN,
10 DKEY_LEFT,
11 DKEY_L2,
12 DKEY_R2,
13 DKEY_L1,
14 DKEY_R1,
15 DKEY_TRIANGLE,
16 DKEY_CIRCLE,
17 DKEY_CROSS,
18 DKEY_SQUARE,
19};
20extern int in_type1, in_type2;
21extern int in_keystate, in_state_gun, in_a1[2], in_a2[2];
22extern int in_adev[2], in_adev_axis[2][2];
23extern int in_enable_vibration;
24
25extern void *pl_vout_buf;
26
27void pl_text_out16(int x, int y, const char *texto, ...);
28void pl_start_watchdog(void);
29void *pl_prepare_screenshot(int *w, int *h, int *bpp);
30void pl_init(void);
31void pl_print_hud(int w, int h, int xborder);
32
33void pl_timing_prepare(int is_pal);
34void pl_frame_limit(void);
35
36void pl_update_gun(int *xn, int *xres, int *y, int *in);
37
38struct rearmed_cbs {
39 void (*pl_get_layer_pos)(int *x, int *y, int *w, int *h);
40 int (*pl_vout_open)(void);
41 void *(*pl_vout_set_mode)(int w, int h, int bpp);
42 void *(*pl_vout_flip)(void);
43 void (*pl_vout_close)(void);
44 // these are only used by some frontends
45 void (*pl_vout_raw_flip)(int x, int y);
46 void (*pl_vout_set_raw_vram)(void *vram);
47 // some stats, for display by some plugins
48 int flips_per_sec, cpu_usage;
49 float vsps_cur; // currect vsync/s
50 // gpu options
51 int frameskip;
52 int fskip_advice;
53 unsigned int *gpu_frame_count;
54 unsigned int *gpu_hcnt;
55 unsigned int flip_cnt; // increment manually if not using pl_vout_flip
56 unsigned int screen_w, screen_h; // gles plugin wants this
57 struct {
58 int allow_interlace; // 0 off, 1 on, 2 guess
59 } gpu_neon;
60 struct {
61 int iUseDither;
62 int dwActFixes;
63 float fFrameRateHz;
64 int dwFrameRateTicks;
65 } gpu_peops;
66 struct {
67 int abe_hack;
68 int no_light, no_blend;
69 int lineskip;
70 } gpu_unai;
71 struct {
72 int dwActFixes;
73 int bDrawDither, iFilterType, iFrameTexType;
74 int iUseMask, bOpaquePass, bAdvancedBlend, bUseFastMdec;
75 int iVRamSize, iTexGarbageCollection;
76 } gpu_peopsgl;
77};
78
79extern struct rearmed_cbs pl_rearmed_cbs;
80
81#ifndef ARRAY_SIZE
82#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
83#endif