Changeset 22089 in vbox for trunk/src/VBox/Additions/x11
- Timestamp:
- Aug 7, 2009 9:00:23 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 50838
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo_13.c
r22088 r22089 206 206 207 207 TRACE_LOG("width=%d, height=%d\n", width, height); 208 /* We only support horizontal resolutions which are a multiple of 8. Round down if 209 necessary. */ 210 if (width % 8 != 0) 211 { 212 xf86DrvMsg(scrn->scrnIndex, X_WARNING, 213 "VirtualBox only supports virtual screen widths which are a multiple of 8. Rounding down from %d to %d\n", 214 width, width - (width % 8)); 215 width = width - (width % 8); 216 } 208 /* We only support horizontal resolutions which are a multiple of 8. 209 * Round up if necessary. */ 210 width = (width + 7) & ~7; 217 211 if (width * height * bpp / 8 >= scrn->videoRam * 1024) 218 212 { … … 854 848 output = xf86OutputCreate(pScrn, &VBOXOutputFuncs, "VBOX1"); 855 849 856 /* Set a sane minimum mode size and the maximum allowed by the available VRAM */ 857 { 858 #if 0 859 unsigned maxSize, trySize = 512; 860 861 do { 862 maxSize = trySize; 863 trySize += 128; 864 } while (trySize * trySize * pScrn->bitsPerPixel / 8 < pScrn->videoRam * 1024); 865 #else 866 unsigned maxSize = 32000; 867 #endif 868 869 xf86CrtcSetSizeRange(pScrn, 64, 64, maxSize, maxSize); 870 871 /* I don't know exactly what these are for (and they are only used in a couple 872 of places in the X server code), but due to a bug in RandR 1.2 they place 873 an upper limit on possible resolutions. To add to the fun, they get set 874 automatically if we don't do it ourselves. */ 875 pScrn->display->virtualX = maxSize; 876 pScrn->display->virtualY = maxSize; 877 xf86DrvMsg(pScrn->scrnIndex, X_INFO, 878 "The maximum supported resolution is currently %dx%d\n", maxSize, maxSize); 879 } 850 /* Set a sane minimum and maximum mode size */ 851 xf86CrtcSetSizeRange(pScrn, 64, 64, 32000, 32000); 880 852 881 853 /* We are not interested in the monitor section in the configuration file. */ … … 991 963 992 964 /* Needed before we initialise DRI. */ 965 pScrn->virtualX = (pScrn->virtualX + 7) & ~7; 993 966 pScrn->displayWidth = pScrn->virtualX; 994 967 … … 1262 1235 1263 1236 int bpp = pScrn->depth == 24 ? 32 : 16; 1264 TRACE_LOG("HDisplay=%d, VDisplay=%d\n", pMode->HDisplay, pMode->VDisplay); 1237 TRACE_LOG("HDisplay=%d, VDisplay=%d, displayWidth=%d\n", 1238 pMode->HDisplay, pMode->VDisplay, pScrn->displayWidth); 1265 1239 pVBox = VBOXGetRec(pScrn); 1266 1240 /* Don't fiddle with the hardware if we are switched
Note:
See TracChangeset
for help on using the changeset viewer.