Changeset 1383 in vbox
- Timestamp:
- Mar 9, 2007 6:06:02 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/xgraphics/vboxvideo.c
r1260 r1383 523 523 xf86SetGamma(pScrn, gzeros); 524 524 525 /* If no modes where specified for this display, add a default mode */ 526 if (!pScrn->display->modes || !*pScrn->display->modes) 525 /* To get around the problem of SUSE specifying a single, invalid mode in their Xorg.conf 526 by default, we add an additional mode to the end of the user specified list. This means 527 that if all user modes are invalid, X will try our mode before falling back to its standard 528 mode list. */ 529 if (pScrn->display->modes == NULL) 527 530 { 528 if ((pScrn->display->modes = xnfalloc(2 * sizeof(char*)))) 529 { 530 pScrn->display->modes[0] = "1024x768"; 531 pScrn->display->modes[1] = NULL; 532 } 531 /* The user specified no modes at all - specify 1024x768 as a default. */ 532 pScrn->display->modes = xnfalloc(2 * sizeof(char*)); 533 pScrn->display->modes[0] = "1024x768"; 534 pScrn->display->modes[1] = NULL; 535 } 536 else 537 { 538 /* Add 1024x768 to the end of the mode list in case the others are all invalid. */ 539 for (i = 0; pScrn->display->modes[i] != NULL; i++); 540 pScrn->display->modes = xnfrealloc(pScrn->display->modes, (i + 2) * sizeof(char *)); 541 pScrn->display->modes[i] = "1024x768"; 542 pScrn->display->modes[i + 1] = NULL; 533 543 } 534 544
Note:
See TracChangeset
for help on using the changeset viewer.