summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/render/drawnone.cpp
blob: 08bd81666cabf05f6c58c393aeac3b320d475f31 (plain) (blame)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// license:BSD-3-Clause
// copyright-holders:Aaron Giles
//============================================================
//
//  drawnone.c - stub "nothing" drawer
//
//============================================================

// standard windows headers
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

// MAME headers
#include "emu.h"

// MAMEOS headers
#include "window.h"


class renderer_none : public osd_renderer
{
public:
	renderer_none(osd_window *window)
	: osd_renderer(window, FLAG_NONE) { }

	virtual ~renderer_none() { }

	virtual int create();
	virtual render_primitive_list *get_primitives();
	virtual int draw(const int update);
	virtual void save() { };
	virtual void record() { };
	virtual void toggle_fsfx() { };
	virtual void destroy();
};

//============================================================
//  PROTOTYPES
//============================================================

// core functions
static void drawnone_exit(void);

//============================================================
//  drawnone_create
//============================================================

osd_renderer *drawnone_create(osd_window *window)
{
	return global_alloc(renderer_none(window));
}

//============================================================
//  drawnone_init
//============================================================

int drawnone_init(running_machine &machine, osd_draw_callbacks *callbacks)
{
	// fill in the callbacks
	memset(callbacks, 0, sizeof(*callbacks));
	callbacks->exit = drawnone_exit;
	callbacks->create = drawnone_create;
	return 0;
}



//============================================================
//  drawnone_exit
//============================================================

static void drawnone_exit(void)
{
}



//============================================================
//  drawnone_window_init
//============================================================

int renderer_none::create()
{
	return 0;
}



//============================================================
//  drawnone_window_destroy
//============================================================

void renderer_none::destroy()
{
}



//============================================================
//  drawnone_window_get_primitives
//============================================================

render_primitive_list *renderer_none::get_primitives()
{
	RECT client;
	GetClientRect(window().m_hwnd, &client);
	window().target()->set_bounds(rect_width(&client), rect_height(&client), window().aspect());
	return &window().target()->get_primitives();
}



//============================================================
//  drawnone_window_draw
//============================================================

int renderer_none::draw(const int update)
{
	return 0;
}