comparison src/video/Xext/Xxf86dga/XF86DGA.c @ 1575:3ba88cb7eb1b

Updated dynamic X11 code. See details in Bugzilla #170.
author Ryan C. Gordon <icculus@icculus.org>
date Wed, 22 Mar 2006 05:00:59 +0000
parents 6fd39b50dd91
children ecba4bbaf9c2
comparison
equal deleted inserted replaced
1574:0fd72308659e 1575:3ba88cb7eb1b
112 LockDisplay(dpy); 112 LockDisplay(dpy);
113 GetReq(XF86DGAGetVideoLL, req); 113 GetReq(XF86DGAGetVideoLL, req);
114 req->reqType = info->codes->major_opcode; 114 req->reqType = info->codes->major_opcode;
115 req->dgaReqType = X_XF86DGAGetVideoLL; 115 req->dgaReqType = X_XF86DGAGetVideoLL;
116 req->screen = screen; 116 req->screen = screen;
117 if (!p_XReply(dpy, (xReply *)&rep, 0, xFalse)) { 117 if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
118 UnlockDisplay(dpy); 118 UnlockDisplay(dpy);
119 SyncHandle(); 119 SyncHandle();
120 return False; 120 return False;
121 } 121 }
122 122
147 req->dgaReqType = X_XF86DGADirectVideo; 147 req->dgaReqType = X_XF86DGADirectVideo;
148 req->screen = screen; 148 req->screen = screen;
149 req->enable = enable; 149 req->enable = enable;
150 UnlockDisplay(dpy); 150 UnlockDisplay(dpy);
151 SyncHandle(); 151 SyncHandle();
152 pXSync(dpy,False); 152 XSync(dpy,False);
153 return True; 153 return True;
154 } 154 }
155 155
156 Bool SDL_NAME(XF86DGAGetViewPortSize)( 156 Bool SDL_NAME(XF86DGAGetViewPortSize)(
157 Display* dpy, 157 Display* dpy,
168 LockDisplay(dpy); 168 LockDisplay(dpy);
169 GetReq(XF86DGAGetViewPortSize, req); 169 GetReq(XF86DGAGetViewPortSize, req);
170 req->reqType = info->codes->major_opcode; 170 req->reqType = info->codes->major_opcode;
171 req->dgaReqType = X_XF86DGAGetViewPortSize; 171 req->dgaReqType = X_XF86DGAGetViewPortSize;
172 req->screen = screen; 172 req->screen = screen;
173 if (!p_XReply(dpy, (xReply *)&rep, 0, xFalse)) { 173 if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
174 UnlockDisplay(dpy); 174 UnlockDisplay(dpy);
175 SyncHandle(); 175 SyncHandle();
176 return False; 176 return False;
177 } 177 }
178 178
203 req->screen = screen; 203 req->screen = screen;
204 req->x = x; 204 req->x = x;
205 req->y = y; 205 req->y = y;
206 UnlockDisplay(dpy); 206 UnlockDisplay(dpy);
207 SyncHandle(); 207 SyncHandle();
208 pXSync(dpy,False); 208 XSync(dpy,False);
209 return True; 209 return True;
210 } 210 }
211 211
212 212
213 Bool SDL_NAME(XF86DGAGetVidPage)( 213 Bool SDL_NAME(XF86DGAGetVidPage)(
224 LockDisplay(dpy); 224 LockDisplay(dpy);
225 GetReq(XF86DGAGetVidPage, req); 225 GetReq(XF86DGAGetVidPage, req);
226 req->reqType = info->codes->major_opcode; 226 req->reqType = info->codes->major_opcode;
227 req->dgaReqType = X_XF86DGAGetVidPage; 227 req->dgaReqType = X_XF86DGAGetVidPage;
228 req->screen = screen; 228 req->screen = screen;
229 if (!p_XReply(dpy, (xReply *)&rep, 0, xFalse)) { 229 if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
230 UnlockDisplay(dpy); 230 UnlockDisplay(dpy);
231 SyncHandle(); 231 SyncHandle();
232 return False; 232 return False;
233 } 233 }
234 234
255 req->dgaReqType = X_XF86DGASetVidPage; 255 req->dgaReqType = X_XF86DGASetVidPage;
256 req->screen = screen; 256 req->screen = screen;
257 req->vpage = vpage; 257 req->vpage = vpage;
258 UnlockDisplay(dpy); 258 UnlockDisplay(dpy);
259 SyncHandle(); 259 SyncHandle();
260 pXSync(dpy,False); 260 XSync(dpy,False);
261 return True; 261 return True;
262 } 262 }
263 263
264 Bool SDL_NAME(XF86DGAInstallColormap)( 264 Bool SDL_NAME(XF86DGAInstallColormap)(
265 Display* dpy, 265 Display* dpy,
277 req->dgaReqType = X_XF86DGAInstallColormap; 277 req->dgaReqType = X_XF86DGAInstallColormap;
278 req->screen = screen; 278 req->screen = screen;
279 req->id = cmap; 279 req->id = cmap;
280 UnlockDisplay(dpy); 280 UnlockDisplay(dpy);
281 SyncHandle(); 281 SyncHandle();
282 pXSync(dpy,False); 282 XSync(dpy,False);
283 return True; 283 return True;
284 } 284 }
285 285
286 Bool SDL_NAME(XF86DGAQueryDirectVideo)( 286 Bool SDL_NAME(XF86DGAQueryDirectVideo)(
287 Display *dpy, 287 Display *dpy,
297 LockDisplay(dpy); 297 LockDisplay(dpy);
298 GetReq(XF86DGAQueryDirectVideo, req); 298 GetReq(XF86DGAQueryDirectVideo, req);
299 req->reqType = info->codes->major_opcode; 299 req->reqType = info->codes->major_opcode;
300 req->dgaReqType = X_XF86DGAQueryDirectVideo; 300 req->dgaReqType = X_XF86DGAQueryDirectVideo;
301 req->screen = screen; 301 req->screen = screen;
302 if (!p_XReply(dpy, (xReply *)&rep, 0, xFalse)) { 302 if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
303 UnlockDisplay(dpy); 303 UnlockDisplay(dpy);
304 SyncHandle(); 304 SyncHandle();
305 return False; 305 return False;
306 } 306 }
307 *flags = rep.flags; 307 *flags = rep.flags;
325 GetReq(XF86DGAViewPortChanged, req); 325 GetReq(XF86DGAViewPortChanged, req);
326 req->reqType = info->codes->major_opcode; 326 req->reqType = info->codes->major_opcode;
327 req->dgaReqType = X_XF86DGAViewPortChanged; 327 req->dgaReqType = X_XF86DGAViewPortChanged;
328 req->screen = screen; 328 req->screen = screen;
329 req->n = n; 329 req->n = n;
330 if (!p_XReply(dpy, (xReply *)&rep, 0, xFalse)) { 330 if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
331 UnlockDisplay(dpy); 331 UnlockDisplay(dpy);
332 SyncHandle(); 332 SyncHandle();
333 return False; 333 return False;
334 } 334 }
335 UnlockDisplay(dpy); 335 UnlockDisplay(dpy);
598 598
599 waitpid(pid, &status, 0); 599 waitpid(pid, &status, 0);
600 for (i = 0; i < numScrs; i++) { 600 for (i = 0; i < numScrs; i++) {
601 sp = scrList[i]; 601 sp = scrList[i];
602 SDL_NAME(XF86DGADirectVideoLL)(sp->display, sp->screen, 0); 602 SDL_NAME(XF86DGADirectVideoLL)(sp->display, sp->screen, 0);
603 pXSync(sp->display, False); 603 XSync(sp->display, False);
604 } 604 }
605 if (WIFEXITED(status)) 605 if (WIFEXITED(status))
606 _exit(0); 606 _exit(0);
607 else 607 else
608 _exit(-1); 608 _exit(-1);
658 beenhere = 1; 658 beenhere = 1;
659 659
660 for (i = 0; i < numScrs; i++) { 660 for (i = 0; i < numScrs; i++) {
661 sp = scrList[i]; 661 sp = scrList[i];
662 SDL_NAME(XF86DGADirectVideo)(sp->display, sp->screen, 0); 662 SDL_NAME(XF86DGADirectVideo)(sp->display, sp->screen, 0);
663 pXSync(sp->display, False); 663 XSync(sp->display, False);
664 } 664 }
665 _exit(3); 665 _exit(3);
666 } 666 }
667 667
668 Bool 668 Bool