annotate libvo/vo_ggi.c @ 1147:82bbd3ee8ce7

hacked osd working on yv12
author al3x
date Sun, 17 Jun 2001 18:32:14 +0000
parents 065583b867fd
children 93a9a0ca5fb0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
1 /*
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
2 vo_ggi.c - General Graphics Interface (GGI) Renderer for MPlayer
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
3
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
4 (C) Alex Beregszaszi <alex@naxine.org>
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
5
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
6 Uses libGGI - http://www.ggi-project.org/
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
7
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
8 Many thanks to Atmosfear, he hacked this driver to working with Planar
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
9 formats, and he fixed the RGB handling.
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
10 */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
11
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
12 #include <stdio.h>
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
13 #include <stdlib.h>
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
14 #include <string.h>
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
15 #include <errno.h>
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
16
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
17 #include "config.h"
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
18 #include "video_out.h"
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
19 #include "video_out_internal.h"
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
20
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
21 #include "yuv2rgb.h"
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
22 #include "fastmemcpy.h"
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
23
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
24 #include <ggi/ggi.h>
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
25
1143
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
26 #undef GGI_OST
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
27 #define GII_BUGGY_KEYCODES
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
28 #define GGI_OSD
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
29
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
30 LIBVO_EXTERN (ggi)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
31
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
32 static vo_info_t vo_info =
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
33 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
34 "General Graphics Interface (GGI) output",
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
35 "ggi",
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
36 "Alex Beregszaszi <alex@naxine.org>",
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
37 "under developement"
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
38 };
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
39
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
40 extern int verbose;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
41
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
42 static char *ggi_output_name = NULL;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
43 static ggi_visual_t ggi_vis;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
44 static ggi_directbuffer *ggi_buffer;
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
45 static int ggi_format = 0;
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
46 static int ggi_bpp = 0;
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
47 static int ggi_bppmul = 0;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
48 static uint32_t virt_width;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
49 static uint32_t virt_height;
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
50 #ifdef GGI_OST
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
51 static ggi_pixel white;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
52 static ggi_pixel black;
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
53 #endif
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
54
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
55 static int ggi_setmode(uint32_t d_width, uint32_t d_height, int d_depth)
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
56 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
57 ggi_mode mode =
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
58 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
59 1, /* frames */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
60 { GGI_AUTO, GGI_AUTO }, /* visible */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
61 { GGI_AUTO, GGI_AUTO }, /* virt */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
62 { GGI_AUTO, GGI_AUTO }, /* size */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
63 GT_AUTO, /* graphtype */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
64 { GGI_AUTO, GGI_AUTO } /* dots per pixel */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
65 };
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
66 ggi_color pal[256];
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
67
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
68 mode.visible.x = mode.virt.x = d_width;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
69 mode.visible.y = mode.virt.y = d_height;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
70
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
71 switch(d_depth)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
72 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
73 case 1:
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
74 mode.graphtype = GT_1BIT;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
75 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
76 case 2:
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
77 mode.graphtype = GT_2BIT;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
78 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
79 case 4:
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
80 mode.graphtype = GT_4BIT;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
81 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
82 case 8:
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
83 mode.graphtype = GT_8BIT;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
84 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
85 case 15:
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
86 mode.graphtype = GT_15BIT;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
87 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
88 case 16:
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
89 mode.graphtype = GT_16BIT;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
90 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
91 case 24:
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
92 mode.graphtype = GT_24BIT;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
93 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
94 case 32:
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
95 mode.graphtype = GT_32BIT;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
96 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
97 default:
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
98 printf("ggi-setmode: unknown bit depth - using auto\n");
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
99 mode.graphtype = GT_AUTO;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
100 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
101
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
102 ggiCheckMode(ggi_vis, &mode);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
103
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
104 if (ggiSetMode(ggi_vis, &mode) != 0)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
105 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
106 printf("ggi-setmode: unable to set mode\n");
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
107 ggiClose(ggi_vis);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
108 ggiExit();
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
109 return(-1);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
110 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
111
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
112 if (ggiGetMode(ggi_vis, &mode) != 0)
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
113 {
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
114 printf("ggi-setmode: unable to get mode\n");
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
115 ggiClose(ggi_vis);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
116 ggiExit();
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
117 return(-1);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
118 }
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
119
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
120 virt_width = mode.virt.x;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
121 virt_height = mode.virt.y;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
122 vo_screenwidth = mode.visible.x;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
123 vo_screenheight = mode.visible.y;
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
124 vo_depthonscreen = d_depth;
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
125 // vo_depthonscreen = GT_DEPTH(mode.graphtype);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
126 // ggi_bpp = GT_SIZE(mode.graphtype);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
127 ggi_bpp = vo_depthonscreen;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
128
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
129 #ifdef get_db_info
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
130 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
131 const ggi_directbuffer *db = ggiDBGetBuffer(ggi_vis, 0);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
133 if (db)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
134 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
135 vo_depthonscreen = db->buffer.plb.pixelformat->depth;
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
136 ggi_bpp = db->buffer.plb.pixelformat->size / 8;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
137 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
138 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
139 #endif
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
140
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
141 if (GT_SCHEME(mode.graphtype) == GT_PALETTE)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
142 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
143 ggiSetColorfulPalette(ggi_vis);
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
144 ggiGetPalette(ggi_vis, 0, 1 << ggi_bpp, pal);
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
145 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
146
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
147 if (verbose)
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
148 printf("ggi-setmode: %dx%d (virt: %dx%d) screen depth: %d, bpp: %d\n",
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
149 vo_screenwidth, vo_screenheight, virt_width, virt_height,
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
150 vo_depthonscreen, ggi_bpp);
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
151
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
152 ggi_bppmul = ggi_bpp/8;
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
153
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
154 return(0);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
155 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
156
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
157
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
158 static uint32_t init(uint32_t width, uint32_t height, uint32_t d_width,
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
159 uint32_t d_height, uint32_t fullscreen, char *title, uint32_t format)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
160 {
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
161 vo_depthonscreen = 32;
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
162 printf("ggi-init: This driver has got bugs, if you can, fix them.\n");
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
163
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
164 if (ggiInit() != 0)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
165 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
166 printf("ggi-init: unable to initialize GGI\n");
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
167 return(-1);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
168 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
169
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
170 if ((ggi_vis = ggiOpen(ggi_output_name)) == NULL)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
171 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
172 printf("ggi-init: unable to open GGI for %s output\n",
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
173 (ggi_output_name == NULL) ? "default" : ggi_output_name);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
174 ggiExit();
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
175 return(-1);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
176 }
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
177
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
178 printf("ggi-init: using %s GGI output\n",
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
179 (ggi_output_name == NULL) ? "default" : ggi_output_name);
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
180
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
181 switch(format)
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
182 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
183 case IMGFMT_RGB8:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
184 ggi_bpp = 8;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
185 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
186 case IMGFMT_RGB15:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
187 ggi_bpp = 15;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
188 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
189 case IMGFMT_RGB16:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
190 ggi_bpp = 16;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
191 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
192 case IMGFMT_RGB24:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
193 ggi_bpp = 24;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
194 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
195 case IMGFMT_RGB32:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
196 ggi_bpp = 32;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
197 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
198 case IMGFMT_BGR8:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
199 ggi_bpp = 8;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
200 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
201 case IMGFMT_BGR15:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
202 ggi_bpp = 15;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
203 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
204 case IMGFMT_BGR16:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
205 ggi_bpp = 16;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
206 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
207 case IMGFMT_BGR24:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
208 ggi_bpp = 24;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
209 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
210 case IMGFMT_BGR32:
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
211 ggi_bpp = 32;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
212 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
213 case IMGFMT_YV12: /* rgb, 24bit */
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
214 ggi_bpp = 16;
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
215 yuv2rgb_init(32/*vo_depthonscreen*/, MODE_RGB);
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
216 break;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
217 default:
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
218 printf("ggi-init: no suitable image format found (requested: %s)\n",
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
219 vo_format_name(format));
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
220 return(-1);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
221 }
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
222 ggi_format = format;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
223
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
224 if (ggi_setmode(d_width, d_height, vo_depthonscreen) != 0)
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
225 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
226 printf("ggi-init: setmode returned with error\n");
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
227 return(-1);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
228 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
229
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
230 printf("ggi-init: input: %d bpp %s - screen depth: %d\n", ggi_bpp,
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
231 vo_format_name(ggi_format), vo_depthonscreen);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
232
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
233 ggiSetFlags(ggi_vis, GGIFLAG_ASYNC);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
234
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
235 ggi_buffer = (ggi_directbuffer *)ggiDBGetBuffer(ggi_vis, 0);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
236
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
237 if (ggi_buffer == NULL)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
238 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
239 printf("ggi-init: double buffering is not available\n");
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
240 ggiClose(ggi_vis);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
241 ggiExit();
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
242 return(-1);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
243 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
244
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
245 if (!(ggi_buffer->type & GGI_DB_SIMPLE_PLB) ||
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
246 (ggi_buffer->page_size != 0) ||
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
247 (ggi_buffer->write == NULL) ||
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
248 (ggi_buffer->noaccess != 0) ||
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
249 (ggi_buffer->align != 0) ||
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
250 (ggi_buffer->layout != blPixelLinearBuffer))
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
251 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
252 printf("ggi-init: incorrect video memory type\n");
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
253 ggiClose(ggi_vis);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
254 ggiExit();
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
255 return(-1);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
256 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
257
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
258 #ifdef GGI_OST
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
259 /* just for fun */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
260 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
261 ggi_color col;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
262
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
263 /* set black */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
264 col.r = col.g = col.b = 0x0000;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
265 black = ggiMapColor(ggi_vis, &col);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
266
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
267 /* set white */
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
268 col.r = col.g = col.b = 0xffff;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
269 white = ggiMapColor(ggi_vis, &col);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
270
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
271 ggiSetGCForeground(ggi_vis, white);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
272 ggiSetGCBackground(ggi_vis, black);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
273 }
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
274 #endif
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
275
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
276 return(0);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
277 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
278
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
279 static const vo_info_t* get_info(void)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
280 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
281 return &vo_info;
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
282 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
283
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
284 static uint32_t draw_frame(uint8_t *src[])
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
285 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
286 ggiResourceAcquire(ggi_buffer->resource, GGI_ACTYPE_WRITE);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
287 ggiSetDisplayFrame(ggi_vis, ggi_buffer->frame);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
288 ggiSetWriteFrame(ggi_vis, ggi_buffer->frame);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
289
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
290 memcpy(ggi_buffer->write, src[0], virt_width*virt_height*ggi_bppmul);
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
291
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
292 #ifdef GGI_OST
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
293 ggiPuts(ggi_vis, virt_width/2, virt_height-10, "MPlayer GGI");
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
294 #endif
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
295
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
296 ggiResourceRelease(ggi_buffer->resource);
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
297 return(0);
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
298 }
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
299
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
300 #ifdef GGI_OSD
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
301 static void draw_alpha(int x0, int y0, int w, int h, unsigned char *src,
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
302 unsigned char *srca, int stride)
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
303 {
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
304 switch(ggi_format)
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
305 {
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
306 case IMGFMT_YV12:
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
307 case IMGFMT_I420:
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
308 case IMGFMT_IYUV:
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
309 switch (vo_depthonscreen)
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
310 {
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
311 case 32:
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
312 vo_draw_alpha_rgb32(w, h, src, srca, stride,
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
313 ggi_buffer->write+4*(virt_width*y0+x0), 4*virt_width);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
314 break;
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
315 case 24:
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
316 vo_draw_alpha_rgb24(w, h, src, srca, stride,
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
317 ggi_buffer->write+3*(virt_width*y0+x0), 3*virt_width);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
318 break;
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
319 case 16:
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
320 vo_draw_alpha_rgb16(w, h, src, srca, stride,
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
321 ggi_buffer->write+2*(virt_width*y0+x0), 2*virt_width);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
322 break;
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
323 case 15:
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
324 vo_draw_alpha_rgb15(w, h, src, srca, stride,
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
325 ggi_buffer->write+2*(virt_width*y0+x0), 2*virt_width);
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
326 break;
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
327 }
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
328 // vo_draw_alpha_yv12(w, h, src, srca, stride,
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
329 // ggi_buffer->write+(virt_width*y0+x0),
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
330 // virt_width);
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
331 break;
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
332 case IMGFMT_YUY2:
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
333 case IMGFMT_YVYU:
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
334 vo_draw_alpha_yuy2(w, h, src, srca, stride,
1145
065583b867fd Fixed OSD.
atmosfear
parents: 1144
diff changeset
335 ggi_buffer->write+2*(virt_width*y0+x0),
065583b867fd Fixed OSD.
atmosfear
parents: 1144
diff changeset
336 2*virt_width);
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
337 break;
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
338 case IMGFMT_UYVY:
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
339 vo_draw_alpha_yuy2(w, h, src, srca, stride,
1145
065583b867fd Fixed OSD.
atmosfear
parents: 1144
diff changeset
340 ggi_buffer->write+2*(virt_width*y0+x0)+1,
065583b867fd Fixed OSD.
atmosfear
parents: 1144
diff changeset
341 2*virt_width);
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
342 break;
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
343 case IMGFMT_RGB15:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
344 case IMGFMT_BGR15:
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
345 vo_draw_alpha_rgb15(w, h, src, srca, stride,
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
346 ggi_buffer->write+2*(virt_width*y0+x0), 2*virt_width);
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
347 break;
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
348 case IMGFMT_RGB16:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
349 case IMGFMT_BGR16:
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
350 vo_draw_alpha_rgb16(w, h, src, srca, stride,
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
351 ggi_buffer->write+2*(virt_width*y0+x0), 2*virt_width);
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
352 break;
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
353 case IMGFMT_RGB24:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
354 case IMGFMT_BGR24:
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
355 vo_draw_alpha_rgb24(w, h, src, srca, stride,
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
356 ggi_buffer->write+3*(virt_width*y0+x0), 3*virt_width);
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
357 break;
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
358 case IMGFMT_RGB32:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
359 case IMGFMT_BGR32:
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
360 vo_draw_alpha_rgb32(w, h, src, srca, stride,
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
361 ggi_buffer->write+4*(virt_width*y0+x0), 4*virt_width);
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
362 break;
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
363 }
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
364 }
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
365 #endif
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 static void flip_page(void)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
368 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
369 check_events();
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
370 #ifdef GGI_OSD
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
371 vo_draw_text(virt_width, virt_height, draw_alpha);
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
372 #endif
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
373 ggiFlush(ggi_vis);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
374 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
375
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
376 static uint32_t draw_slice(uint8_t *src[], int stride[], int w, int h,
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
377 int x, int y)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
378 {
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
379 yuv2rgb(((uint8_t *) ggi_buffer->write)+(virt_width*y+x)*ggi_bppmul,
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
380 src[0], src[1], src[2], w, h, virt_width*ggi_bppmul, stride[0],
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
381 stride[1]);
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
382
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
383 return(0);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
384 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
385
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
386 static uint32_t query_format(uint32_t format)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
387 {
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
388 switch(format)
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
389 {
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
390 case IMGFMT_YV12:
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
391 /* case IMGFMT_I420:
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
392 case IMGFMT_IYUV:
1147
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
393 */ case IMGFMT_YUY2:
82bbd3ee8ce7 hacked osd working on yv12
al3x
parents: 1145
diff changeset
394 /* case IMGFMT_YVYU:
1144
7bf91ff0ec28 hacked osd and input control handling
al3x
parents: 1143
diff changeset
395 case IMGFMT_UYVY:*/
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
396 return(1);
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
397 case IMGFMT_RGB8:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
398 case IMGFMT_RGB15:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
399 case IMGFMT_RGB16:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
400 case IMGFMT_RGB24:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
401 case IMGFMT_RGB32:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
402 case IMGFMT_BGR8:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
403 case IMGFMT_BGR15:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
404 case IMGFMT_BGR16:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
405 case IMGFMT_BGR24:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
406 case IMGFMT_BGR32:
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
407 return(1);
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
408 }
1141
c33f8b7488d1 cleaned up, and merged with my version, also code will be faster too
al3x
parents: 1132
diff changeset
409 return(0);
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
410 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
411
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
412 static void uninit(void)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
413 {
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
414 ggiResourceRelease(ggi_buffer->resource);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
415 ggiClose(ggi_vis);
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
416 ggiExit();
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
417 }
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
418
1143
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
419 #include "../linux/keycodes.h"
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
420 static void check_events(void)
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
421 {
1143
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
422 struct timeval tv = {0, 0};
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
423 ggi_event event;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
424 ggi_event_mask mask;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
425
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
426 if ((mask = ggiEventPoll(ggi_vis, emAll, &tv)))
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
427 if (ggiEventRead(ggi_vis, &event, emAll) != 0)
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
428 {
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
429 // printf("type: %4x, origin: %4x, sym: %4x, label: %4x, button=%4x\n",
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
430 // event.any.origin, event.any.type, event.key.sym, event.key.label, event.key.button);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
431
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
432 if ((event.any.type == evKeyPress) ||
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
433 (event.any.type == evKeyRepeat) ||
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
434 (event.any.type == evKeyRelease))
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
435 {
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
436 #ifdef GII_BUGGY_KEYCODES
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
437 switch(event.key.button)
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
438 {
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
439 case 0x37:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
440 mplayer_put_key('*');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
441 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
442 case 0x68:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
443 mplayer_put_key('/');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
444 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
445 case 0x4e:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
446 mplayer_put_key('+');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
447 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
448 case 0x4a:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
449 mplayer_put_key('-');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
450 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
451 case 0x18:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
452 mplayer_put_key('o');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
453 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
454 case 0x22:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
455 mplayer_put_key('g');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
456 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
457 case 0x15:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
458 mplayer_put_key('z');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
459 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
460 case 0x2d:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
461 mplayer_put_key('x');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
462 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
463 case 0x32:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
464 mplayer_put_key('m');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
465 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
466 case 0x20:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
467 mplayer_put_key('d');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
468 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
469 case 0x10:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
470 mplayer_put_key('q');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
471 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
472 case 0x39:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
473 mplayer_put_key('p');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
474 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
475 case 0x5a:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
476 mplayer_put_key(KEY_UP);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
477 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
478 case 0x60:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
479 mplayer_put_key(KEY_DOWN);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
480 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
481 case 0x5c:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
482 mplayer_put_key(KEY_LEFT);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
483 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
484 case 0x5e:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
485 mplayer_put_key(KEY_RIGHT);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
486 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
487 case 0x5b:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
488 mplayer_put_key(KEY_PAGE_UP);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
489 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
490 case 0x61:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
491 mplayer_put_key(KEY_PAGE_DOWN);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
492 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
493 default:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
494 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
495 }
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
496 #else
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
497 switch(event.key.button)
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
498 {
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
499 case GIIK_PAsterisk: /* PStar */
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
500 case GIIUC_Asterisk:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
501 mplayer_put_key('*');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
502 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
503 case GIIK_PSlash:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
504 case GIIUC_Slash:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
505 mplayer_put_key('/');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
506 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
507 case GIIK_PPlus:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
508 case GIIUC_Plus:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
509 mplayer_put_key('+');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
510 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
511 case GIIK_PMinus:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
512 case GIIUC_Minus:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
513 mplayer_put_key('-');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
514 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
515 case GIIUC_o:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
516 case GIIUC_O:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
517 mplayer_put_key('o');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
518 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
519 case GIIUC_g:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
520 case GIIUC_G:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
521 mplayer_put_key('g');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
522 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
523 case GIIUC_z:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
524 case GIIUC_Z:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
525 mplayer_put_key('z');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
526 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
527 case GIIUC_x:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
528 case GIIUC_X:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
529 mplayer_put_key('x');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
530 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
531 case GIIUC_m:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
532 case GIIUC_M:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
533 mplayer_put_key('m');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
534 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
535 case GIIUC_d:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
536 case GIIUC_D:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
537 mplayer_put_key('d');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
538 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
539 case GIIUC_q:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
540 case GIIUC_Q:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
541 mplayer_put_key('q');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
542 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
543 case GIIUC_Space:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
544 case GIIUC_p:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
545 case GIIUC_P:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
546 mplayer_put_key('p');
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
547 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
548 case GIIK_Up:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
549 mplayer_put_key(KEY_UP);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
550 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
551 case GIIK_Down:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
552 mplayer_put_key(KEY_DOWN);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
553 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
554 case GIIK_Left:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
555 mplayer_put_key(KEY_LEFT);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
556 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
557 case GIIK_Right:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
558 mplayer_put_key(KEY_RIGHT);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
559 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
560 case GIIK_PageUp:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
561 mplayer_put_key(KEY_PAGE_UP);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
562 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
563 case GIIK_PageDown:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
564 mplayer_put_key(KEY_PAGE_DOWN);
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
565 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
566 default:
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
567 break;
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
568 }
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
569 #endif
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
570 }
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
571 }
a9d985d6aa91 key controlling implemented
al3x
parents: 1141
diff changeset
572 return;
1132
80a0f8aa2360 Added for development only this is in pre-alpha state, do not use!
atmosfear
parents:
diff changeset
573 }