Mercurial > mplayer.hg
annotate libvo/vo_ggi.c @ 37058:a6b7e61e4af1
Disable system DPI scaling on Windows.
We scale the video just fine (or rather, better)
ourselves.
The GUI might be in trouble here though, since it
does not want its video to be scaled by the OS but
it also isn't DPI aware either...
author | reimar |
---|---|
date | Sat, 19 Apr 2014 08:30:17 +0000 |
parents | ddb45e9443ec |
children |
rev | line source |
---|---|
1172
290353337b44
hardly modified, keyboard handling is ok. aspect implemented, but bugging :)
al3x
parents:
1148
diff
changeset
|
1 /* |
28446
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
2 * General Graphics Interface (GGI) vo driver |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
3 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
4 * copyright (C) 2001 Alex Beregszaszi |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
5 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
6 * Uses libGGI - http://www.ggi-project.org/ |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
7 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
8 * TODO: |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
9 * * implement gamma handling (VAA isn't obsoleted?) |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
10 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
11 * Thanks to Andreas Beck for his patches. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
12 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
13 * Many thanks to Atmosfear, he hacked this driver to work with planar |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
14 * formats, and he fixed the RGB handling. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
15 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
16 * This file is part of MPlayer. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
17 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
18 * MPlayer is free software; you can redistribute it and/or modify |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
19 * it under the terms of the GNU General Public License as published by |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
20 * the Free Software Foundation; either version 2 of the License, or |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
21 * (at your option) any later version. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
22 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
23 * MPlayer is distributed in the hope that it will be useful, |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
26 * GNU General Public License for more details. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
27 * |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
28 * You should have received a copy of the GNU General Public License along |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
29 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
30 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
7681eab10aea
Add standard license headers, unify header formatting.
diego
parents:
27365
diff
changeset
|
31 */ |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
32 |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
33 #include <stdio.h> |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
34 #include <stdlib.h> |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
35 #include <string.h> |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
36 #include <errno.h> |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
37 |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
38 #include "mp_msg.h" |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
39 |
12650
ac3fd2ff2561
Unify the config.h #include, use "config.h" instead of "../config.h"
diego
parents:
11110
diff
changeset
|
40 #include "config.h" |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
41 #include "video_out.h" |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
42 #include "video_out_internal.h" |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
43 |
22823
98eaf29b5dee
Code cleanup: don't include a .c file in mplayer.c and fix a few
rathann
parents:
16470
diff
changeset
|
44 #include "mp_fifo.h" |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
45 |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
46 #include <ggi/ggi.h> |
1141
c33f8b7488d1
cleaned up, and merged with my version, also code will be faster too
al3x
parents:
1132
diff
changeset
|
47 |
27365
13c920fdf7f5
Change a bunch of video-output-specific preprocessor directives from a HAVE_
diego
parents:
26755
diff
changeset
|
48 #ifdef CONFIG_GGIWMH |
15406 | 49 #include <ggi/wmh.h> |
50 #endif | |
51 | |
4831
9153d1275b6d
do not fault if no directbuffer available (for example: ggi display-multi)
alex
parents:
4830
diff
changeset
|
52 /* maximum buffers */ |
5703 | 53 #undef GGI_FLIP |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
54 |
25216 | 55 static const vo_info_t info = |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
56 { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
57 "General Graphics Interface (GGI) output", |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
58 "ggi", |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
59 "Alex Beregszaszi", |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
60 "major" |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
61 }; |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
62 |
25220
c9e9ac2008c2
Mark the vo_functions_t definitions as const where possible.
reimar
parents:
25216
diff
changeset
|
63 const LIBVO_EXTERN(ggi) |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
64 |
8148
5b39e79af5fe
removed get_info, using the same sheme as in libmpcodecs instead
alex
parents:
7124
diff
changeset
|
65 |
1172
290353337b44
hardly modified, keyboard handling is ok. aspect implemented, but bugging :)
al3x
parents:
1148
diff
changeset
|
66 static struct ggi_conf_s { |
290353337b44
hardly modified, keyboard handling is ok. aspect implemented, but bugging :)
al3x
parents:
1148
diff
changeset
|
67 char *driver; |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
68 |
1172
290353337b44
hardly modified, keyboard handling is ok. aspect implemented, but bugging :)
al3x
parents:
1148
diff
changeset
|
69 ggi_visual_t vis; |
16470 | 70 ggi_visual_t drawvis; |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
71 |
4830 | 72 /* source image format */ |
73 int srcwidth; | |
74 int srcheight; | |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
75 int srcformat; |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
76 int srcdepth; |
5703 | 77 int srcbpp; |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
78 |
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
79 /* dirty region */ |
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
80 struct { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
81 int x1, y1; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
82 int x2, y2; |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
83 } flushregion; |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
84 |
5703 | 85 int voflags; |
1172
290353337b44
hardly modified, keyboard handling is ok. aspect implemented, but bugging :)
al3x
parents:
1148
diff
changeset
|
86 } ggi_conf; |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
87 |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
88 |
27365
13c920fdf7f5
Change a bunch of video-output-specific preprocessor directives from a HAVE_
diego
parents:
26755
diff
changeset
|
89 #ifdef CONFIG_GGIWMH |
15406 | 90 static void window_ontop(void) |
91 { | |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
92 mp_msg(MSGT_VO, MSGL_V, "[ggi] debug: window_ontop() called\n"); |
16470 | 93 ggiWmhZOrder(ggi_conf.vis, ZO_TOP); |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
94 return; |
15406 | 95 } |
96 #endif | |
97 | |
98 | |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
99 static void set_graphtype(uint32_t format, ggi_mode *mode) |
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
100 { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
101 switch (format) { |
16426 | 102 case IMGFMT_RGB4: |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
103 mode->graphtype = GT_4BIT; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
104 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
105 case IMGFMT_BGR4: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
106 mode->graphtype = GT_4BIT; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
107 GT_SETSUBSCHEME(mode->graphtype, GT_SUB_HIGHBIT_RIGHT); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
108 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
109 case IMGFMT_RGB8: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
110 case IMGFMT_BGR8: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
111 mode->graphtype = GT_8BIT; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
112 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
113 case IMGFMT_RGB15: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
114 case IMGFMT_BGR15: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
115 mode->graphtype = GT_15BIT; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
116 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
117 case IMGFMT_RGB16: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
118 case IMGFMT_BGR16: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
119 mode->graphtype = GT_16BIT; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
120 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
121 case IMGFMT_RGB24: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
122 case IMGFMT_BGR24: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
123 mode->graphtype = GT_24BIT; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
124 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
125 case IMGFMT_RGB32: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
126 case IMGFMT_BGR32: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
127 mode->graphtype = GT_32BIT; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
128 break; |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
129 } |
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
130 |
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
131 return; |
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
132 } |
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
133 |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15406
diff
changeset
|
134 static int config(uint32_t width, uint32_t height, uint32_t d_width, |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
135 uint32_t d_height, uint32_t flags, char *title, |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
136 uint32_t format) |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
137 { |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
138 ggi_mode mode = { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
139 1, /* frames */ |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
140 {width, height}, /* visible */ |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
141 {GGI_AUTO, GGI_AUTO}, /* virt */ |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
142 {GGI_AUTO, GGI_AUTO}, /* size */ |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
143 GT_AUTO, /* graphtype */ |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
144 {GGI_AUTO, GGI_AUTO} /* dots per pixel */ |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
145 }; |
14021
f0236d5ba7a7
Remove broken support for directbuffer and including frame-handling use.
iive
parents:
13787
diff
changeset
|
146 |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
147 |
16470 | 148 set_graphtype(format, &mode); |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
149 |
5703 | 150 #if 0 |
4830 | 151 printf("[ggi] mode: "); |
15406 | 152 ggiPrintMode(&mode); |
153 printf("\n"); | |
4830 | 154 #endif |
155 | |
16470 | 156 ggiCheckMode(ggi_conf.vis, &mode); |
4830 | 157 |
16470 | 158 if (ggiSetMode(ggi_conf.vis, &mode) < 0) { |
16426 | 159 mp_msg(MSGT_VO, MSGL_ERR, "[ggi] unable to set display mode\n"); |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
160 return -1; |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
161 } |
16470 | 162 if (ggiGetMode(ggi_conf.vis, &mode) < 0) { |
16426 | 163 mp_msg(MSGT_VO, MSGL_ERR, "[ggi] unable to get display mode\n"); |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
164 return -1; |
1147 | 165 } |
16470 | 166 if ((mode.graphtype == GT_INVALID) |
167 || (mode.graphtype == GT_AUTO)) | |
4841 | 168 { |
16426 | 169 mp_msg(MSGT_VO, MSGL_ERR, "[ggi] not supported depth/bpp\n"); |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
170 return -1; |
4841 | 171 } |
172 | |
15406 | 173 #if 0 |
174 printf("[ggi] mode: "); | |
4830 | 175 ggiPrintMode(&mode); |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
176 printf("\n"); |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
177 #endif |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
178 |
16470 | 179 |
27365
13c920fdf7f5
Change a bunch of video-output-specific preprocessor directives from a HAVE_
diego
parents:
26755
diff
changeset
|
180 #ifdef CONFIG_GGIWMH |
16470 | 181 ggiWmhSetTitle(ggi_conf.vis, title); |
182 if (vo_ontop) window_ontop(); | |
183 #endif | |
184 | |
185 ggiSetFlags(ggi_conf.vis, GGIFLAG_ASYNC); | |
186 | |
187 if (GT_SCHEME(mode.graphtype) == GT_PALETTE) | |
188 ggiSetColorfulPalette(ggi_conf.vis); | |
189 | |
190 if (GT_SCHEME(mode.graphtype) != GT_TRUECOLOR) { | |
191 ggi_mode drawmode; | |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
192 |
16470 | 193 ggi_conf.drawvis = ggiOpen("display-memory", NULL); |
194 if (ggi_conf.drawvis == NULL) { | |
195 mp_msg(MSGT_VO, MSGL_ERR, | |
196 "[ggi] unable to get backbuffer for conversion\n"); | |
197 return -1; | |
198 } | |
199 memcpy(&drawmode, &mode, sizeof(ggi_mode)); | |
200 drawmode.graphtype = GT_32BIT; | |
201 drawmode.size.x = GGI_AUTO; | |
202 drawmode.size.y = GGI_AUTO; | |
203 ggiCheckMode(ggi_conf.drawvis, &drawmode); | |
204 if (ggiSetMode(ggi_conf.drawvis, &drawmode) < 0) { | |
205 mp_msg(MSGT_VO, MSGL_ERR, | |
206 "[ggi] unable to set backbuffer mode\n"); | |
207 return -1; | |
208 } | |
209 mode.graphtype = drawmode.graphtype; | |
210 | |
211 ggiSetFlags(ggi_conf.drawvis, GGIFLAG_ASYNC); | |
212 } | |
213 vo_depthonscreen = GT_DEPTH(mode.graphtype); | |
214 vo_screenwidth = mode.virt.x; | |
215 vo_screenheight = mode.virt.y; | |
216 | |
217 vo_dwidth = width; | |
218 vo_dheight = height; | |
219 vo_dbpp = GT_SIZE(mode.graphtype); | |
220 | |
221 | |
222 /* calculate top, left corner */ | |
223 vo_dx = (vo_screenwidth - vo_dwidth) / 2; | |
224 vo_dy = (vo_screenheight - vo_dheight) / 2; | |
225 | |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
226 |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
227 ggi_conf.srcwidth = width; |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
228 ggi_conf.srcheight = height; |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
229 ggi_conf.srcformat = format; |
15406 | 230 |
5703 | 231 ggi_conf.voflags = flags; |
4830 | 232 |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
233 if (IMGFMT_IS_RGB(ggi_conf.srcformat)) { |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
234 ggi_conf.srcdepth = IMGFMT_RGB_DEPTH(ggi_conf.srcformat); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
235 } else if (IMGFMT_IS_BGR(ggi_conf.srcformat)) { |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
236 ggi_conf.srcdepth = IMGFMT_BGR_DEPTH(ggi_conf.srcformat); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
237 } else { |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
238 mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] Unknown image format: %s\n", |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
239 vo_format_name(ggi_conf.srcformat)); |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
240 return -1; |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
241 } |
1172
290353337b44
hardly modified, keyboard handling is ok. aspect implemented, but bugging :)
al3x
parents:
1148
diff
changeset
|
242 |
14021
f0236d5ba7a7
Remove broken support for directbuffer and including frame-handling use.
iive
parents:
13787
diff
changeset
|
243 mp_msg(MSGT_VO, MSGL_INFO, "[ggi] input: %dx%dx%d, output: %dx%dx%d\n", |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
244 ggi_conf.srcwidth, ggi_conf.srcheight, ggi_conf.srcdepth, |
16470 | 245 mode.virt.x, mode.virt.y, vo_dbpp); |
4841 | 246 |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
247 ggi_conf.srcbpp = (ggi_conf.srcdepth + 7) / 8; |
4830 | 248 |
16470 | 249 ggi_conf.flushregion.x1 = vo_dx; |
250 ggi_conf.flushregion.y1 = vo_dy; | |
251 ggi_conf.flushregion.x2 = vo_dwidth; | |
252 ggi_conf.flushregion.y2 = vo_dheight; | |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
253 |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
254 return 0; |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
255 } |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
256 |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
257 static uint32_t get_image(mp_image_t *mpi) |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
258 { |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
259 /* GGI DirectRendering supports (yet) only BGR/RGB modes */ |
16470 | 260 if (!((IMGFMT_IS_BGR(mpi->imgfmt)) && |
261 (IMGFMT_BGR_DEPTH(mpi->imgfmt) == vo_dbpp))) | |
262 { | |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
263 return VO_FALSE; |
16470 | 264 } |
265 | |
266 if (!((IMGFMT_IS_RGB(mpi->imgfmt)) && | |
267 (IMGFMT_RGB_DEPTH(mpi->imgfmt) == vo_dbpp))) | |
268 { | |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
269 return VO_FALSE; |
16470 | 270 } |
271 | |
272 if (!((mpi->width == ggi_conf.srcwidth) && | |
273 (mpi->height == ggi_conf.srcheight))) | |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
274 { |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
275 return VO_FALSE; |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
276 } |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
277 |
5703 | 278 mpi->planes[1] = mpi->planes[2] = NULL; |
279 mpi->stride[1] = mpi->stride[2] = 0; | |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
280 |
14021
f0236d5ba7a7
Remove broken support for directbuffer and including frame-handling use.
iive
parents:
13787
diff
changeset
|
281 mpi->planes[0] = NULL; |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
282 mpi->stride[0] = ggi_conf.srcwidth * ggi_conf.srcbpp; |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
283 mpi->flags |= MP_IMGFLAG_DIRECT; |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
284 |
5703 | 285 #ifdef GGI_FLIP |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
286 if (ggi_conf.voflags & VOFLAG_FLIPPING) { |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
287 mpi->stride[0] = -mpi->stride[0]; |
5703 | 288 } |
289 #endif | |
290 | |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
291 return VO_TRUE; |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
292 } |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
293 |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
294 |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15406
diff
changeset
|
295 static int draw_frame(uint8_t *src[]) |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
296 { |
16470 | 297 ggiPutBox(ggi_conf.drawvis, vo_dx, vo_dy, |
298 vo_dwidth, vo_dheight, src[0]); | |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
299 |
16470 | 300 ggi_conf.flushregion.x1 = vo_dx; |
301 ggi_conf.flushregion.y1 = vo_dy; | |
302 ggi_conf.flushregion.x2 = vo_dwidth; | |
303 ggi_conf.flushregion.y2 = vo_dheight; | |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
304 |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
305 return 0; |
1141
c33f8b7488d1
cleaned up, and merged with my version, also code will be faster too
al3x
parents:
1132
diff
changeset
|
306 } |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
307 |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
308 static void draw_osd(void) |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
309 { |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
310 return; |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
311 } |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
312 |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
313 static void flip_page(void) |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
314 { |
16470 | 315 if (ggi_conf.drawvis != ggi_conf.vis) { |
316 #if 0 | |
317 ggiFlushRegion(ggi_conf.drawvis, | |
318 ggi_conf.flushregion.x1, ggi_conf.flushregion.y1, | |
319 ggi_conf.flushregion.x2 - ggi_conf.flushregion.x1, | |
320 ggi_conf.flushregion.y2 - ggi_conf.flushregion.y1); | |
321 #endif | |
322 ggiCrossBlit(ggi_conf.drawvis, | |
323 ggi_conf.flushregion.x1, ggi_conf.flushregion.y1, | |
324 ggi_conf.flushregion.x2 - ggi_conf.flushregion.x1, | |
325 ggi_conf.flushregion.y2 - ggi_conf.flushregion.y1, | |
326 ggi_conf.vis, | |
327 ggi_conf.flushregion.x1, ggi_conf.flushregion.y1); | |
328 | |
329 } | |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
330 ggiFlushRegion(ggi_conf.vis, |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
331 ggi_conf.flushregion.x1, ggi_conf.flushregion.y1, |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
332 ggi_conf.flushregion.x2 - ggi_conf.flushregion.x1, |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
333 ggi_conf.flushregion.y2 - ggi_conf.flushregion.y1); |
15406 | 334 |
335 ggi_conf.flushregion.x1 = ggi_conf.flushregion.x2 = -1; | |
336 ggi_conf.flushregion.y1 = ggi_conf.flushregion.y2 = -1; | |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
337 } |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
338 |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
339 static int draw_slice(uint8_t *src[], int stride[], |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
340 int w, int h, int x, int y) |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
341 { |
16470 | 342 ggiPutBox(ggi_conf.drawvis, vo_dx + x, vo_dy + y, w, h, src[0]); |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
343 |
16470 | 344 if ((ggi_conf.flushregion.x1 == -1) || |
345 ((vo_dx + x) < ggi_conf.flushregion.x1)) | |
346 { | |
347 ggi_conf.flushregion.x1 = vo_dx + x; | |
348 } | |
349 if ((ggi_conf.flushregion.y1 == -1) || | |
350 ((vo_dy + y) < ggi_conf.flushregion.y1)) | |
351 { | |
352 ggi_conf.flushregion.y1 = vo_dy + y; | |
353 } | |
354 if ((ggi_conf.flushregion.x2 == -1) || | |
355 ((vo_dx + x + w) > ggi_conf.flushregion.x2)) | |
356 { | |
357 ggi_conf.flushregion.x2 = vo_dx + x + w; | |
358 } | |
359 if ((ggi_conf.flushregion.y2 == -1) || | |
360 ((vo_dy + y + h) > ggi_conf.flushregion.y2)) | |
361 { | |
362 ggi_conf.flushregion.y2 = vo_dy + y + h; | |
363 } | |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
364 |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
365 return 1; |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
366 } |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
367 |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15406
diff
changeset
|
368 static int query_format(uint32_t format) |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
369 { |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
370 ggi_mode mode; |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
371 uint32_t vfcap; |
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
372 |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
373 vfcap = VFCAP_CSP_SUPPORTED |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
374 | VFCAP_CSP_SUPPORTED_BY_HW |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
375 | VFCAP_ACCEPT_STRIDE; |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
376 |
16470 | 377 if ((!vo_depthonscreen || !vo_dbpp) && ggi_conf.vis) { |
378 if (ggiGetMode(ggi_conf.vis, &mode) == 0) { | |
379 vo_depthonscreen = GT_DEPTH(mode.graphtype); | |
380 vo_dbpp = GT_SIZE(mode.graphtype); | |
381 } | |
382 if (GT_SCHEME(mode.graphtype) == GT_AUTO) { | |
383 ggiCheckMode(ggi_conf.vis, &mode); | |
384 } | |
385 if (GT_SCHEME(mode.graphtype) != GT_TRUECOLOR) { | |
386 mode.graphtype = GT_32BIT; | |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
387 vo_depthonscreen = GT_DEPTH(mode.graphtype); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
388 vo_dbpp = GT_SIZE(mode.graphtype); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
389 } |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
390 } |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
391 if ((IMGFMT_IS_BGR(format) && (IMGFMT_BGR_DEPTH(format) == vo_dbpp)) || |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
392 (IMGFMT_IS_RGB(format) && (IMGFMT_RGB_DEPTH(format) == vo_dbpp))) |
1141
c33f8b7488d1
cleaned up, and merged with my version, also code will be faster too
al3x
parents:
1132
diff
changeset
|
393 { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
394 return vfcap; |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
395 } |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
396 if (IMGFMT_IS_BGR(format) || IMGFMT_IS_RGB(format)) { |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
397 set_graphtype(format, &mode); |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
398 |
16470 | 399 if (ggiCheckMode(ggi_conf.drawvis, &mode) < 0) { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
400 return 0; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
401 } else { |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
402 return vfcap; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
403 } |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
404 } |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
405 return 0; |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
406 } |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
407 |
16171
fd51fd1ff231
Fix the return types of all (six) libvo API functions. Used to be uint32_t, but
ivo
parents:
15406
diff
changeset
|
408 static int preinit(const char *arg) |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
409 { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
410 if (ggiInit() != 0) { |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
411 mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to initialize GGI\n"); |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
412 return -1; |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
413 } |
27365
13c920fdf7f5
Change a bunch of video-output-specific preprocessor directives from a HAVE_
diego
parents:
26755
diff
changeset
|
414 #ifdef CONFIG_GGIWMH |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
415 if (ggiWmhInit() < 0) { |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
416 mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to initialize libggiwmh\n"); |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
417 return -1; |
15406 | 418 } |
419 #endif | |
420 | |
16470 | 421 if (arg) { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
422 int i = 0; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
423 ggi_conf.driver = strdup(arg); |
16470 | 424 while (ggi_conf.driver[i] != '\0') { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
425 if (ggi_conf.driver[i] == '.') |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
426 ggi_conf.driver[i] = ','; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
427 i++; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
428 } |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
429 } else { |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
430 ggi_conf.driver = NULL; |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
431 } |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
432 |
16470 | 433 ggi_conf.vis = ggiOpen(ggi_conf.driver); |
434 if (ggi_conf.vis == NULL) { | |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
435 mp_msg(MSGT_VO, MSGL_FATAL, "[ggi] unable to open '%s' output\n", |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
436 (ggi_conf.driver == NULL) ? "default" : ggi_conf.driver); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
437 ggiExit(); |
26755
46f0b4d34fa1
cosmetics: Remove useless parentheses from from return statements.
diego
parents:
25220
diff
changeset
|
438 return -1; |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
439 } |
16470 | 440 ggi_conf.drawvis = ggi_conf.vis; |
441 | |
442 | |
27365
13c920fdf7f5
Change a bunch of video-output-specific preprocessor directives from a HAVE_
diego
parents:
26755
diff
changeset
|
443 #ifdef CONFIG_GGIWMH |
16470 | 444 ggiWmhAttach(ggi_conf.vis); |
15406 | 445 #endif |
446 | |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
447 |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
448 mp_msg(MSGT_VO, MSGL_V, "[ggi] using '%s' output\n", |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
449 (ggi_conf.driver == NULL) ? "default" : ggi_conf.driver); |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
450 |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
451 return 0; |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
452 } |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
453 |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
454 static void uninit(void) |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
455 { |
32537
8fa2f43cb760
Remove most of the NULL pointer check before free all over the code
cboesch
parents:
28446
diff
changeset
|
456 free(ggi_conf.driver); |
15406 | 457 |
27365
13c920fdf7f5
Change a bunch of video-output-specific preprocessor directives from a HAVE_
diego
parents:
26755
diff
changeset
|
458 #ifdef CONFIG_GGIWMH |
16470 | 459 ggiWmhDetach(ggi_conf.vis); |
15406 | 460 ggiWmhExit(); |
461 #endif | |
462 | |
16470 | 463 if (ggi_conf.drawvis != NULL && ggi_conf.drawvis != ggi_conf.vis) |
464 ggiClose(ggi_conf.drawvis); | |
465 | |
1172
290353337b44
hardly modified, keyboard handling is ok. aspect implemented, but bugging :)
al3x
parents:
1148
diff
changeset
|
466 ggiClose(ggi_conf.vis); |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
467 ggiExit(); |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
468 } |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
469 |
33305
ddb45e9443ec
Remove the variable arguments from the libvo control() functions.
iive
parents:
32537
diff
changeset
|
470 static int control(uint32_t request, void *data) |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
471 { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
472 switch (request) { |
16426 | 473 case VOCTRL_QUERY_FORMAT: |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
474 return query_format(*((uint32_t *) data)); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
475 case VOCTRL_GET_IMAGE: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
476 return get_image(data); |
27365
13c920fdf7f5
Change a bunch of video-output-specific preprocessor directives from a HAVE_
diego
parents:
26755
diff
changeset
|
477 #ifdef CONFIG_GGIWMH |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
478 case VOCTRL_ONTOP: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
479 vo_ontop = (!(vo_ontop)); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
480 window_ontop(); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
481 return VO_TRUE; |
15406 | 482 #endif |
5637
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
483 } |
6890819bc0dc
added support for directrendering, updated to VFCAP_ flags in query_format, added support for non-directbuffer devices, and using mem2agpcpy_pic
alex
parents:
4841
diff
changeset
|
484 return VO_NOTIMPL; |
4828
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
485 } |
0ae597cc28e6
totally reworked, working fine on fbdev too, applied Andres Beck's patches, quad-buffering support
alex
parents:
4737
diff
changeset
|
486 |
4841 | 487 /* EVENT handling */ |
13787
e047e70a9767
Handle "xxx.h" vs "../xxx.h" include paths in a consistent way.
diego
parents:
12650
diff
changeset
|
488 #include "osdep/keycodes.h" |
1172
290353337b44
hardly modified, keyboard handling is ok. aspect implemented, but bugging :)
al3x
parents:
1148
diff
changeset
|
489 |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
490 static void check_events(void) |
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
491 { |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
492 struct timeval tv = {0, 0}; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
493 ggi_event event; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
494 ggi_event_mask mask; |
1143 | 495 |
16470 | 496 if ((mask = ggiEventPoll(ggi_conf.vis, emAll, &tv))) { |
497 if (ggiEventRead(ggi_conf.vis, &event, emAll) != 0) { | |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
498 mp_dbg(MSGT_VO, MSGL_DBG3, |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
499 "type: %4x, origin: %4x, " |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
500 "sym: %4x, label: %4x, button=%4x\n", |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
501 event.any.origin, event.any.type, event.key.sym, |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
502 event.key.label, event.key.button); |
1143 | 503 |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
504 switch (event.any.type) { |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
505 case evKeyPress: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
506 switch (event.key.sym) { |
16426 | 507 case GIIK_PAsterisk: /* PStar */ |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
508 case GIIUC_Asterisk: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
509 mplayer_put_key('*'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
510 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
511 case GIIK_PSlash: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
512 case GIIUC_Slash: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
513 mplayer_put_key('/'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
514 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
515 case GIIK_PPlus: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
516 case GIIUC_Plus: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
517 mplayer_put_key('+'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
518 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
519 case GIIK_PMinus: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
520 case GIIUC_Minus: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
521 mplayer_put_key('-'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
522 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
523 case GIIUC_o: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
524 case GIIUC_O: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
525 mplayer_put_key('o'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
526 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
527 case GIIUC_g: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
528 case GIIUC_G: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
529 mplayer_put_key('g'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
530 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
531 case GIIUC_z: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
532 case GIIUC_Z: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
533 mplayer_put_key('z'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
534 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
535 case GIIUC_x: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
536 case GIIUC_X: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
537 mplayer_put_key('x'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
538 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
539 case GIIUC_m: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
540 case GIIUC_M: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
541 mplayer_put_key('m'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
542 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
543 case GIIUC_d: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
544 case GIIUC_D: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
545 mplayer_put_key('d'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
546 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
547 case GIIUC_q: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
548 case GIIUC_Q: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
549 mplayer_put_key('q'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
550 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
551 case GIIUC_h: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
552 case GIIUC_H: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
553 mplayer_put_key('h'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
554 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
555 case GIIUC_l: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
556 case GIIUC_L: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
557 mplayer_put_key('l'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
558 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
559 case GIIUC_Space: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
560 case GIIUC_p: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
561 case GIIUC_P: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
562 mplayer_put_key('p'); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
563 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
564 case GIIK_Up: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
565 mplayer_put_key(KEY_UP); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
566 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
567 case GIIK_Down: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
568 mplayer_put_key(KEY_DOWN); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
569 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
570 case GIIK_Left: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
571 mplayer_put_key(KEY_LEFT); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
572 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
573 case GIIK_Right: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
574 mplayer_put_key(KEY_RIGHT); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
575 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
576 case GIIK_PageUp: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
577 mplayer_put_key(KEY_PAGE_UP); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
578 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
579 case GIIK_PageDown: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
580 mplayer_put_key(KEY_PAGE_DOWN); |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
581 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
582 default: |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
583 break; |
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
584 } /* switch */ |
14175
c4fe6bb22e2e
- Fixed mode setting, so any video can be played on all supported ggi targets.
diego
parents:
14021
diff
changeset
|
585 |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
586 break; |
16426 | 587 } /* switch */ |
16409
ff4af59f64b2
Switch indentation over to K&R style, replace all tabs by spaces.
diego
parents:
16280
diff
changeset
|
588 } /* if */ |
16426 | 589 } /* if */ |
1143 | 590 return; |
1132
80a0f8aa2360
Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff
changeset
|
591 } |