File: video.h

package info (click to toggle)
nestopia 1.49-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 9,424 kB
  • sloc: cpp: 86,935; xml: 26,956; makefile: 1,515; ansic: 772; sh: 19
file content (60 lines) | stat: -rw-r--r-- 1,419 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef _VIDEO_H_
#define _VIDEO_H_

#define TV_WIDTH 292
#define PAL_TV_WIDTH 320
#define OVERSCAN_LEFT 0
#define OVERSCAN_RIGHT 0
#define OVERSCAN_BOTTOM 8
#define OVERSCAN_TOP 8

#define VIDBUF_MAXSIZE 31457280

#include <epoxy/gl.h>
#ifdef _APPLE
#include <OpenGL/gl.h>
#endif

typedef struct {
	int w;
	int h;
} dimensions_t;

typedef struct {
	int xpos;
	int ypos;
	char textbuf[32];
	char timebuf[6];
	int drawtext;
	bool drawtime;
	bool bg;
} osdtext_t;

void nst_ogl_init();
void nst_ogl_deinit();
void nst_ogl_render();

void video_init();
void video_toggle_fullscreen();
void video_toggle_filter();
void video_toggle_filterupdate();
void video_toggle_scalefactor();
void video_set_filter();

dimensions_t nst_video_get_dimensions_render();
dimensions_t nst_video_get_dimensions_screen();
void nst_video_set_dimensions_screen(dimensions_t scrsize);
void video_set_dimensions();

long video_lock_screen(void*& ptr);
void video_unlock_screen(void*);
void video_screenshot(const char* filename);
void video_clear_buffer();
void video_disp_nsf();
void nst_video_disp_inputconf(int type, int pnum, int bnum);
void nst_video_print(const char *text, int xpos, int ypos, int seconds, bool bg);
void nst_video_print_time(const char *timebuf, bool drawtime);
void nst_video_text_draw(const char *text, int xpos, int ypos, bool bg);
void nst_video_text_match(const char *text, int *xpos, int *ypos, int strpos);

#endif