comparison libvo/vo_dga.c @ 3318:a3739b590cf2

do not crash if can't get modelines (dga2.0)
author alex
date Tue, 04 Dec 2001 17:24:25 +0000
parents ae79207a3055
children cd642e995366
comparison
equal deleted inserted replaced
3317:614b4525d275 3318:a3739b590cf2
21 * BGR_32_24_888 21 * BGR_32_24_888
22 * 22 *
23 * - works only on x86 architectures 23 * - works only on x86 architectures
24 * 24 *
25 * $Log$ 25 * $Log$
26 * Revision 1.34 2001/12/04 17:24:25 alex
27 * do not crash if can't get modelines (dga2.0)
28 *
26 * Revision 1.33 2001/11/06 11:21:08 nick 29 * Revision 1.33 2001/11/06 11:21:08 nick
27 * Move yuv2rgb to postprocess 30 * Move yuv2rgb to postprocess
28 * 31 *
29 * 32 *
30 * Revision 1.31 2001/10/30 17:04:31 nick 33 * Revision 1.31 2001/10/30 17:04:31 nick
857 #ifdef HAVE_DGA2 860 #ifdef HAVE_DGA2
858 // Code to change the video mode added by Michael Graffam 861 // Code to change the video mode added by Michael Graffam
859 // mgraffam@idsi.net 862 // mgraffam@idsi.net
860 if (modelines==NULL) 863 if (modelines==NULL)
861 modelines=XDGAQueryModes(vo_dga_dpy, XDefaultScreen(vo_dga_dpy),&modecount); 864 modelines=XDGAQueryModes(vo_dga_dpy, XDefaultScreen(vo_dga_dpy),&modecount);
865
866 vd_printf(VD_DBG,
867 "vo_dga: modelines=%p, modecount=%d\n", modelines, modecount);
868
869 if (modelines == NULL)
870 {
871 vd_printf(VD_ERR, "vo_dga: can't get modelines\n");
872 return 1;
873 }
862 874
863 vd_printf(VD_INFO, 875 vd_printf(VD_INFO,
864 "vo_dga: DGA 2.0 available :-) Can switch resolution AND depth!\n"); 876 "vo_dga: DGA 2.0 available :-) Can switch resolution AND depth!\n");
865 for (i=0; i<modecount; i++) 877 for (i=0; i<modecount; i++)
866 { 878 {