annotate libvo/vo_xmga.c @ 36730:8bc4d669c5d7

Enable option font_encoding without freetype. subtitle_font_encoding is now also used when freetype is disabled. This is corresponding to r36825, although the GUI doesn't support changing the option through the preferences in this case (but it's in gui.conf at least).
author ib
date Thu, 13 Feb 2014 10:41:33 +0000
parents 5d3f93051de9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
28446
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
1 /*
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
2 * copyright (C) 2001 Zoltan Ponekker
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
3 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
4 * This file is part of MPlayer.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
5 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
6 * MPlayer is free software; you can redistribute it and/or modify
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
7 * it under the terms of the GNU General Public License as published by
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
9 * (at your option) any later version.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
10 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
11 * MPlayer is distributed in the hope that it will be useful,
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
14 * GNU General Public License for more details.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
15 *
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
16 * You should have received a copy of the GNU General Public License along
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
17 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
7681eab10aea Add standard license headers, unify header formatting.
diego
parents: 27927
diff changeset
19 */
100
201c2f931497 added #define SHOW_TIME option... (debug)
arpi_esp
parents: 56
diff changeset
20
201c2f931497 added #define SHOW_TIME option... (debug)
arpi_esp
parents: 56
diff changeset
21 //#define SHOW_TIME
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
22
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
23 #include <stdio.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
24 #include <stdlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
25 #include <string.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
26
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
27 #include "config.h"
34174
a93891202051 Add missing mp_msg.h #includes, remove some unnecessary ones.
diego
parents: 32467
diff changeset
28 #include "mp_msg.h"
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
29 #include "video_out.h"
36517
5d3f93051de9 Remove empty draw_slice and draw_frame stubs.
reimar
parents: 34174
diff changeset
30 #define NO_DRAW_FRAME
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
31 #include "video_out_internal.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
32
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
33
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
34 #include <sys/ioctl.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
35 #include <unistd.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
36 #include <fcntl.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
37 #include <sys/mman.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
38
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
39 #include "drivers/mga_vid.h"
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
40
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
41 #include <X11/Xlib.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
42 #include <X11/Xutil.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
43 #include <errno.h>
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
44
27377
d58d06eafe83 Change a bunch of X11-specific preprocessor directives.
diego
parents: 27343
diff changeset
45 #ifdef CONFIG_XINERAMA
4017
21a75ab24703 Xinerama patch number two by attila.
atmos4
parents: 3990
diff changeset
46 #include <X11/extensions/Xinerama.h>
21a75ab24703 Xinerama patch number two by attila.
atmos4
parents: 3990
diff changeset
47 #endif
21a75ab24703 Xinerama patch number two by attila.
atmos4
parents: 3990
diff changeset
48
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
49 #include "x11_common.h"
32467
fbe5c829c69b Move libvo/sub.[ch] from libvo to sub.
cigaes
parents: 32372
diff changeset
50 #include "sub/sub.h"
2057
378aed6b232d Use aspect()
atmos4
parents: 2039
diff changeset
51 #include "aspect.h"
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
52
182
80a7b40f201a *** empty log message ***
pontscho
parents: 120
diff changeset
53 #ifdef SHOW_TIME
13787
e047e70a9767 Handle "xxx.h" vs "../xxx.h" include paths in a consistent way.
diego
parents: 13056
diff changeset
54 #include "osdep/timer.h"
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
55 static unsigned int timer = 0;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
56 static unsigned int timerd = 0;
100
201c2f931497 added #define SHOW_TIME option... (debug)
arpi_esp
parents: 56
diff changeset
57 #endif
201c2f931497 added #define SHOW_TIME option... (debug)
arpi_esp
parents: 56
diff changeset
58
25216
3aee342be929 Make vo info structs const
reimar
parents: 24348
diff changeset
59 static const vo_info_t info = {
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
60 "Matrox G200/G4x0/G550 overlay in X11 window (using /dev/mga_vid)",
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
61 "xmga",
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
62 "Zoltan Ponekker <pontscho@makacs.poliod.hu>",
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
63 ""
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
64 };
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
65
25220
c9e9ac2008c2 Mark the vo_functions_t definitions as const where possible.
reimar
parents: 25216
diff changeset
66 const LIBVO_EXTERN(xmga)
8148
5b39e79af5fe removed get_info, using the same sheme as in libmpcodecs instead
alex
parents: 8017
diff changeset
67
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
68 static uint32_t mDepth;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
69 static XWindowAttributes attribs;
10988
c2bff70784d5 user settable colorkey
alex
parents: 10729
diff changeset
70 static int colorkey;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
71
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
72 static uint32_t mvHeight;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
73 static uint32_t mvWidth;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
74
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
75 static XSetWindowAttributes xWAttribs;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
76
25962
afa125da85cf typo fix: inited --> initialized
diego
parents: 25220
diff changeset
77 static int initialized = 0;
6311
da2dda48b7ec add mute support ( step 1 ) and fixed panscan bugs (1000l for me)
pontscho
parents: 6307
diff changeset
78
4981
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4970
diff changeset
79 #define VO_XMGA
31364
317649676214 Rename libvo/mga_common.c --> libvo/mga_template.c.
diego
parents: 28446
diff changeset
80 #include "mga_template.c"
4981
bfc652fc7f43 rewrite fullscreen support in some libvo driver
pontscho
parents: 4970
diff changeset
81 #undef VO_XMGA
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
82
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
83 static void mDrawColorKey(void)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
84 {
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
85 XSetBackground(mDisplay, vo_gc, 0);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
86 XClearWindow(mDisplay, vo_window);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
87 XSetForeground(mDisplay, vo_gc, colorkey);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
88 XFillRectangle(mDisplay, vo_window, vo_gc, drwX, drwY, drwWidth,
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
89 (vo_fs ? drwHeight - 1 : drwHeight));
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
90 XFlush(mDisplay);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
91 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
92
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
93 static void check_events(void)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
94 {
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
95 int e = vo_x11_check_events(mDisplay);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
96
32370
79b1264388b3 Fix xmga event handling: Reconfigure hardware on move and resize,
reimar
parents: 32369
diff changeset
97 if (e & (VO_EVENT_RESIZE | VO_EVENT_MOVE))
79b1264388b3 Fix xmga event handling: Reconfigure hardware on move and resize,
reimar
parents: 32369
diff changeset
98 set_window();
79b1264388b3 Fix xmga event handling: Reconfigure hardware on move and resize,
reimar
parents: 32369
diff changeset
99 if (e & (VO_EVENT_RESIZE | VO_EVENT_EXPOSE))
79b1264388b3 Fix xmga event handling: Reconfigure hardware on move and resize,
reimar
parents: 32369
diff changeset
100 mDrawColorKey();
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
101 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
102
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
103 static void flip_page(void)
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
104 {
182
80a7b40f201a *** empty log message ***
pontscho
parents: 120
diff changeset
105 #ifdef SHOW_TIME
100
201c2f931497 added #define SHOW_TIME option... (debug)
arpi_esp
parents: 56
diff changeset
106 unsigned int t;
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
107
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
108 t = GetTimer();
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
109 mp_msg(MSGT_VO, MSGL_STATUS,
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
110 " [timer: %08X diff: %6d dd: %6d ] \n", t, t - timer,
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
111 (t - timer) - timerd);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
112 timerd = t - timer;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
113 timer = t;
182
80a7b40f201a *** empty log message ***
pontscho
parents: 120
diff changeset
114 #endif
100
201c2f931497 added #define SHOW_TIME option... (debug)
arpi_esp
parents: 56
diff changeset
115
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
116 vo_mga_flip_page();
31
1fc618eba830 added check_events() interface
arpi_esp
parents: 1
diff changeset
117 }
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
118
16171
fd51fd1ff231 Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents: 15540
diff changeset
119 static int config(uint32_t width, uint32_t height, uint32_t d_width,
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
120 uint32_t d_height, uint32_t flags, char *title,
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
121 uint32_t format)
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
122 {
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
123 XVisualInfo vinfo;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
124 unsigned long xswamask;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
125 int r, g, b;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
126
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
127 if (mga_init(width, height, format))
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
128 return -1; // ioctl errors?
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
129
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
130 mvWidth = width;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
131 mvHeight = height;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
132
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
133 r = (vo_colorkey & 0x00ff0000) >> 16;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
134 g = (vo_colorkey & 0x0000ff00) >> 8;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
135 b = vo_colorkey & 0x000000ff;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
136 switch (vo_depthonscreen)
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
137 {
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
138 case 32:
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
139 colorkey = vo_colorkey;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
140 break;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
141 case 24:
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
142 colorkey = vo_colorkey & 0x00ffffff;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
143 break;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
144 case 16:
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
145 colorkey = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
146 break;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
147 case 15:
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
148 colorkey = ((r >> 3) << 10) | ((g >> 3) << 5) | (b >> 3);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
149 break;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
150 default:
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
151 mp_msg(MSGT_VO, MSGL_ERR,
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
152 "Sorry, this (%d) color depth not supported.\n",
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
153 vo_depthonscreen);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
154 return -1;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
155 }
13946
e632b43f0598 Reduce excessive verbosity.
diego
parents: 13787
diff changeset
156 mp_msg(MSGT_VO, MSGL_V, "Using colorkey: %x\n", colorkey);
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
157
25962
afa125da85cf typo fix: inited --> initialized
diego
parents: 25220
diff changeset
158 initialized = 1;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
159
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
160 XGetWindowAttributes(mDisplay, mRootWin, &attribs);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
161 mDepth = attribs.depth;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
162 if (mDepth != 15 && mDepth != 16 && mDepth != 24 && mDepth != 32)
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
163 mDepth = 24;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
164 XMatchVisualInfo(mDisplay, mScreen, mDepth, TrueColor, &vinfo);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
165 xWAttribs.colormap =
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
166 XCreateColormap(mDisplay, mRootWin, vinfo.visual, AllocNone);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
167 xWAttribs.background_pixel = 0;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
168 xWAttribs.border_pixel = 0;
27927
6f199f065e15 Factor common code like -wid handling, vo_gc creation etc. out into
reimar
parents: 27903
diff changeset
169 xswamask = CWBackPixel | CWBorderPixel | CWColormap;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
170
23655
00aa61cde84a Make X11 window creation and (with -fixed-vo) management simpler and more
reimar
parents: 23077
diff changeset
171 vo_x11_create_vo_window(&vinfo, vo_dx, vo_dy, d_width, d_height,
23822
attila
parents: 23656
diff changeset
172 flags, xWAttribs.colormap, "xmga", title);
24348
f96e42d494f9 Fix borders for xmga broken by r23675. Tested by Diego.
reimar
parents: 23822
diff changeset
173 XChangeWindowAttributes(mDisplay, vo_window, xswamask, &xWAttribs);
7679
e4e70b0e1786 some cleanup
arpi
parents: 7472
diff changeset
174
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
175 mga_vid_config.colkey_on = 1;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
176 mga_vid_config.colkey_red = r;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
177 mga_vid_config.colkey_green = g;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
178 mga_vid_config.colkey_blue = b;
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
179
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
180 set_window(); // set up mga_vid_config.dest_width etc
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
181
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
182 XSync(mDisplay, False);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
183
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
184 ioctl(f, MGA_VID_ON, 0);
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
185
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
186 return 0;
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
187 }
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
188
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
189 static void uninit(void)
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
190 {
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
191 mp_msg(MSGT_VO, MSGL_V, "vo: uninit!\n");
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
192 mga_uninit();
25962
afa125da85cf typo fix: inited --> initialized
diego
parents: 25220
diff changeset
193 if (!initialized)
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
194 return; // no window?
25962
afa125da85cf typo fix: inited --> initialized
diego
parents: 25220
diff changeset
195 initialized = 0;
12582
162c80b2d432 major reindentation of x11 code try #2
attila
parents: 11542
diff changeset
196 vo_x11_uninit(); // destroy the window
1
3b5f5d1c5041 Initial revision
arpi_esp
parents:
diff changeset
197 }