File: video.h

package info (click to toggle)
nestopia 1.47-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 9,588 kB
  • ctags: 16,847
  • sloc: cpp: 84,994; xml: 26,919; ansic: 1,490; makefile: 606; sh: 20
file content (65 lines) | stat: -rw-r--r-- 1,367 bytes parent folder | download
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
61
62
63
64
65
#ifndef _VIDEO_H_
#define _VIDEO_H_

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

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

// This is part of an elaborate hack to embed the SDL window
struct SDL_Window {
	const void *magic;
	Uint32 id;
	char *title;
	SDL_Surface *icon;
	int x, y;
	int w, h;
	int min_w, min_h;
	int max_w, max_h;
	Uint32 flags;
};
typedef struct SDL_Window SDL_Window;
//

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

void ogl_init();
void ogl_deinit();
void ogl_render();

void video_init();
void video_create_standalone();
void video_create_embedded();
void video_create();
void video_swapbuffers();
void video_destroy();
void video_toggle_fullscreen();
void video_toggle_filter();
void video_toggle_filterupdate();
void video_toggle_scalefactor();
void video_set_filter();
void video_set_dimensions();
void video_set_cursor();
void video_set_title(const char *title);

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 video_text_draw(const char *text, int xpos, int ypos);
void video_text_match(const char *text, int *xpos, int *ypos, int strpos);

#endif