comparison src/video/qnxgf/SDL_qnxgf.c @ 3116:b17f1ae7ad66

Added support for single buffering, if double buffering is not available.
author Mike Gorchak <lestat@i.com.ua>
date Tue, 05 May 2009 17:50:34 +0000
parents 7b3a09fb9c8b
children d7174e9f65ce
comparison
equal deleted inserted replaced
3115:1102a3305928 3116:b17f1ae7ad66
89 /* Low level device graphics driver names, which they are reporting */ 89 /* Low level device graphics driver names, which they are reporting */
90 GF_DeviceCaps gf_devicename[]= 90 GF_DeviceCaps gf_devicename[]=
91 { 91 {
92 /* ATI Rage 128 graphics driver (devg-ati_rage128) */ 92 /* ATI Rage 128 graphics driver (devg-ati_rage128) */
93 {"ati_rage128", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 93 {"ati_rage128", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
94 SDL_GF_UNACCELERATED_3D}, 94 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
95 /* Fujitsu Carmine graphics driver (devg-carmine.so) */ 95 /* Fujitsu Carmine graphics driver (devg-carmine.so) */
96 {"carmine", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 96 {"carmine", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
97 SDL_GF_ACCELERATED_3D}, 97 SDL_GF_ACCELERATED_3D | SDL_GF_VIDEOMEMORY},
98 /* C&T graphics driver (devg-chips.so) */ 98 /* C&T graphics driver (devg-chips.so) */
99 {"chips", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 99 {"chips", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
100 SDL_GF_UNACCELERATED_3D}, 100 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
101 /* Fujitsu Coral graphics driver (devg-coral.so) */ 101 /* Fujitsu Coral graphics driver (devg-coral.so) */
102 {"coral", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 102 {"coral", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
103 SDL_GF_ACCELERATED_3D}, 103 SDL_GF_ACCELERATED_3D | SDL_GF_VIDEOMEMORY},
104 /* Intel integrated graphics driver (devg-extreme2.so) */ 104 /* Intel integrated graphics driver (devg-extreme2.so) */
105 {"extreme2", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 105 {"extreme2", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
106 SDL_GF_ACCELERATED_3D}, 106 SDL_GF_ACCELERATED_3D | SDL_GF_VIDEOMEMORY},
107 /* Unaccelerated FB driver (devg-flat.so) */ 107 /* Unaccelerated FB driver (devg-flat.so) */
108 {"flat", SDL_GF_UNACCELERATED | SDL_GF_LOWRESOLUTION | 108 {"flat", SDL_GF_UNACCELERATED | SDL_GF_LOWRESOLUTION |
109 SDL_GF_UNACCELERATED_3D}, 109 SDL_GF_UNACCELERATED_3D | SDL_GF_NOVIDEOMEMORY},
110 /* NS Geode graphics driver (devg-geode.so) */ 110 /* NS Geode graphics driver (devg-geode.so) */
111 {"geode", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 111 {"geode", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
112 SDL_GF_UNACCELERATED_3D}, 112 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
113 /* Geode LX graphics driver (devg-geodelx.so) */ 113 /* Geode LX graphics driver (devg-geodelx.so) */
114 {"geodelx", SDL_GF_ACCELERATED | SDL_GF_LOWRESOLUTION | 114 {"geodelx", SDL_GF_ACCELERATED | SDL_GF_LOWRESOLUTION |
115 SDL_GF_UNACCELERATED_3D}, 115 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
116 /* Intel integrated graphics driver (devg-gma9xx.so) */ 116 /* Intel integrated graphics driver (devg-gma9xx.so) */
117 {"gma", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 117 {"gma", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
118 SDL_GF_ACCELERATED_3D}, 118 SDL_GF_ACCELERATED_3D | SDL_GF_VIDEOMEMORY},
119 /* Intel integrated graphics driver (devg-i810.so) */ 119 /* Intel integrated graphics driver (devg-i810.so) */
120 {"i810", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 120 {"i810", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
121 SDL_GF_UNACCELERATED_3D}, 121 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
122 /* Intel integrated graphics driver (devg-i830.so) */ 122 /* Intel integrated graphics driver (devg-i830.so) */
123 {"i830", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 123 {"i830", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
124 SDL_GF_UNACCELERATED_3D}, 124 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
125 /* Geode LX graphics driver (devg-lx800.so) */ 125 /* Geode LX graphics driver (devg-lx800.so) */
126 {"lx800", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 126 {"lx800", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
127 SDL_GF_UNACCELERATED_3D}, 127 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
128 /* Matrox Gxx graphics driver (devg-matroxg.so) */ 128 /* Matrox Gxx graphics driver (devg-matroxg.so) */
129 {"matroxg", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 129 {"matroxg", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
130 SDL_GF_UNACCELERATED_3D}, 130 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
131 /* Intel Poulsbo graphics driver (devg-poulsbo.so) */ 131 /* Intel Poulsbo graphics driver (devg-poulsbo.so) */
132 {"poulsbo", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 132 {"poulsbo", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
133 SDL_GF_ACCELERATED_3D}, 133 SDL_GF_ACCELERATED_3D | SDL_GF_VIDEOMEMORY},
134 /* ATI Radeon driver (devg-radeon.so) */ 134 /* ATI Radeon driver (devg-radeon.so) */
135 {"radeon", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 135 {"radeon", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
136 SDL_GF_UNACCELERATED_3D}, 136 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
137 /* ATI Rage driver (devg-rage.so) */ 137 /* ATI Rage driver (devg-rage.so) */
138 {"rage", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 138 {"rage", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
139 SDL_GF_UNACCELERATED_3D}, 139 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
140 /* S3 Savage graphics driver (devg-s3_savage.so) */ 140 /* S3 Savage graphics driver (devg-s3_savage.so) */
141 {"s3_savage", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 141 {"s3_savage", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
142 SDL_GF_UNACCELERATED_3D}, 142 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
143 /* SiS630 integrated graphics driver (devg-sis630.so) */ 143 /* SiS630 integrated graphics driver (devg-sis630.so) */
144 {"sis630", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 144 {"sis630", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
145 SDL_GF_UNACCELERATED_3D}, 145 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
146 /* PowerVR SGX 535 graphics driver (devg-poulsbo.so) */ 146 /* PowerVR SGX 535 graphics driver (devg-poulsbo.so) */
147 {"sgx", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 147 {"sgx", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
148 SDL_GF_ACCELERATED_3D}, 148 SDL_GF_ACCELERATED_3D | SDL_GF_VIDEOMEMORY},
149 /* SM Voyager GX graphics driver (devg-smi5xx.so) */ 149 /* SM Voyager GX graphics driver (devg-smi5xx.so) */
150 {"smi5xx", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 150 {"smi5xx", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
151 SDL_GF_UNACCELERATED_3D}, 151 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
152 /* Silicon Motion graphics driver (devg-smi7xx.so) */ 152 /* Silicon Motion graphics driver (devg-smi7xx.so) */
153 {"smi7xx", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 153 {"smi7xx", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
154 SDL_GF_UNACCELERATED_3D}, 154 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
155 /* SVGA unaccelerated gfx driver (devg-svga.so) */ 155 /* SVGA unaccelerated gfx driver (devg-svga.so) */
156 {"svga", SDL_GF_UNACCELERATED | SDL_GF_LOWRESOLUTION | 156 {"svga", SDL_GF_UNACCELERATED | SDL_GF_LOWRESOLUTION |
157 SDL_GF_UNACCELERATED_3D}, 157 SDL_GF_UNACCELERATED_3D | SDL_GF_NOVIDEOMEMORY},
158 /* nVidia TNT graphics driver (devg-tnt.so) */ 158 /* nVidia TNT graphics driver (devg-tnt.so) */
159 {"tnt", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 159 {"tnt", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
160 SDL_GF_UNACCELERATED_3D}, 160 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
161 /* VIA integrated graphics driver (devg-tvia.so) */ 161 /* VIA integrated graphics driver (devg-tvia.so) */
162 {"tvia", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 162 {"tvia", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
163 SDL_GF_UNACCELERATED_3D}, 163 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
164 /* VIA UniChrome graphics driver (devg-unichrome.so) */ 164 /* VIA UniChrome graphics driver (devg-unichrome.so) */
165 {"unichrome", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION | 165 {"unichrome", SDL_GF_ACCELERATED | SDL_GF_NOLOWRESOLUTION |
166 SDL_GF_UNACCELERATED_3D}, 166 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
167 /* VESA unaccelerated gfx driver (devg-vesa.so) */ 167 /* VESA unaccelerated gfx driver (devg-vesa.so) */
168 {"vesa", SDL_GF_UNACCELERATED | SDL_GF_LOWRESOLUTION | 168 {"vesa", SDL_GF_UNACCELERATED | SDL_GF_LOWRESOLUTION |
169 SDL_GF_UNACCELERATED_3D}, 169 SDL_GF_UNACCELERATED_3D | SDL_GF_NOVIDEOMEMORY},
170 /* VmWare graphics driver (devg-volari.so) */ 170 /* VmWare graphics driver (devg-volari.so) */
171 {"vmware", SDL_GF_ACCELERATED | SDL_GF_LOWRESOLUTION | 171 {"vmware", SDL_GF_ACCELERATED | SDL_GF_LOWRESOLUTION |
172 SDL_GF_UNACCELERATED_3D}, 172 SDL_GF_UNACCELERATED_3D | SDL_GF_NOVIDEOMEMORY},
173 /* XGI XP10 graphics driver (devg-volari.so) */ 173 /* XGI XP10 graphics driver (devg-volari.so) */
174 {"volari", SDL_GF_ACCELERATED | SDL_GF_LOWRESOLUTION | 174 {"volari", SDL_GF_ACCELERATED | SDL_GF_LOWRESOLUTION |
175 SDL_GF_UNACCELERATED_3D}, 175 SDL_GF_UNACCELERATED_3D | SDL_GF_VIDEOMEMORY},
176 /* End of list */ 176 /* End of list */
177 {NULL, 0x00000000} 177 {NULL, 0x00000000}
178 }; 178 };
179 179
180 /*****************************************************************************/ 180 /*****************************************************************************/
530 void qnxgf_videoquit(_THIS) 530 void qnxgf_videoquit(_THIS)
531 { 531 {
532 SDL_DisplayData* didata; 532 SDL_DisplayData* didata;
533 uint32_t it; 533 uint32_t it;
534 534
535 /* Stop collecting mouse events */
536 hiddi_disable_mouse();
535 /* Delete GF input devices */ 537 /* Delete GF input devices */
536 gf_delinputdevices(_this); 538 gf_delinputdevices(_this);
537 539
538 /* SDL will restore old desktop mode on exit */ 540 /* SDL will restore old desktop mode on exit */
539 for(it=0; it<_this->num_displays; it++) 541 for(it=0; it<_this->num_displays; it++)
1287 else 1289 else
1288 { 1290 {
1289 surfaces=2; 1291 surfaces=2;
1290 } 1292 }
1291 1293
1294 /* If driver has no support of video memory allocation, then */
1295 /* disable double buffering, use single buffer present copy */
1296 if ((didata->caps & SDL_GF_VIDEOMEMORY)!=SDL_GF_VIDEOMEMORY)
1297 {
1298 surfaces=1;
1299 }
1300
1292 /* Free main surface */ 1301 /* Free main surface */
1293 if (didata->surface[0]!=NULL) 1302 if (didata->surface[0]!=NULL)
1294 { 1303 {
1295 gf_surface_free(didata->surface[0]); 1304 gf_surface_free(didata->surface[0]);
1296 didata->surface[0]=NULL; 1305 didata->surface[0]=NULL;